Posted: Tue Sep 06, 2005 11:30 pm
Found out that it really depends where you inject that what api's you can use... eg. when injecting to notepad.exe this wasnt possible:
but while injecting to eg. explorer.exe it worked. im pretty sure its about what does process it injects loads by default. havent had yet time to try out if i can load dll's in injected thread
edit:
i injected this to notepad.exe and it worked...
and this would work also:
so you can call other procedures within your remotethread (havent tested yet how they work with procedures returning something)
Code: Select all
Procedure RemoteThread()
MessageRequester("Success","Injection worked.")
If URLDownloadToFile_(#Null,"http://www.google.fi/images/hp0.gif","c:\g00gle.gif",#Null,#Null) = #S_OK
MessageRequester("works!","yay!")
Else
MessageRequester("error","doesnt work :(")
EndIf
MessageRequester("Injection","End...")
EndProcedure
edit:
i injected this to notepad.exe and it worked...
Code: Select all
Procedure RemoteThread()
MessageRequester("Success","Injection worked.")
hLibrary.l = LoadLibrary_("URLMON.DLL")
If URLDownloadToFile_(#Null, "http://forums.purebasic.com/english/templates/subSilver/images/logo_phpBB.gif", "c:\logo_phpBB.gif", #Null, #Null) = #S_OK
MessageRequester("works!","yay!")
Else
MessageRequester("error","doesnt work :(")
EndIf
MessageRequester("Injection","End...")
EndProcedure
Code: Select all
Procedure bleh()
MessageRequester("Success","Injection worked.")
hLibrary.l = LoadLibrary_("URLMON.DLL")
If URLDownloadToFile_(#Null, "http://forums.purebasic.com/english/templates/subSilver/images/logo_phpBB.gif", "c:\logo_phpBB.gif", #Null, #Null) = #S_OK
MessageRequester("works!","yay!")
Else
MessageRequester("error","doesnt work :(")
EndIf
MessageRequester("Injection","End...")
EndProcedure
Procedure RemoteThread()
bleh()
EndProcedure