legend Posted January 26, 2016 Share Posted January 26, 2016 (edited) I'm trying to read a resource (file.txt), trying to figure it out by viewing this, but haven't found it out yet, any suggestions :)? Edited January 26, 2016 by legend Link to comment Share on other sites More sharing options...
careca Posted January 26, 2016 Share Posted January 26, 2016 A resource is embeded in a dll or exe or other files, what are you trying with file.txt? Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
legend Posted January 27, 2016 Author Share Posted January 27, 2016 I want to read the content of the txt file (the txt file is added as a resource) but i don't want it to drop it to the disk Link to comment Share on other sites More sharing options...
Mobius Posted January 27, 2016 Share Posted January 27, 2016 Hi Legend, Posting your wrapper directive line you are using to add the resource and the Findresource line you are referencing it with would assist those that try to help you Vlad Link to comment Share on other sites More sharing options...
legend Posted January 27, 2016 Author Share Posted January 27, 2016 I'm not using the wrapper, i'm using reshacker to add my resources Link to comment Share on other sites More sharing options...
Mobius Posted January 27, 2016 Share Posted January 27, 2016 (edited) Look at it from our perspective, without your reference code/line we don't know: * whether you copied the code from that thread. * Where in RT_RCDATA your text file resides * Whether you are using the ansi or Unicode version of FindResource * whether you decided to use FindResourceEx (ansi or unicode) when FindResource failed you Y'know that sort of thing, aka help those you wish to help you Edited January 27, 2016 by Mobius Phuggin auto correct Link to comment Share on other sites More sharing options...
legend Posted January 28, 2016 Author Share Posted January 28, 2016 Hi Mobius, thank's for your reply, this is what i'm trying to do : #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=..\..\..\..\Program Files (x86)\AutoIt3\Icons\au3.ico #AutoIt3Wrapper_Res_File_Add=text_1.txt, RT_RCDATA, TXT_1, 0 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #Include <WinAPI.au3> #include <Constants.au3> Global Const $RT_RCDATA = 10 $Path = @ScriptFullPath $Hlib = _WinAPI_LoadLibraryEx($Path, $LOAD_LIBRARY_AS_DATAFILE) $Resource = DllCall('kernel32.dll', 'ptr', 'FindResourceA', 'ptr', $Hlib, 'int', 2, 'long', $RT_RCDATA) MsgBox(0, '', _WinAPI_GetLastErrorMessage()) I'm unsure how i would go on about reading the resource : TXT_1 Link to comment Share on other sites More sharing options...
Mobius Posted January 30, 2016 Share Posted January 30, 2016 (edited) Legend.au3 Hiya Legend hope the above is what you are after. Edited January 30, 2016 by Mobius Link to comment Share on other sites More sharing options...
legend Posted January 30, 2016 Author Share Posted January 30, 2016 Hi Mobious, thank's for your help, it's very appreciated :). But the message it returns is : http://prntscr.com/9wu4i1 Link to comment Share on other sites More sharing options...
guinness Posted January 30, 2016 Share Posted January 30, 2016 What is wrong with the Resources UDF? 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 parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
legend Posted January 30, 2016 Author Share Posted January 30, 2016 (edited) I'm working on a autoit anti deobfuscator, for this purpose I need the shortest possible code for reading a resource as a string. To make it compatible with any version of autoit. If it have any interest, I can release it when it's ready Edited January 30, 2016 by legend Mobius 1 Link to comment Share on other sites More sharing options...
Mobius Posted January 30, 2016 Share Posted January 30, 2016 44 minutes ago, legend said: Hi didn'tous, thank's for your help, i t's very appreciated :). But the message it returns is : http://prntscr.com/9wu4i1 Aw shucks Legolas too bad it it didn't work for you when you ported it to your code. Heres what I posted already built and working fine with au3 3.3.14.2 Through AutoCamo obviously Legless.7z Link to comment Share on other sites More sharing options...
legend Posted January 30, 2016 Author Share Posted January 30, 2016 Never mind, my mistake, it works perfect Thank's a lot Mobius, I will show you my project when it's finished =) Link to comment Share on other sites More sharing options...
Mobius Posted January 30, 2016 Share Posted January 30, 2016 6 minutes ago, legend said: Never mind, my mistake, it works perfect Thank's a lot Mobius, I will show you my project when it's finished =) I would enjoy that thanks Legend. Link to comment Share on other sites More sharing options...
Mobius Posted January 30, 2016 Share Posted January 30, 2016 45 minutes ago, guinness said: What is wrong with the Resources UDF? Quite right, Legend here is the link to that should you need it for reference, works with old and new builds of AutoIt Resources UDF Link to comment Share on other sites More sharing options...
guinness Posted January 30, 2016 Share Posted January 30, 2016 1 hour ago, Mobius said: Quite right, Legend here is the link to that should you need it for reference, works with old and new builds of AutoIt Resources UDF Not quite, it's broken on new versions. My doesn't though. 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 parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
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