FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ShellcodeCompiler/ShellcodeCompiler/CallFunctionsStates.cpp at master · NytroRST/ShellcodeCompiler · GitHub
NytroRST
ShellcodeCompiler
Repository navigation
Code
Issues
1
(1)
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
ShellcodeCompiler
/
ShellcodeCompiler
/
CallFunctionsStates.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
90 lines (73 loc) · 3.04 KB
Breadcrumbs
ShellcodeCompiler
/
ShellcodeCompiler
/
CallFunctionsStates.cpp
Copy path
File metadata and controls
90 lines (73 loc) · 3.04 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#
include
"
CallFunctionsStates.h
"
//
Declare call functions states
DeclaredStates::State CallFunctionsStates::CF_FunctionCall;
DeclaredStates::State CallFunctionsStates::CF_GetFirstParam;
DeclaredStates::State CallFunctionsStates::CF_ReadStrInQuotes;
DeclaredStates::State CallFunctionsStates::CF_GotStrInQuotes;
DeclaredStates::State CallFunctionsStates::CF_GetNextArg;
DeclaredStates::State CallFunctionsStates::CF_GetNumber;
DeclaredStates::State CallFunctionsStates::CF_GotAllArgs;
//
Function used to create the declare functions states
void
CallFunctionsStates::CreateCallFunctionsStates
()
{
DeclaredStates::Transform T;
//
From "CF_FunctionCall" with "(" go to "CF_GetFirstParam"
T.
Character
=
'
(
'
;
T.
NextState
= &CF_GetFirstParam;
CF_FunctionCall.
Transforms
.
push_back
(T);
CF_FunctionCall.
Name
=
"
CF_FunctionCall
"
;
//
From "CF_GetFirstParam" with "\"" go to CF_ReadStrInQuotes
T.
Character
=
'
"
'
;
T.
NextState
= &CF_ReadStrInQuotes;
CF_GetFirstParam.
Transforms
.
push_back
(T);
CF_GetFirstParam.
Name
=
"
CF_GetFirstParam
"
;
//
From "CF_ReadStrInQuotes" with AlphaNum go to "CF_ReadStrInQuotes"
T.
Character
=
CHR_READ_ALPHANUMSTR
;
T.
NextState
= &CF_ReadStrInQuotes;
CF_ReadStrInQuotes.
Transforms
.
push_back
(T);
CF_ReadStrInQuotes.
Name
=
"
CF_ReadStrInQuotes
"
;
CF_ReadStrInQuotes.
Process
=
true
;
CF_ReadStrInQuotes.
ProcessStateData
= DeclaredStates::ProcessStateData_FunctionCallStringArg;
//
From "CF_ReadStrInQuotes" with "\"" go to "CF_GotStrInQuotes"
T.
Character
=
'
"
'
;
T.
NextState
= &CF_GotStrInQuotes;
CF_ReadStrInQuotes.
Transforms
.
push_back
(T);
//
From "CF_GotStrInQuotes" with ")" go to "CF_GotAllArgs"
T.
Character
=
'
)
'
;
T.
NextState
= &CF_GotAllArgs;
CF_GotStrInQuotes.
Transforms
.
push_back
(T);
CF_GotStrInQuotes.
Name
=
"
CF_GotStrInQuotes
"
;
//
From "CF_GotStrInQuotes" with "," go to "CF_GetNextArg"
T.
Character
=
'
,
'
;
T.
NextState
= &CF_GetNextArg;
CF_GotStrInQuotes.
Transforms
.
push_back
(T);
//
From "CF_GetFirstParam" with Numeric go to "CF_GetNumber"
T.
Character
=
CHR_READ_NUMBER
;
T.
NextState
= &CF_GetNumber;
CF_GetFirstParam.
Transforms
.
push_back
(T);
//
From "CF_GetNumber" with Numeric go to "CF_GetNumber"
T.
Character
=
CHR_READ_NUMBER
;
T.
NextState
= &CF_GetNumber;
CF_GetNumber.
Transforms
.
push_back
(T);
CF_GetNumber.
Name
=
"
CF_GetNumber
"
;
CF_GetNumber.
Process
=
true
;
CF_GetNumber.
ProcessStateData
= DeclaredStates::ProcessStateData_FunctionCallIntArg;
//
From "CF_GetNumber" with "," go to "CF_GetNextArg"
T.
Character
=
'
,
'
;
T.
NextState
= &CF_GetNextArg;
CF_GetNumber.
Transforms
.
push_back
(T);
//
From "CF_GetNumber" with ")" go to "CF_GotAllArgs"
T.
Character
=
'
)
'
;
T.
NextState
= &CF_GotAllArgs;
CF_GetNumber.
Transforms
.
push_back
(T);
CF_GotAllArgs.
Name
=
"
CF_GotAllArgs
"
;
//
From "CF_GetNextArg" with Numeric go to "CF_GetNumber"
T.
Character
=
CHR_READ_NUMBER
;
T.
NextState
= &CF_GetNumber;
CF_GetNextArg.
Transforms
.
push_back
(T);
CF_GetNextArg.
Name
=
"
CF_GetNextArg
"
;
//
From "CF_GetNextArg" with "\"" go to "CF_ReadStrInQuotes"
T.
Character
=
'
"
'
;
T.
NextState
= &CF_ReadStrInQuotes;
CF_GetNextArg.
Transforms
.
push_back
(T);
}
Back
|
FazBrowse Home
|
New Git URL