Posted January 24, 200916 yr I need to modify some source code. I need to get a 2nd string from given string which contains 2 string. The length of 1st string is always changed time to time. For example:NuQW4CSS0Qpa8TnZor in hex:01 01 01 01 01 01 01 01 1C 01 01 01 01 01 08 4E 75 51 57 34 43 53 53 01 01 01 01 01 08 30 51 70 61 38 54 6E 5Athe 1st stringNuQW4CSS (4E 75 51 57 34 43 53 53)it begins with 1 byte in front (08) as the length of the stringthe 2nd string0Qpa8TnZ (30 51 70 61 38 54 6E 5A)it also begins with 1 byte in front (08) as the length of the stringThe problem in the source code i got is, it gets the 2nd string with fixed method, always get it from the 29th byte, which is actually the 2nd string is not always at that position.getstring.zip
January 24, 200916 yr something like this:.if dx==BN_CLICKED .IF ax==IDC_GET pushad mov esi, offset packet01 .repeat lodsb .until al != 1 && byte ptr [esi+1] != 1 mov edi, offset GetHash01 movzx ecx,al rep movsb .repeat lodsb .until al != 1 mov edi, offset GetHash02 movzx ecx,al rep movsb invoke SetDlgItemText,hwwnd,EDIT_HASHSTRING1,addr GetHash01 invoke SetDlgItemText,hwwnd,EDIT_HASHSTRING1,addr GetHash02 popad .ENDIF.ENDIF
Create an account or sign in to comment