Jump to content

Batch script from memory protected?


GeekIT
 Share

Go to solution Solved by Melba23,

Recommended Posts

A: it is only easier and faster because you refuse to invest the time and energy to learn the language. Instead of spending all this time asking about batch file convertor, or ScriptCryptor, you could have posted the batch file and someone would have shown you how to convert to AutoIt by now.

B: You're asking for help on an AutoIt help forum, expecting you to become competent with the language is not out of the realm of reason.

 

i'm asking for help on an AutoIt help forum, expecting help on how to make something in AutoIt.

Link to comment
Share on other sites

@GeekIT -

I have re-read the posts here from top to bottom.  I have also researched this issue a bit.  My quick thoughts:

I believe that you have not found anything that can do this from memory because filepath is a required parameter to execute the batch instructions and that makes it different from the other programming languages you reference.  I am fairly certain it is not possible but reserve that conclusion to the more talented members of the forum.  If it were possible I doubt sryptkeeper would "hide" the batch files at run time to prevent alterations since they produce a commercial software focused on this issue.

I did not read your earlier posts to conclude that this could be done in batch but rather that you wanted to emulate what was happening in javascript and vbscript ... but for batch files.  I think part of the problem is that at one point you may have mistakenly quoted the functionality of the javascript and vb script functionality as evidence that it could be done for batch ... not evidence of what you were trying to do. 

My personal opinion is that while there is nothing inherently wrong with this question you need to appreciate not everyone will share your enthusiasm for exploring the issue in detail - especially if they see no inherent value in the solution.  This is the case because even if the problem were capable of being solved (not so sure about that) you could do it all with native Au3.  It's a bit like dressing up as a Jets' fan and going to a Patriots game (not wrong - but not popular).

I am also off this thread since I doubt the feasibility but wish you the best in finding a solution.

Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt

Link to comment
Share on other sites

ok, thanks for the help.

did some research again myself, made an account on the forums of scriptcryptor and read that they

are making an new batch to exe compiler that does the thing i want.

I didn't expect that everyone will share my enthusiasm for exploring the issue in detail, I was just wondering.

grts.

Link to comment
Share on other sites

  • 4 weeks later...

Unless, I misuderstand what GeekIT want, I think autoit + enigma virtual box should do the trick.

http://forum.enigmaprotector.com/viewtopic.php?f=20&t=7503

Take note, running batch file in memory using the above method isnt safe at all, since its mention enigma virtual box isnt encrypted but enigma protector virtual box is.

As for the new Quick Batch File Compiler that actually run batch file in memory, its a long wait. I waited ages for it to come out.

Link to comment
Share on other sites

you are so ridiculously wrong i decided to show you 1 of the 50 or so ways this can probably be accomplished

#AutoIt3Wrapper_Res_File_Add=echo_1.bat, rt_rcdata, TEST_BAT_1

#include "resources.au3"

$Sstring = _ResourceGetAsString("TEST_BAT_1")
$Array = StringSplit($Sstring , @CRLF , 1)

for $i = 1 to $Array[0]
    run($Array[$i])
next

echo_1.bat

echo off
cmd /k
notepad.exe
calc.exe
Edited by boththose

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

Did I win this thread   :guitar:

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

  • 2 weeks later...

Unless, I misuderstand what GeekIT want, I think autoit + enigma virtual box should do the trick.

http://forum.enigmaprotector.com/viewtopic.php?f=20&t=7503

Take note, running batch file in memory using the above method isnt safe at all, since its mention enigma virtual box isnt encrypted but enigma protector virtual box is.

As for the new Quick Batch File Compiler that actually run batch file in memory, its a long wait. I waited ages for it to come out.

 

no matter how i try, won't work. it simply don't open the batchfile... strange..

Edited by GeekIT
Link to comment
Share on other sites

 

you are so ridiculously wrong i decided to show you 1 of the 50 or so ways this can probably be accomplished

#AutoIt3Wrapper_Res_File_Add=echo_1.bat, rt_rcdata, TEST_BAT_1

#include "resources.au3"

$Sstring = _ResourceGetAsString("TEST_BAT_1")
$Array = StringSplit($Sstring , @CRLF , 1)

for $i = 1 to $Array[0]
    run($Array[$i])
next

echo_1.bat

echo off
cmd /k
notepad.exe
calc.exe

 

ok and how do you deal with variables in the batchfile? (:

Link to comment
Share on other sites

The result is a string (and then i split it into an array of them).   Maybe look at assign, eval, and execute and actually try something.

Edited by boththose

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

The result is a string (and then i split it into an array of them).   Maybe look at assign, eval, and execute and actually try something.

 

no need for sarcasm  :naughty:

+ you think i didn't try what you gave me?

and eval, assign and execute don't exist in batch if that is what you mean.

Link to comment
Share on other sites

From reading the ScriptCryptor website, it appears that the program just runs the program and script the same way AutoIt does it. AutoIt doesn't create any temp files when it runs, it just runs the script packaged inside the exe. Which is what it appears that SC is doing.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

no need for sarcasm  :naughty:

+ you think i didn't try what you gave me?

and eval, assign and execute don't exist in batch if that is what you mean.

Most people don't and the fact you haven't posted any code isn't helping your case either. Plus, something along the lines of "I tried but the output from SciTE/AutoIt was this", is a clear indication you're running the code people are giving you.

Edit: Added quotes for emphasis.

Edited by guinness

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

From reading the ScriptCryptor website, it appears that the program just runs the program and script the same way AutoIt does it. AutoIt doesn't create any temp files when it runs, it just runs the script packaged inside the exe. Which is what it appears that SC is doing.

 

can you maybe tell me how i can do that?

tnx for the research btw  :)

Link to comment
Share on other sites

Most people don't and the fact you haven't posted any code isn't helping your case either. Plus, something along the lines of "I tried but the output from SciTE/AutoIt was this", is a clear indication you're running the code people are giving you.

Edit: Added quotes for emphasis.

 

the code of @boththose works fine, but if i use variables in the batchfile it won't work because every line is executed apart.

why is the atmosphere on autoit forums always so tensive, i'm not an expert at programming and forums you know.  B) 

Link to comment
Share on other sites

show us what you have tried, or maybe the actual contents of your batch file at least.  You cant expect anything but questions and doubt if you reveal nothing of your progress.

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

show us what you have tried, or maybe the actual contents of your batch file at least.  You cant expect anything but questions and doubt if you reveal nothing of your progress.

 

batchfile:____________________________________________

@ECHO OFF
MODE CON: COLS=36 LINES=5
 
ECHO c,D,d,F,g,T,b,f,p,s,t,n!!!
CHOICE /C cdFgTbfpstn /N /CS /M COMMAND:
 
IF ERRORLEVEL 1  SET KEY=C:
IF ERRORLEVEL 2  SET KEY=D:
IF ERRORLEVEL 3  SET KEY=F:
IF ERRORLEVEL 4  SET KEY=F:GO!
IF ERRORLEVEL 5  SET KEY=F:geekit
IF ERRORLEVEL 6  SET KEY=F:geekitBack-up
IF ERRORLEVEL 7  SET KEY=F:geekitFiles
IF ERRORLEVEL 8  SET KEY=F:geekitProjects
IF ERRORLEVEL 9  SET KEY=F:geekitSoftware
IF ERRORLEVEL 10 SET KEY=F:geekitTemporary
IF ERRORLEVEL 11 GOTO END
 
ECHO RUNNING: %KEY%
START %KEY%
 
:END
ECHO NOTHING...
ECHO STOP...
TIMEOUT /T 3 /nobreak>nul
EXIT
 
batchfile:____________________________________________
 
and the autoit code from you.
Link to comment
Share on other sites

ok, heres 2 of 50.  Choices hidden, well everything hidden, but functionally equivalent.

*C s the only thing i have, so you have to remove the msgbox from the others.

#include <Misc.au3>


 while 1
     If _IsPressed ( "43" ) Then
     ShellExecute("C:")
     exit
     Endif

     If _IsPressed ( "44" ) Then
     msgbox (0, '' , 'ShellExecute("d:")')
     exit
     Endif

    If _IsPressed ( "46" ) And _IsPressed ( "10" ) Then
     msgbox (0, '' , 'ShellExecute("F:")')
     exit
     Endif

    If _IsPressed ( "47" ) Then
     msgbox (0, '' , 'ShellExecute("F:\GO!")')
     exit
     Endif

     If _IsPressed ( "54" ) And _IsPressed ( "10" ) Then
     msgbox (0, '' , 'ShellExecute("F:\geekit")')
     exit
     Endif

     If _IsPressed ( "42" ) Then
     msgbox (0, '' , 'ShellExecute("F:\geekit\Back-up")')
     exit
     Endif

      If _IsPressed ( "46" ) Then
     msgbox (0, '' , 'ShellExecute("F:\geekit\Files")')
     exit
     Endif

      If _IsPressed ( "50" ) Then
     msgbox (0, '' , 'ShellExecute("F:\geekit\Projects")')
     exit
     Endif

       If _IsPressed ( "53" ) Then
     msgbox (0, '' , 'ShellExecute("F:\geekit\Software")')
     exit
     Endif

      If _IsPressed ( "54" ) Then
     msgbox (0, '' , 'ShellExecute("F:\geekit\Temporary")')
     exit
     Endif

       If _IsPressed ( "4E" ) Then
     msgbox (0, '' , 'Exit')
     exit
     Endif


     sleep(10)
     wend
Edited by boththose

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

  • Moderators

GeekIT,

Before you go too much further down this road, I suggest you read this announcement. At present you are fine, but getting very close to the edge. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

and the autoit code from you.

I am busy. Working on the UDFs and a super secret build script.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

 

and the autoit code from you.

 

I was so shocked the batch file materialized I missed that part.  you are admittedly not an expert, but i am beginning to question whether you are even beginner.

Edited by boththose

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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