mirror of
https://github.com/HyperDbg/HyperDbg.git
synced 2026-07-28 18:35:50 +00:00
Update wstring as parameter for wstring functions in script engine
This commit is contained in:
parent
37c18a32aa
commit
cb1908d4d0
13 changed files with 1295 additions and 886 deletions
|
|
@ -10,12 +10,18 @@
|
|||
# OneOpFunc3 input is a number or a string and returns a number.
|
||||
.OneOpFunc3->strlen
|
||||
|
||||
# TwoOpFunc3 inputs are two numbers or two strings and returns a number.
|
||||
# TwoOpFunc3 inputs are numbers or strings and returns a number.
|
||||
.TwoOpFunc3->strcmp
|
||||
|
||||
# ThreeOpFunc3 the first two inputs are numbers or strings and the third input is a number and returns a number.
|
||||
.ThreeOpFunc3->memcmp
|
||||
|
||||
# OneOpFunc4 input is a number or a wstring and returns a number.
|
||||
.OneOpFunc4->wcslen
|
||||
|
||||
# TwoOpFunc4 inputs are numbers or wstrings and returns a number.
|
||||
.TwoOpFunc4->wcscmp
|
||||
|
||||
.OperatorsOneOperand->inc dec reference dereference
|
||||
|
||||
S->BE
|
||||
|
|
@ -80,6 +86,8 @@ E12->.ThreeOpFunc1 ( EXP , EXP , EXP ) @.ThreeOpFunc1
|
|||
E12->.OneOpFunc3 ( StringNumber ) @.OneOpFunc3
|
||||
E12->.TwoOpFunc3 ( StringNumber , StringNumber ) @.TwoOpFunc3
|
||||
E12->.ThreeOpFunc3 ( StringNumber , StringNumber , EXP ) @.ThreeOpFunc3
|
||||
E12->.OneOpFunc4 ( WstringNumber ) @.OneOpFunc4
|
||||
E12->.TwoOpFunc4 ( WstringNumber , WstringNumber ) @.TwoOpFunc4
|
||||
|
||||
E12->( BE )
|
||||
|
||||
|
|
@ -99,6 +107,10 @@ E12->_pseudo_register @PUSH
|
|||
|
||||
|
||||
STRING->_string @PUSH
|
||||
WSTRING->_wstring @PUSH
|
||||
|
||||
StringNumber->EXP
|
||||
StringNumber->STRING
|
||||
StringNumber->STRING
|
||||
|
||||
WstringNumber->EXP
|
||||
WstringNumber->WSTRING
|
||||
|
|
@ -3,13 +3,13 @@
|
|||
|
||||
|
||||
# TwoOpFunc1 inputs are two numbers and returns a number.
|
||||
.TwoOpFunc1->ed eb eq interlocked_exchange interlocked_exchange_add wcscmp
|
||||
.TwoOpFunc1->ed eb eq interlocked_exchange interlocked_exchange_add
|
||||
|
||||
# TwoOpFunc2 inputs are two numbers and returns no value
|
||||
.TwoOpFunc2->spinlock_lock_custom_wait event_inject
|
||||
|
||||
# OneOpFunc1 input is a number and returns a number.
|
||||
.OneOpFunc1->poi db dd dw dq neg hi low not check_address wcslen disassemble_len disassemble_len32 disassemble_len64 interlocked_increment interlocked_decrement reference physical_to_virtual virtual_to_physical
|
||||
.OneOpFunc1->poi db dd dw dq neg hi low not check_address disassemble_len disassemble_len32 disassemble_len64 interlocked_increment interlocked_decrement reference physical_to_virtual virtual_to_physical
|
||||
|
||||
# OneOpFunc2 input is a number.
|
||||
.OneOpFunc2->print formats event_enable event_disable event_clear test_statement spinlock_lock spinlock_unlock event_sc
|
||||
|
|
@ -17,12 +17,18 @@
|
|||
# OneOpFunc3 input is a number or a string and returns a number.
|
||||
.OneOpFunc3->strlen
|
||||
|
||||
# TwoOpFunc3 inputs are two numbers or two strings and returns a number.
|
||||
# TwoOpFunc3 inputs are numbers or strings and returns a number.
|
||||
.TwoOpFunc3->strcmp
|
||||
|
||||
# ThreeOpFunc3 the first two inputs are numbers or strings and the third input is a number and returns a number.
|
||||
.ThreeOpFunc3->memcmp
|
||||
|
||||
# OneOpFunc4 input is a number or a wstring and returns a number.
|
||||
.OneOpFunc4->wcslen
|
||||
|
||||
# TwoOpFunc4 inputs are numbers or wstrings and returns a number.
|
||||
.TwoOpFunc4->wcscmp
|
||||
|
||||
.ZeroOpFunc1->pause flush event_trace_step event_trace_step_in event_trace_step_out event_trace_instrumentation_step event_trace_instrumentation_step_in
|
||||
|
||||
.VarArgFunc1->printf
|
||||
|
|
@ -66,6 +72,8 @@ CALL_FUNC_STATEMENT->.ThreeOpFunc1 ( EXPRESSION , EXPRESSION , EXPRESSION @.Thre
|
|||
CALL_FUNC_STATEMENT->.OneOpFunc3 ( StringNumber @.OneOpFunc3 ) @IGNORE_LVALUE
|
||||
CALL_FUNC_STATEMENT->.TwoOpFunc3 ( StringNumber , StringNumber @.TwoOpFunc3 ) @IGNORE_LVALUE
|
||||
CALL_FUNC_STATEMENT->.ThreeOpFunc3 ( StringNumber , StringNumber , EXPRESSION @.ThreeOpFunc3 ) @IGNORE_LVALUE
|
||||
CALL_FUNC_STATEMENT->.OneOpFunc4 ( WstringNumber @.OneOpFunc4 ) @IGNORE_LVALUE
|
||||
CALL_FUNC_STATEMENT->.TwoOpFunc4 ( WstringNumber , WstringNumber @.TwoOpFunc4 ) @IGNORE_LVALUE
|
||||
|
||||
VA->, EXPRESSION VA
|
||||
VA->eps
|
||||
|
|
@ -140,6 +148,8 @@ E12->.ThreeOpFunc1 ( EXPRESSION , EXPRESSION , EXPRESSION @.ThreeOpFunc1 )
|
|||
E12->.OneOpFunc3 ( StringNumber @.OneOpFunc3 )
|
||||
E12->.TwoOpFunc3 ( StringNumber , StringNumber @.TwoOpFunc3 )
|
||||
E12->.ThreeOpFunc3 ( StringNumber , StringNumber , EXPRESSION @.ThreeOpFunc3 )
|
||||
E12->.OneOpFunc4 ( WstringNumber @.OneOpFunc4 )
|
||||
E12->.TwoOpFunc4 ( WstringNumber , WstringNumber @.TwoOpFunc4 )
|
||||
|
||||
E12->( EXPRESSION )
|
||||
|
||||
|
|
@ -170,11 +180,13 @@ E12->& E12 @REFERENCE
|
|||
|
||||
|
||||
STRING->@PUSH _string
|
||||
WSTRING->@PUSH _wstring
|
||||
L_VALUE->@PUSH _global_id
|
||||
L_VALUE->@PUSH _local_id
|
||||
L_VALUE->@PUSH _register
|
||||
|
||||
StringNumber->EXPRESSION
|
||||
StringNumber->STRING
|
||||
|
||||
WstringNumber->EXPRESSION
|
||||
WstringNumber->WSTRING
|
||||
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ typedef struct ACTION_BUFFER {
|
|||
#define SYMBOL_VARIABLE_COUNT_TYPE 8
|
||||
#define SYMBOL_MEM_VALID_CHECK_MASK (1 << 31)
|
||||
#define SYMBOL_INVALID 9
|
||||
#define SYMBOL_WSTRING_TYPE 10
|
||||
#define INVALID -999
|
||||
#define LALR_ACCEPT 999
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue