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-06-09 11:30:04 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6674e08d02c8c11215fbdcb8b560affdd638b72a
6674e08d
1 parent
0121a72f
selectRepositbyName 추가
username으로 repository 리스트 반환
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
Vulnerablity_DB/VulnCrawler/VulnRDS.cs
Vulnerablity_DB/VulnCrawler/VulnRDS.cs
View file @
6674e08
...
...
@@ -500,5 +500,26 @@ namespace VulnCrawler
yield
return
vuln
;
}
}
public
static
IEnumerable
<
string
>
SelectRepositbyName
(
string
_username
)
{
String
sql
=
string
.
Empty
;
MySqlCommand
cmd
=
new
MySqlCommand
();
cmd
.
Connection
=
Conn
;
cmd
.
CommandText
=
"SELECT repository FROM vuln.auth_user WHERE username = '"
+
_username
+
"'"
;
string
a
=
null
;
//sql console write 확인용
Console
.
Write
(
cmd
.
CommandText
);
System
.
Data
.
DataSet
ds
=
new
System
.
Data
.
DataSet
();
MySqlDataAdapter
da
=
new
MySqlDataAdapter
(
cmd
.
CommandText
,
Conn
);
da
.
Fill
(
ds
);
//string을 넣음
foreach
(
System
.
Data
.
DataRow
row
in
ds
.
Tables
[
0
].
Rows
)
{
a
=
Convert
.
ToString
(
row
[
"repository"
]);
yield
return
a
;
}
}
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment