hi all
I am a beginner...and I think that works with strings is important.
I work with a sniffer and I have an output like 1DA0206548....and I would like to reformat this output to have %1D%A0%20%65%48
any help will be appreciate
Thanks in advance
yaki
yaki,
I moved the topic to the Campus so you had a better chance of a reply. Just make sure that the question you are asking is not cracking or reverse engineering related as we cannot allow that under the forum rules.
Hi,
try this
ConvertString PROC pszOut:DWORD, pszIn:DWORD
push edi
push esi
mov edi, pszOut
mov esi, pszIn
@@:
mov ax, [esi]
or al, al
jz @F
or ah, ah ; These lines aren't needed if the input
jz @F ; string is certain to be even in length
shl eax, 8
mov al, '%'
mov [edi], eax
add edi, 3
add esi, 2
jmp @B
@@:
mov [edi], byte ptr 0
pop esi
pop edi
ret
ConvertString ENDP
It's not optimised or anything, but it works.
Hope that helps,
Ossa
hi
it is not the cracking or hacking but a simple strings manipulation.
thanks Ossa