hani-dev

convert exe to base46 and run !!

18 posts in this topic

#1 ·  Posted

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

Share this post


Link to post
Share on other sites



#2 ·  Posted

any help here please

Share this post


Link to post
Share on other sites

#3 ·  Posted

@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.

1 person likes this

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#4 ·  Posted

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 ...

Share this post


Link to post
Share on other sites

#5 ·  Posted

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 !!

Share this post


Link to post
Share on other sites

#6 ·  Posted

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

 

Share this post


Link to post
Share on other sites

#7 ·  Posted

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 !

Share this post


Link to post
Share on other sites

#8 ·  Posted

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.

Share this post


Link to post
Share on other sites

#9 ·  Posted

Share this post


Link to post
Share on other sites

#10 ·  Posted

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

Share this post


Link to post
Share on other sites

#11 ·  Posted

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.

Share this post


Link to post
Share on other sites

#12 ·  Posted

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

 

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#14 ·  Posted

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

Share this post


Link to post
Share on other sites

#15 ·  Posted

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.

Share this post


Link to post
Share on other sites

#16 ·  Posted

Hello. Are you trying to run a NET Exe?

 

Saludos

Share this post


Link to post
Share on other sites

#17 ·  Posted

On ٢٠‏/٨‏/١٤٣٨ هـ at 2:06 AM, Danyfirex said:

Hello. Are you trying to run a NET Exe?

 

Saludos

 

yes !!

Share this post


Link to post
Share on other sites

#18 ·  Posted

Here is an Example

 

Saludos

Share this post


Link to post
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