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-10 02:57:44 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
664e5bbb0e8a6e104e0410f9595ca16d0ae8a40d
664e5bbb
1 parent
0e3e7355
SelectAllReposit 수정
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
11 deletions
Vulnerablity_DB/VulnCrawler/VulnRDS.cs
Vulnerablity_DB/VulnUserCodeAnalyzer/Program.cs
Vulnerablity_DB/VulnUserCodeAnalyzer/VulnUserCodeAnalyzer.csproj
Vulnerablity_DB/VulnUserCodeAnalyzer/packages.config
Vulnerablity_DB/VulnCrawler/VulnRDS.cs
View file @
664e5bb
...
...
@@ -534,24 +534,23 @@ namespace VulnCrawler
yield
return
a
;
}
}
public
static
IEnumerable
<
string
>
SelectAllReposit
()
public
static
IEnumerable
<
(
string
userName
,
string
repository
)
>
SelectAllReposit
()
{
String
sql
=
string
.
Empty
;
MySqlCommand
cmd
=
new
MySqlCommand
();
cmd
.
Connection
=
Conn
;
cmd
.
CommandText
=
"SELECT repository FROM vuln.auth_user "
;
string
a
=
null
;
MySqlCommand
cmd
=
new
MySqlCommand
{
Connection
=
Conn
,
CommandText
=
"SELECT username, repository FROM vuln.auth_user "
};
System
.
Data
.
DataSet
ds
=
new
System
.
Data
.
DataSet
();
MySqlDataAdapter
da
=
new
MySqlDataAdapter
(
cmd
.
CommandText
,
Conn
);
da
.
Fill
(
ds
);
//vuln에 입력
foreach
(
System
.
Data
.
DataRow
row
in
ds
.
Tables
[
0
].
Rows
)
{
a
=
Convert
.
ToString
(
row
[
"repository"
]);
Console
.
WriteLine
(
a
);
yield
return
a
;
string
repo
=
Convert
.
ToString
(
row
[
"repository"
]);
string
user
=
Convert
.
ToString
(
row
[
"username"
]);
yield
return
(
user
,
repo
);
}
}
public
static
IEnumerable
<
string
>
SelectReposit_detail
()
...
...
Vulnerablity_DB/VulnUserCodeAnalyzer/Program.cs
View file @
664e5bb
...
...
@@ -111,8 +111,9 @@ namespace VulnUserCodeAnalyzer
{
static
void
Main
(
string
[]
args
)
{
/* 연도별 CVE JSON 파일 로드 */
CVE_JSON
.
AutoLoad
();
//
CVE_JSON.AutoLoad();
/* 크롤러 타입 */
var
crawler
=
new
VulnC
();
...
...
@@ -150,6 +151,15 @@ namespace VulnUserCodeAnalyzer
return
;
}
var
reposits
=
VulnRDS
.
SelectAllReposit
();
foreach
(
var
(
userName
,
repository
)
in
reposits
)
{
Console
.
WriteLine
(
$
"{userName}, {repository}"
);
}
Console
.
ReadLine
();
/* hashDict = 사용된 사용자 함수 정보 */
var
hashDict
=
new
Dictionary
<
int
,
HashSet
<
VulnAbstractCrawler
.
UserBlock
>>();
/* 경과 시간 체크 */
...
...
Vulnerablity_DB/VulnUserCodeAnalyzer/VulnUserCodeAnalyzer.csproj
View file @
664e5bb
...
...
@@ -38,6 +38,9 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
...
...
Vulnerablity_DB/VulnUserCodeAnalyzer/packages.config
View file @
664e5bb
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
packages
>
<
package
id
=
"Newtonsoft.Json"
version
=
"11.0.2"
targetFramework
=
"net461"
/>
<
package
id
=
"System.ValueTuple"
version
=
"4.5.0"
targetFramework
=
"net461"
/>
</
packages
>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment