Toggle navigation
Toggle navigation
This project
Loading...
Sign in
노현종
/
2018-1-Capstone1-VulnNotti
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
노현종
2018-05-30 19:25:44 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e4269113f4313b0286acf97891f3cf70e1c08265
e4269113
1 parent
de2921b7
Vuln DB 추가 도중 연결 끊김 오류 해결
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
Vulnerablity_DB/VulnCrawler/VulnRDS.cs
Vulnerablity_DB/VulnCrawler/VulnRDS.cs
View file @
e426911
...
...
@@ -9,6 +9,8 @@ namespace VulnCrawler
{
public
static
class
VulnRDS
{
public
static
AWS
.
Account
Account
{
get
;
set
;
}
public
static
string
DbName
{
get
;
set
;
}
public
static
MySqlConnection
Conn
{
get
;
set
;
}
public
class
Vuln
{
...
...
@@ -97,6 +99,8 @@ namespace VulnCrawler
builder
=
null
;
Conn
=
new
MySqlConnection
(
strConn
);
Conn
.
Open
();
Account
=
account
;
DbName
=
dbName
;
}
public
static
void
InsertVulnData
(
Vuln
vuln
)
{
...
...
@@ -132,6 +136,8 @@ namespace VulnCrawler
last_vulnId
=
1
;
}
Retry
:
//DB insert
try
{
...
...
@@ -147,6 +153,12 @@ namespace VulnCrawler
catch
(
Exception
e
)
{
Console
.
WriteLine
(
e
.
ToString
());
string
es
=
e
.
ToString
();
if
(
es
.
Contains
(
"Connection must be valid and open"
))
{
Connect
(
Account
,
DbName
);
goto
Retry
;
}
Console
.
ReadLine
();
}
// }
...
...
Please
register
or
login
to post a comment