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
Kiok Ahn
2018-04-18 15:55:07 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
36af149b39eba125bbb36bca14c830a9cb123fed
36af149b
2 parents
a62f77f5
b7cda402
Merge branch 'master' of
http://khuhub.khu.ac.kr/2012104082/Capstone1-VulnNotti
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
15 deletions
Vulnerablity_DB/VulnCrawler/VulnPython.cs
Vulnerablity_DB/VulnCrawler/VulnPython.cs
View file @
36af149
...
...
@@ -72,7 +72,16 @@ namespace VulnCrawler
/// <param name="methodName">찾을 메서드 이름</param>
/// <returns>함수 문자열</returns>
protected
abstract
string
GetOriginalFunc
(
Stream
oldStream
,
string
methodName
);
public
abstract
(
string
originalFunc
,
string
hash
)
GetPatchResult
(
Stream
oldStream
,
string
methodName
);
public
virtual
(
string
originalFunc
,
string
hash
)
GetPatchResult
(
Stream
oldStream
,
string
methodName
)
{
// 패치 전 원본 함수 구하고
string
func
=
GetOriginalFunc
(
oldStream
,
methodName
);
// 주석 제거하고
func
=
RemoveComment
(
func
);
Console
.
WriteLine
(
func
);
// 해쉬하고
string
md5
=
MD5HashFunc
(
func
);
return
(
func
,
md5
);
}
/// <summary>
/// 주석 제거 함수
/// </summary>
...
...
@@ -132,10 +141,6 @@ namespace VulnCrawler
throw
new
NotImplementedException
();
}
public
override
(
string
originalFunc
,
string
hash
)
GetPatchResult
(
Stream
oldStream
,
string
methodName
)
{
throw
new
NotImplementedException
();
}
public
override
string
RemoveComment
(
string
original
)
{
throw
new
NotImplementedException
();
}
...
...
@@ -215,15 +220,6 @@ namespace VulnCrawler
return
replace
;
}
public
override
(
string
originalFunc
,
string
hash
)
GetPatchResult
(
Stream
stream
,
string
methodName
)
{
// 패치 전 원본 함수 구하고
string
func
=
GetOriginalFunc
(
stream
,
methodName
);
// 주석 제거하고
func
=
RemoveComment
(
func
);
Console
.
WriteLine
(
func
);
// 해쉬하고
string
md5
=
MD5HashFunc
(
func
);
return
(
func
,
md5
);
}
}
}
...
...
Please
register
or
login
to post a comment