Jump to content

convert exe to base46 and run !!


Recommended Posts

hello all ... im trying to write a program in autoit run additional .exe i dont need to copy any think on hdd im new in autoit ...

i success do it with vb.net like this :

Imports System.Reflection
Module Module1

    Sub main()
    


        Dim lolo As String = ".exe converted to base64 string "


        Dim lena() As Byte = Convert.FromBase64String(lolo)
        Dim dddddddddddddddddddd As Assembly = Assembly.Load(lena)
        dddddddddddddddddddd.EntryPoint.Invoke(Nothing, Nothing)
    End Sub





End Module

this code above is working very well .. i need to do this in autoit i found this script :
 

Local $lol = ObjCreate("ScriptControl")
$lol.Language = "VBScript"
$decode = _Base64Decode("dGV4dD0gbXNnYm94ICgiSGVsbG8gV29ybGQhIiwgMys2NCwgIk1zZ0JveCBFeGFtcGxlIikNCg==")
$lol.Addcode($decode)


Func _Base64Decode($string)
  Local $com = ObjCreate("Msxml2.DOMDocument")
  Local $createElement = $com.createElement("b64")
  $createElement.dataType = "bin.base64"
  $createElement.Text = $string
  Local $sRet = BinaryToString($createElement.nodeTypedValue, 1)
  Return $sRet
EndFunc  ;==>_Base64Decode

it's run msgbox in vbscript .. i dont need to use vbscript i need to do it in pure autoit !! can u help me

Link to comment
Share on other sites

  • Moderators

@hani-dev please wait at least 24 hours before bumping your thread. Forum members from around the world volunteer their time to assist as they are able; the person best able to assist you may not be online at the moment.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

4 minutes ago, JLogan3o13 said:

@hani-dev please wait at least 24 hours before bumping your thread. Forum members from around the world volunteer their time to assist as they are able; the person best able to assist you may not be online at the moment.

okay im sorry ...

Link to comment
Share on other sites

i found this code that runs converted msgbox to base64 u edit it to run winbox.exe ( it's a mikrotik networks manged application ) but it does not work

this is my modified script :

xup.in/dl,27365667/MSGBOX.AU3/
winbox offiICAL link : download2.mikrotik.com/routeros/winbox/3.11/winbox.exe

it's does not give me any error but it's nor running !!

Link to comment
Share on other sites

19 hours ago, InunoTaishou said:

Check out this topic if you wanna run a program from memory

I checked it before and i used it it's working but it's for binary i need to work with base64 can u help me to modify it to work with base64 !

Link to comment
Share on other sites

I cannot. Can you not modify your needs to work with binary? What about converting the exe you're trying to execute to VB? They're a very close language, syntax wise. If it's a small program you're trying to run from the main program it might be a viable option.

Link to comment
Share on other sites

16 minutes ago, spudw2k said:

Perhaps this thread combined with the one InunoTaishou referenced will get the job done?

 

it's no working also dear i try it it's not gives me any error and aslo it's not run my exe

Link to comment
Share on other sites

Can you show how you implemented it?  I would like to assume that if you already had a Base64 string of the exe you want to execute, the decode would be the same, but you may want to (re)encode it using UEZ's tool, then use the Base64decode in his code to convert it to binary, then use code in the RunBinary.au3 script in the first post of Trancex's thread.  

I'll try to test on my machine with another exe (notepad) and let you know if I have success.

Link to comment
Share on other sites

1 hour ago, spudw2k said:

Can you show how you implemented it?  I would like to assume that if you already had a Base64 string of the exe you want to execute, the decode would be the same, but you may want to (re)encode it using UEZ's tool, then use the Base64decode in his code to convert it to binary, then use code in the RunBinary.au3 script in the first post of Trancex's thread.  

I'll try to test on my machine with another exe (notepad) and let you know if I have success.

 

 

okay im waiting u when u done please upload the code

 

Link to comment
Share on other sites

Unfortunately I am not able to download the scripts (attachments) from the computer I am currently using, so it will have to be  later when I get to another machine to try it with.  Interim, if you can post the code you tried on your own to combine the two scripts, someone may be able to take a look at it to see if anything looks awry. 

Edited by spudw2k
Link to comment
Share on other sites

2 hours ago, spudw2k said:

Unfortunately I am not able to download the scripts (attachments) from the computer I am currently using, so it will have to be  later when I get to another machine to try it with.  Interim, if you can post the code you tried on your own to combine the two scripts, someone may be able to take a look at it to see if anything looks awry. 

 

okay dear waiting u to get another machine don't foget me

Link to comment
Share on other sites

Sorry, hani-dev; I had a busy weekend--in the process of relocating--and haven't had time to play with this yet.  My other recommendation still stands though.   Can you post the code you tried on your own to combine the two scripts? Someone may be able to take a look at it to see if anything looks awry. 


Also, there is no need to quote/reply every time.  to quote one of the forum moderators:  When you reply, please use the "Reply to this topic" button at the top of the thread or the "Reply to this topic" editor at the bottom rather than the "Quote" button - responders know what they wrote and it just pads the thread unnecessarily.

Link to comment
Share on other sites

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...