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-04-15 00:09:31 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b7cda40237c94195bf3adbcaae686ec060d4088c
b7cda402
1 parent
3b903050
GetPatchResult 수정
Show 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 @
b7cda40
...
...
@@ -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