|
|
|||||||
I have VBA/VBS scripts that are deliberately obfuscated by the use of character concantenation. Code: $a='StrReverse(Chr(84) & Chr(69)& Chr(71)), StrReverse(Chr(103) & Chr(110)& Chr(112)& Chr(46)& Chr(54)& Chr(53)& Chr(56)& Chr(49)& Chr(53)& Chr(48)& Chr(55)& Chr(47)& Chr(117)& Chr(114)& Chr(46)& Chr(99)& Chr(105)& Chr(112)& Chr(101)& Chr(118)& Chr(97)& Chr(115)& Chr(47)& Chr(47)& Chr(58)& Chr(112)& Chr(116)& Chr(116)& Chr(104))' I then need to convert the VBA/VBS Expression to a KiXtart Expression. Code: StrReverse(Chr(84)+Chr(69)+Chr(71))+" "+StrReverse(Chr(103)+Chr(110)+Chr(112)+Chr(46)+Chr(54)+Chr(53)+Chr(56)+Chr(49)+Chr(53)+Chr(48)+Chr(55)+Chr(47)+Chr(117)+Chr(114)+Chr(46)+Chr(99)+Chr(105)+Chr(112)+Chr(101)+Chr(118)+Chr(97)+Chr(115)+Chr(47)+Chr(47)+Chr(58)+Chr(112)+Chr(116)+Chr(116)+Chr(104)) Then I want to evaluate it but what I get is the above as just a string of characters. How do I go from a string to something that can actually be evaluated and not just treated as a string of characters ? I tried - Execute() and that does evaluate it as an expression but the result is a boolean for success or failure. The result of the expression is shown in the command console but I want the result of the evaluated expression to then be made a string I can easily manipulate and copy. ** Note. I have created a function StrReverse() like what exists in VBS/VBA. |
||||||||
|
|
|||||||
Can you reword what you are trying to do. I'm a little fuzzy on what you want. |
||||||||
|
|
|||||||
Sure. I extract an expression from VBA/VBS. It is a sub-script that concatenates characters together. I copy that in a string then I convert the VBA/VBS sub-script to KiXtart syntax. However, when I am done I have just a string of characters. What I want is it to be a KixTart Expression that can be evaluated. |
||||||||
|
|
|||||||
To save time and my sanity... can you tell me what your string is after being converted from the chr(?)? |
||||||||
|
|
|||||||
It is in the first post. The first Code Segment is VBA/VBS The second is the KiXtart compliant expression. The result of the concatenated string is; GET http://savepic.ru/7051856.png |
||||||||
|
|
|||||||
The result was what I was after. Thanks. Is Get a function, exe, part of an object? How were you envisioning to use that? |
||||||||
|
|
|||||||
My objective is just to have a Human Readable ASCII text and mentally parse the results. The text however must be easily manipulated such as in a TXT file. |
||||||||
|
|
|||||||
Goodness... After re-reading all your posts... I got it... Give me 10 minutes. |
||||||||
|
|
|||||||
Code: break on $string="Chr(71) + Chr(69) + Chr(84)" ? $string $RC=Execute("$" + "Output=" + $String) ? $output |
||||||||
|
|
|||||||
Cool ! That works. Obrigado. Now it is just a matter of implementing it. |
||||||||
|
|
|||||||
I had no idea you can do a variable assignment within the Execute() function. Once you see it, it seems so simple. Thank you Allen |
||||||||
|
|
|||||||
Once I finally understood what you wanted, I was like "oh just that" Glad to help. |