Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Converter
#1
I have the below snippet for VB and was wondering how I would go about doing this on QM. Simple code that converts HEX to ASCII.

Code:
Copy      Help
Public Function hex2ascii(ByVal hextext As String) As String
    
For y = 1 To Len(hextext)
    num = Mid(hextext, y, 2)
    Value = Value & Chr(Val("&h" & num))
    y = y + 1
Next y

hex2ascii = Value
End Function
#2
Use str.decrypt.

str s
s.decrypt(8 ...)
#3
Code:
Copy      Help
str s ss
rget(s "Toolbar12" "Software\GinDi\QM2\toolbars" 0 "" REG_BINARY)
ss.decrypt(8 s)
out s

Result on above example is an empty string.
#4
Because it is not hex string. It is binary data. Hex is binary (or anything else) where each byte is replaced to hexadecimal 2-char string. Binary is any data. Since binary data can contain null characters and other unreadable characters, it cannot be simply represented as text, and often is represented as hex.
#5
So can't use decrypt to decrypt binary data from registry keys?
#6
What do you want to do with that binary data? If you want to display it as hex or text, you can use function outb from one of recent posts here, or similar code.
#7
Show it as text not hex. The example I found using outb is not showing the output on text.
#8
This example shows how can dangerous characters be replaced to dots.

Code:
Copy      Help
str s ss
if(!rget(s "QM toolbar" "Software\GinDi\QM2\toolbars" 0 "" REG_BINARY)) end "error"
int i
for(i 0 s.len) if(s[i]<32 or s[i]>127) s[i]='.'
out s


Forum Jump:


Users browsing this thread: 1 Guest(s)