fenhanxue Posted April 9, 2018 Posted April 9, 2018 (edited) here's my code: #AutoIt3Wrapper_UseX64 = n _Base64Encode('test') Func _Base64Encode($Data, $LineBreak = 76) Local $Opcode = "0x5589E5FF7514535657E8410000004142434445464748494A4B4C4D4E4F505152535455565758595A6162636465666768696A6B6C6D6E6F707172737475767778797A303132333435363738392B2F005A8B5D088B7D108B4D0CE98F0000000FB633C1EE0201D68A06880731C083F901760C0FB6430125F0000000C1E8040FB63383E603C1E60409C601D68A0688470183F90176210FB6430225C0000000C1E8060FB6730183E60FC1E60209C601D68A06884702EB04C647023D83F90276100FB6730283E63F01D68A06884703EB04C647033D8D5B038D7F0483E903836DFC04750C8B45148945FC66B80D0A66AB85C90F8F69FFFFFFC607005F5E5BC9C21000" Local $CodeBuffer = DllStructCreate("byte[" & BinaryLen($Opcode) & "]") DllStructSetData($CodeBuffer, 1, $Opcode) $Data = Binary($Data) Local $Input = DllStructCreate("byte[" & BinaryLen($Data) & "]") DllStructSetData($Input, 1, $Data) $LineBreak = Floor($LineBreak / 4) * 4 Local $OputputSize = Ceiling(BinaryLen($Data) * 4 / 3) $OputputSize = $OputputSize + Ceiling($OputputSize / $LineBreak) * 2 + 4 Local $Ouput = DllStructCreate("char[" & $OputputSize & "]") DllCall("user32.dll", "none", "CallWindowProc", "ptr", DllStructGetPtr($CodeBuffer), _ "ptr", DllStructGetPtr($Input), _ "int", BinaryLen($Data), _ "ptr", DllStructGetPtr($Ouput), _ "uint", $LineBreak) Return DllStructGetData($Ouput, 1) EndFunc ;==>_Base64Encode I find the code can not go through this line: DllCall("user32.dll", "none", "CallWindowProc", "ptr", DllStructGetPtr($CodeBuffer), _ "ptr", DllStructGetPtr($Input), _ "int", BinaryLen($Data), _ "ptr", DllStructGetPtr($Ouput), _ "uint", $LineBreak) Can anyone help me ? Edited April 10, 2018 by fenhanxue
Earthshine Posted April 9, 2018 Posted April 9, 2018 (edited) what is this for? could you be less vague with the details? Edited April 9, 2018 by Earthshine My resources are limited. You must ask the right questions
funkey Posted April 9, 2018 Posted April 9, 2018 Don't know, but I think you should start your script as x86 not as x64 application Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning.
fenhanxue Posted April 10, 2018 Author Posted April 10, 2018 8 hours ago, Earthshine said: what is this for? could you be less vague with the details? DllCall("user32.dll", "none", "CallWindowProc", "ptr", DllStructGetPtr($CodeBuffer), _ "ptr", DllStructGetPtr($Input), _ "int", BinaryLen($Data), _ "ptr", DllStructGetPtr($Ouput), _ "uint", $LineBreak) not all the computers can this code works in. forgive me my poor english , the iss is about "CallWindowProc" in some of my friends cumputers , the code can work but in my computer, when the code cames to this line ,it accurs app crash.
trancexx Posted April 10, 2018 Posted April 10, 2018 The code to run should be marked as executable code. On modern systems you can't just run random bytes. Search for VirtualProtect and PAGE_EXECUTE. On top of that CallWindowProc is old way of running code, check DllCallAddress. ♡♡♡ . eMyvnE
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now