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.

Problem when creating Loader in Purebasic

Featured Replies

Posted

i create a loader in vb6 and it work but in purebasic not working

this in vb6

Dim ProcExecS As Long
ProcExecS = CreateProcess("File.exe", ByVal 0&, ByVal 0&, ByVal 0&, 1&, NORMAL_PRIORITY_CLASS, ByVal 0&, sNull, sInfo, pInfo)
If ProcExecS Then
WriteProcessMemory pInfo.hProcess, &H47DBF4, &HEB19, 2, 0&
WriteProcessMemory pInfo.hProcess, &H47DBF4 + 2, &H9090, 2, 0&
WriteProcessMemory pInfo.hProcess, &H47DBF4 + 4, &H9090, 2, 0&
CloseHandle pInfo.hProcess
End If

this in PB

ProcExecS = CreateProcess_("File.exe", $0, #NUL, #NUL, #False, NORMAL_PRIORITY_CLASS, #NUL, #NUL, @StartInfo, @ProcessInfo)

If ProcExecS 
WriteProcessMemory_(ProcessInfo\hProcess, $47DBF4, $EB19, 2, $0)
WriteProcessMemory_(ProcessInfo\hProcess, $47DBF4 + 2, $9090, 2, $0)
WriteProcessMemory_(ProcessInfo\hProcess, $47DBF4 + 4, $9090, 2, $0)
CloseHandle_(ProcessInfo\hProcess)
EndIf

 

Not much to work off from your code snippet. Are you sure you have write access?

ProcessInfo.PROCESS_INFORMATION
StartInfo.STARTUPINFO

If CreateProcess_("C:\upx.exe", #Null, #Null, #Null, #False, #CREATE_SUSPENDED, #Null, #Null, @StartInfo, @ProcessInfo)
  If ReadProcessMemory_(ProcessInfo\hProcess, $400000, @lpBuffer1.w, 2, #Null)
    If WriteProcessMemory_(ProcessInfo\hProcess, $410000, @lpBuffer1.w, 2, #Null)
      
      ; Verify we have written the read bytes to the destination address...
      
      If ReadProcessMemory_(ProcessInfo\hProcess, $410000, @lpBuffer2.w, 2, #Null)
        Debug "Read Bytes : $" + lpBuffer1
        Debug "Write Bytes : $" + lpBuffer2
      EndIf
      
    EndIf
  EndIf
  
  If lpBuffer2
    ResumeThread_(ProcessInfo\hThread)
  Else
    TerminateProcess_(ProcessInfo\hProcess, #Null)
  EndIf
  
  CloseHandle_(ProcessInfo\hProcess)
EndIf

Ted.

  • Author

Thank you so much Rogers

Popad .. (sorry i have a stupid sense of humour.. lol)

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.