HyperDbg Debugger
Loading...
Searching...
No Matches
EvalScripts.HighLevelScriptGen Class Reference

Static Public Member Functions

static bool EvaluateExpression (string Script, ref string Result)
 
static bool EvaluateConditionalStatement (string Script, ref string Result)
 
static bool EvaluateLoops (string Script, ref string Result)
 

Member Function Documentation

◆ EvaluateConditionalStatement()

static bool EvalScripts.HighLevelScriptGen.EvaluateConditionalStatement ( string Script,
ref string Result )
inlinestatic
52 {
53 //
54 // Change script based on c# (convert script engine scripts to
55 // c# codes)
56 //
57 string CSharpBasedString = ScriptApplyCSharpChange(Script);
58
59 //
60 // Evaluate the conditional statement
61 //
62 var EvalResult = Eval.EvalScriptRunConditionalStatementAsync(CSharpBasedString);
63
64 if (EvalResult.Result.Item1 == true)
65 {
66 Result = EvalResult.Result.Item2.ToString("X");
67 return true;
68 }
69 else
70 {
71 Result = "$error$";
72 return false;
73 }
74 }

◆ EvaluateExpression()

static bool EvalScripts.HighLevelScriptGen.EvaluateExpression ( string Script,
ref string Result )
inlinestatic
26 {
27 //
28 // Change script based on c# (convert script engine scripts to
29 // c# codes)
30 //
31 string CSharpBasedString = ScriptApplyCSharpChange(Script);
32
33 //
34 // Evaluate the statement
35 //
36 var EvalResult = Eval.EvalStatementAsync(CSharpBasedString);
37
38 if (EvalResult.Result.Item1 == true)
39 {
40 Result = EvalResult.Result.Item2.ToString("X");
41 Result = Result.Replace("0x", "");
42 return true;
43 }
44 else
45 {
46 Result = "$error$";
47 return false;
48 }
49 }

◆ EvaluateLoops()

static bool EvalScripts.HighLevelScriptGen.EvaluateLoops ( string Script,
ref string Result )
inlinestatic
77 {
78 //
79 // Change script based on c# (convert script engine scripts to
80 // c# codes)
81 //
82 string CSharpBasedString = ScriptApplyCSharpChange(Script);
83
84 //
85 // Evaluate the for loop statement
86 //
87 var EvalResult = Eval.EvalScriptRunLoopsAsync(CSharpBasedString);
88
89 if (EvalResult.Result.Item1 == true)
90 {
91 Result = EvalResult.Result.Item2.ToString("X");
92 return true;
93 }
94 else
95 {
96 Result = "$error$";
97 return false;
98 }
99 }

The documentation for this class was generated from the following file: