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-17 16:29:06 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0c9f0f01ab7f6f4c931a3f162c97d33361ac1f3d
0c9f0f01
1 parent
8944a4bf
언어별 예약어 목록
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
2 deletions
Vulnerablity_DB/VulnCrawler/Program.cs
Vulnerablity_DB/VulnCrawler/VulnAbstractCrawler.cs
Vulnerablity_DB/VulnCrawler/VulnC.cs
Vulnerablity_DB/VulnCrawler/VulnPython.cs
Vulnerablity_DB/VulnCrawler/Program.cs
View file @
0c9f0f0
...
...
@@ -76,7 +76,7 @@ namespace VulnCrawler
Console
.
WriteLine
(
item
);
}
return
;
//
return;
var
directorys
=
Directory
.
GetDirectories
(
@"c:\VulnPy"
);
if
(
directorys
.
Length
==
0
)
{
Console
.
WriteLine
(
"Repository 목록 찾기 실패"
);
...
...
Vulnerablity_DB/VulnCrawler/VulnAbstractCrawler.cs
View file @
0c9f0f0
...
...
@@ -14,7 +14,10 @@ namespace VulnCrawler
public
abstract
class
VulnAbstractCrawler
{
private
static
readonly
string
[]
ReservedList
=
{
"if"
,
"return"
,
"break"
,
"while"
,
"typedef"
};
protected
abstract
string
[]
ReservedList
{
get
;
}
// = { "if", "return", "break", "while", "typedef" };
/// <summary>
/// 생성자
/// 경로를 입력받아서(path)
...
...
Vulnerablity_DB/VulnCrawler/VulnC.cs
View file @
0c9f0f0
...
...
@@ -10,6 +10,8 @@ namespace VulnCrawler
{
public
class
VulnC
:
VulnAbstractCrawler
{
protected
override
string
[]
ReservedList
=>
new
string
[]
{
"if"
,
"return"
,
"break"
,
"while"
,
"typedef"
};
protected
override
string
RegexFuncPattern
=>
$
@"@@ \-(?<{OldStart}>\d+),(?<{OldLines}>\d+) \+(?<{NewStart}>\d+),(?<{NewLines}>\d+) @@ (?<{MethodName}>(static)? [\w]+ [\w]+)\([\w \*\,\t\n]*\)"
;
protected
override
string
Extension
=>
".c"
;
...
...
Vulnerablity_DB/VulnCrawler/VulnPython.cs
View file @
0c9f0f0
...
...
@@ -20,6 +20,8 @@ namespace VulnCrawler
protected
override
string
Extension
=>
".py"
;
protected
override
string
RegexFuncPattern
=>
$
@"@@ \-(?<{OldStart}>\d+),(?<{OldLines}>\d+) \+(?<{NewStart}>\d+),(?<{NewLines}>\d+) @@ def (?<{MethodName}>\w+)"
;
protected
override
string
[]
ReservedList
=>
throw
new
NotImplementedException
();
// protected override Regex MethodExtractor => new Regex(RegexFuncPattern);
...
...
Please
register
or
login
to post a comment