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-16 14:14:42 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e758603163884f4dbf14b787a7e07bc81dc96e40
e7586031
1 parent
a3acbbbf
VulnC 작성중...
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
2 deletions
Vulnerablity_DB/VulnCrawler/VulnC.cs
Vulnerablity_DB/VulnCrawler/VulnC.cs
View file @
e758603
...
...
@@ -37,12 +37,40 @@ namespace VulnCrawler
protected
override
string
GetOriginalFunc
(
Stream
oldStream
,
string
methodName
)
{
StringBuilder
oldBuilder
=
new
StringBuilder
();
using
(
var
reader
=
new
StreamReader
(
oldStream
))
{
int
defSpace
=
0
;
bool
found
=
false
;
int
bracketCount
=
-
1
;
while
(!
reader
.
EndOfStream
)
{
string
line
=
reader
.
ReadLine
();
if
(
found
)
{
int
openBracketCount
=
line
.
Count
(
c
=>
c
==
'{'
);
int
closeBracketCount
=
line
.
Count
(
c
=>
c
==
'}'
);
if
(
bracketCount
==
-
1
)
{
}
if
(
line
.
Count
(
c
=>
c
==
'{'
)
>
0
)
{
}
}
if
(
Regex
.
Match
(
line
,
$
@"{methodName}"
).
Success
)
{
defSpace
=
line
.
IndexOf
(
methodName
);
found
=
true
;
int
openBracketCount
=
line
.
Count
(
c
=>
c
==
'{'
);
int
closeBracketCount
=
line
.
Count
(
c
=>
c
==
'}'
);
int
subtract
=
openBracketCount
-
closeBracketCount
;
oldBuilder
.
AppendLine
(
line
);
if
(
subtract
<
0
)
{
break
;
}
bracketCount
=
subtract
;
}
}
...
...
Please
register
or
login
to post a comment