노현종

SelectVulnbyLen 타입 수정

...@@ -129,9 +129,7 @@ namespace VulnCrawler ...@@ -129,9 +129,7 @@ namespace VulnCrawler
129 { 129 {
130 last_vulnId = 1; 130 last_vulnId = 1;
131 } 131 }
132 -
133 Retry: 132 Retry:
134 -
135 //DB insert 133 //DB insert
136 try 134 try
137 { 135 {
...@@ -401,9 +399,9 @@ namespace VulnCrawler ...@@ -401,9 +399,9 @@ namespace VulnCrawler
401 Console.ReadLine(); 399 Console.ReadLine();
402 } 400 }
403 } 401 }
404 - public static List<_Vuln> SelectVulnbyLen(int _lenFunc) 402 + public static IEnumerable<_Vuln> SelectVulnbyLen(int _lenFunc)
405 { 403 {
406 - var list = new List<_Vuln>(); 404 + // var list = new List<_Vuln>();
407 String sql = string.Empty; 405 String sql = string.Empty;
408 MySqlCommand cmd = new MySqlCommand(); 406 MySqlCommand cmd = new MySqlCommand();
409 cmd.Connection = Conn; 407 cmd.Connection = Conn;
...@@ -424,10 +422,11 @@ namespace VulnCrawler ...@@ -424,10 +422,11 @@ namespace VulnCrawler
424 vuln.Code = Convert.ToString(row["code"]); 422 vuln.Code = Convert.ToString(row["code"]);
425 vuln.BlockHash = Convert.ToString(row["blockHash"]); 423 vuln.BlockHash = Convert.ToString(row["blockHash"]);
426 vuln.Url = Convert.ToString(row["url"]); 424 vuln.Url = Convert.ToString(row["url"]);
427 - list.Add(vuln); 425 + yield return vuln;
426 + //list.Add(vuln);
428 } 427 }
429 //해당 list 반환 428 //해당 list 반환
430 - return list; 429 + // return list;
431 } 430 }
432 431
433 } 432 }
......