Showing
1 changed file
with
41 additions
and
0 deletions
| ... | @@ -533,5 +533,46 @@ namespace VulnCrawler | ... | @@ -533,5 +533,46 @@ namespace VulnCrawler |
| 533 | yield return a; | 533 | yield return a; |
| 534 | } | 534 | } |
| 535 | } | 535 | } |
| 536 | + public static IEnumerable<string> SelectAllReposit() | ||
| 537 | + { | ||
| 538 | + String sql = string.Empty; | ||
| 539 | + MySqlCommand cmd = new MySqlCommand(); | ||
| 540 | + cmd.Connection = Conn; | ||
| 541 | + cmd.CommandText = "SELECT repository FROM vuln.auth_user "; | ||
| 542 | + string a = null; | ||
| 543 | + | ||
| 544 | + System.Data.DataSet ds = new System.Data.DataSet(); | ||
| 545 | + MySqlDataAdapter da = new MySqlDataAdapter(cmd.CommandText, Conn); | ||
| 546 | + da.Fill(ds); | ||
| 547 | + //vuln에 입력 | ||
| 548 | + foreach (System.Data.DataRow row in ds.Tables[0].Rows) | ||
| 549 | + { | ||
| 550 | + a = Convert.ToString(row["repository"]); | ||
| 551 | + Console.WriteLine(a); | ||
| 552 | + | ||
| 553 | + yield return a; | ||
| 554 | + } | ||
| 555 | + } | ||
| 556 | + public static IEnumerable<string> SelectReposit_detail() | ||
| 557 | + { | ||
| 558 | + String sql = string.Empty; | ||
| 559 | + MySqlCommand cmd = new MySqlCommand(); | ||
| 560 | + cmd.Connection = Conn; | ||
| 561 | + cmd.CommandText = "SELECT url FROM vulnDetail "; | ||
| 562 | + string a = null; | ||
| 563 | + | ||
| 564 | + System.Data.DataSet ds = new System.Data.DataSet(); | ||
| 565 | + MySqlDataAdapter da = new MySqlDataAdapter(cmd.CommandText, Conn); | ||
| 566 | + da.Fill(ds); | ||
| 567 | + //vuln에 입력 | ||
| 568 | + foreach (System.Data.DataRow row in ds.Tables[0].Rows) | ||
| 569 | + { | ||
| 570 | + a = Convert.ToString(row["url"]); | ||
| 571 | + Console.WriteLine(a); | ||
| 572 | + | ||
| 573 | + yield return a; | ||
| 574 | + } | ||
| 575 | + } | ||
| 576 | + | ||
| 536 | } | 577 | } |
| 537 | } | 578 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment