이지윤

vulndetail 수정

...@@ -60,7 +60,13 @@ namespace VulnCrawler ...@@ -60,7 +60,13 @@ namespace VulnCrawler
60 public string Year { get; set; } = "NULL"; /* year */ 60 public string Year { get; set; } = "NULL"; /* year */
61 public string Level { get; set; } = "NULL"; /* level */ 61 public string Level { get; set; } = "NULL"; /* level */
62 public string UserName { get; set; } = "NULL"; /* user name */ 62 public string UserName { get; set; } = "NULL"; /* user name */
63 + public string Publish_date { get; set; } = "NULL"; /* Publish_date */
64 + public string Update_date { get; set; } = "NULL"; /* Update_date */
65 + public string CveDetail { get; set; } = "NULL"; /* cveDetail */
63 public string CveName { get; set; } = "NULL"; /* cve name */ 66 public string CveName { get; set; } = "NULL"; /* cve name */
67 + public string FileName { get; set; } = "NULL"; /* FileName */
68 + public string FuncName { get; set; } = "NULL"; /* funcName */
69 + public string Url { get; set; } = "NULL"; /* Url */
64 70
65 } 71 }
66 //connect 72 //connect
...@@ -236,19 +242,25 @@ namespace VulnCrawler ...@@ -236,19 +242,25 @@ namespace VulnCrawler
236 { 242 {
237 Connection = Conn, 243 Connection = Conn,
238 //db에 추가 244 //db에 추가
239 - CommandText = "INSERT INTO vulnDetail(type, year, level, userName, cveName) VALUES(@type, @year, @level, @userName, @cveName)" 245 + CommandText = "INSERT INTO vulnDetail(type, year, level, userName, cveName, publish_date,update_date, cveDetail,fileName, funcName, url) VALUES(@type, @year, @level, @userName, @cveName, @publish_date,@update_date, @cveDetail,@fileName, @funcName,@url)"
240 }; 246 };
241 cmd.Parameters.AddWithValue("@type", $"{vuln.Type}"); 247 cmd.Parameters.AddWithValue("@type", $"{vuln.Type}");
242 cmd.Parameters.AddWithValue("@year", $"{vuln.Year}"); 248 cmd.Parameters.AddWithValue("@year", $"{vuln.Year}");
243 cmd.Parameters.AddWithValue("@level", $"{vuln.Level}"); 249 cmd.Parameters.AddWithValue("@level", $"{vuln.Level}");
244 cmd.Parameters.AddWithValue("@userName", $"{vuln.UserName}"); 250 cmd.Parameters.AddWithValue("@userName", $"{vuln.UserName}");
245 cmd.Parameters.AddWithValue("@cveName", $"{vuln.CveName}"); 251 cmd.Parameters.AddWithValue("@cveName", $"{vuln.CveName}");
252 + cmd.Parameters.AddWithValue("@publish_date", $"{vuln.Publish_date}");
253 + cmd.Parameters.AddWithValue("@update_date", $"{vuln.Update_date}");
254 + cmd.Parameters.AddWithValue("@cveDetail", $"{vuln.CveDetail}");
255 + cmd.Parameters.AddWithValue("@fileName", $"{vuln.FileName}");
256 + cmd.Parameters.AddWithValue("@funcName", $"{vuln.FuncName}");
257 + cmd.Parameters.AddWithValue("@url", $"{vuln.Url}");
258 +
246 cmd.ExecuteNonQuery(); 259 cmd.ExecuteNonQuery();
247 //콘솔출력용 260 //콘솔출력용
248 - sql = "INSERT INTO vulnDetail(type, year, level, userName, cveName) " + 261 + sql = "INSERT INTO vulnDetail(type, year, level, userName, cveName, publish_date,update_date, cveDetail,fileName, funcName, url) " +
249 - $"VALUES({vuln.Type}, {vuln.Year}, {vuln.Level}, {vuln.UserName}, {vuln.CveName})"; 262 + $"VALUES({vuln.Type}, {vuln.Year}, {vuln.Level}, {vuln.UserName}, {vuln.CveName},{vuln.Publish_date}, {vuln.Update_date}, {vuln.CveDetail}, {vuln.FileName}, {vuln.FuncName}, {vuln.Url})";
250 Console.WriteLine(sql); 263 Console.WriteLine(sql);
251 -
252 } 264 }
253 catch (Exception e) 265 catch (Exception e)
254 { 266 {
......