Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

(Asm) How to get 2nd string from given string?

Featured Replies

Posted

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:

NuQW4CSS0Qpa8TnZ

or 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 5A

the 1st string

NuQW4CSS (4E 75 51 57 34 43 53 53)

it begins with 1 byte in front (08) as the length of the string

the 2nd string

0Qpa8TnZ (30 51 70 61 38 54 6E 5A)

it also begins with 1 byte in front (08) as the length of the string

The 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

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.