Leaderboard
Popular Content
Showing content with the highest reputation on 08/05/2015 in all areas
-
CodeCrypter enables you to encrypt scripts without placing the key inside the script. This is because this key is extracted from the user environment at runtime by, for example: password user query any macro (e.g., @username) any AutoIt function call any UDF call some permanent environment variable on a specific machine (and not created by your script) a server response a device response anything else you can think of, as long as it's not stored in the script any combination of the above You need several scripts to get this to work, and they are scattered over several threads, so here's a single bundle that contains them all (including a patched version of Ward's AES.au3; with many thanks to Ward for allowing me to include this script here): Latest version: 3.4 (3 Dec 2021): please follow this link. Note: if you experience issues under Win8/8.1 (as some users have reported), please upgrade to Win10 (or use Win7) if you can; as far as I can tell, the scripts in the bundle all work under Win7 & Win10 (and XP). Moreover, I have no access to a Win8 box, so these issues will not be fixed, at least not by yours truly. How the bits and pieces fit together: CodeCrypter is a front-end for the MCF UDF library (you need version 1.3 or later). Its thread is here: '?do=embed' frameborder='0' data-embedContent>> The MCF package (also contained in the CodeScannerCrypter bundle) contains MCF.au3 (the library itself) plus a little include file called MCFinclude.au3. The latter you have to include in any script you wish to encrypt. Any code preceding it will not be encrypted, any code following it will be encrypted. You define the dynamic key inside MCFinclude.au3, in the UDF: _MCFCC_Init(). From the same post you can download an MCF Tutorial which I heartily recommend, because encrypting a script requires a number of steps in the right order, namely: In MCFinclude.au3, define and/or choose your dynamic key(s) (skip this step = use default setting) include MCFinclude.au3 in your target script Run CodeScanner (version 2.3+) on your target script, with setting WriteMetaCode=True (see '?do=embed' frameborder='0' data-embedContent>>), then close CodeScanner. Start CodeCrypter press the Source button to load your target file enable Write MCF0 (tick the first option in Main Settings) Enable "Encrypt" (last option in the Main Settings) Go to the Tab Encrypt and set up the encryption the way you want (skip this = use default settings) Return to Main Tab and press "Run" if all goes well, a new script called MCF0test.au3 is created in the same directory as your target. It has no includes and no redundant parts. Please check that it works as normal. (see Remarks if not) It all sounds far more complicated than it is, really. Not convinced? Check out: a simple HowTo Guide: HowToCodeCrypt.pdf an updated and extended Q & A pdf (FAQ, also included in the bundle) to help you get started:CodeCrypterFAQ.pdf For additional explanations/examples in response to specific questions by forum members (how it works, what it can/cannot do), see elsewhere in this thread, notably: Simple analogy of how it works: post #53, second part General Explanation and HowTo: post #9, 51, 75, 185/187, 196, 207, 270, 280 (this gets a bit repetitive) BackTranslation: post #179 Obfuscation: post #36 (general), 49 (selective obfuscation) Specific features and fixes: post #3 (security), 84 (redefining the expected runtime response), 169 (Curl Enum fix), 185/187 (using license keys), 194 (replacing Ward's AES UDF with different encryption/decryption calls), 251 (AV detection issue), 262 (extract key contents to USB on different target machine prior to encryption) Limitations: post #26 (@error/@extended), 149 (FileInstall), 191 (AES.au3 on x64) Not recommended: post #46/249 (static encryption), 102 (programme logic error), 237 (parsing password via cmdline) Technical notes: BackTranslation is a test to check that the MetaCode translation worked. Skip it at your peril. It also turns your multi-include composite script into a single portable file without redundant parts (you can opt to leave the redundant parts in, if you want). CodeCrypter can also obfuscate (vars and UDF names) and replace strings, variable names and UDF names with anything else you provide, for example, for language translation). After CodeScanner separates your target's structure from its contents, CodeCrypter (actually MCF, under the hood) can change any part, and then generate a new script from whichever pieces you define. See the MCF Tutorial for more explanation and examples. Encryption currently relies on Ward's excellent AES UDF and TheXman's sophisticated CryptoNG bundle. You can replace these with any other algorithm you like (but this is not trivial to do: edit MCFinclude.au3 UDF _MCFCC(), and MCF.au3 UDF _EncryptEntry(), see post #194 in this thread). AES by Ward, and CryptoNG by TheXman are also included in the bundle (with many thanks to Ward and TheXman for graciously allowing me to republish their outstanding work). Going to lie down now... RT1 point
-
AutoIt v3.3.14.0 has been released. Thanks to everyone involved, both visible and behind the scenes. Download it here. Complete list of changes: History Note The Map functionality was disabled in this release as it was not ready. I will release another beta version later with it re-enabled for continued dev and test.1 point
-
Hedge Hunter | Engine/Game/Benchmark
Xandy reacted to AdmiralAlkex for a topic
@Xandy It's in the sdl.au3 in the first post here. This was released after I had stopped actively developing the UDF so it's thread was never updated with the handful of functions made after that...1 point -
@Softlock & @Ahmed_Softlock, do you guys know eachother or do you need a miror to ask the other? Jos1 point
-
I'm glad that the problem finally could be solved I hate it when things don't work - and I don't know why!1 point
-
Thanks Jos, I have tested it and I can confirm it's fine now.1 point
-
You could try with CDO. It would be something like this $sEML = "sample.eml" $sAttachment = "canada plane.jpg" $iSize = GetAttachmentSize($sEML, $sAttachment) If @error Then $sErrDesc = "You can't use this method because " Switch @error Case 1 $sErrDesc &= "CDO sucks for you." Case 2 $sErrDesc &= "getting stream failed." Case 3 $sErrDesc &= "loading EML failed." Case 4 $sErrDesc &= "of some dumb error." Case 5 $sErrDesc = "No such attachment exists." EndSwitch MsgBox(4096, "Error", $sErrDesc & @CRLF) Else MsgBox(4096, "...", 'Attachment named "' & $sAttachment & '" is ' & $iSize & " bytes big" & @CRLF) EndIf Func GetAttachmentSize($sEMLPath, $sAttachmentName) Local $oErrHandler = ObjEvent("AutoIt.Error", GetAttachmentSize) ; Red Jon fucked up COM Local $oMessage = ObjCreate("{CD000001-8B95-11D1-82DB-00C04FB1625D}") ; with all the downsides If @error Then Return SetError(1, 0, -1) Local $oMessageStream = $oMessage.GetStream() If @error Then Return SetError(2, 0, -1) $oMessageStream.LoadFromFile($sEMLPath) If @error Then Return SetError(3, 0, -1) $oMessageStream.Flush() ; this is essential Local $iSize For $oAttachment In $oMessage.Attachments If $oAttachment.FileName = $sAttachmentName Then $iSize = $oAttachment.GetDecodedContentStream().Size If @error Then Return SetError(4, 0, -1) If $iSize Then Return $iSize Next Return SetError(5, 0, -1) EndFuncIf you want the size of all attachments then just add up to $iSize inside the loop and remove second parameter.1 point
-
Consolewrite id.html or id.name ir id.innerHTML to see if you have the right object. Also get an array of all buttons to see if you have the right one.1 point
-
Thanks ... This should now be fixed in the current beta version of Tidy. Jos1 point
-
VMworld
jvanegmond reacted to JLogan3o13 for a topic
Sooo, I ran tests on the new NexGen SAN for VDI loads, vs. the old EMC SAN, about 40% slower Not sure how they expect me to sell this at the conference.1 point -
"Show For Files" is a simple app resident in the system tray, allows to easily toggle show/hide of files extensions, hidden files, system files (a.k.a "super hidden files"), and files selection checkboxes: Notes: checkmarks are updated at the tray menu items as they change in the registry, even when changed manually or by other means. showing system files implies showing hidden files (but not vice-versa). this is reflected in the checkmarks. this app does NOT apply to 3rd-party files managers (unless they respect Windows settings). all Windows Explorer windows are refreshed when this app changes any settings. click the tray menu header to jump to this page. additional features may be added as i find useful. Script: #region AutoIt3Wrapper directives section #AutoIt3Wrapper_Au3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #AutoIt3Wrapper_Icon=ShowForFiles.ico #AutoIt3Wrapper_UseUpx=N #AutoIt3Wrapper_Res_Comment=https://www.autoitscript.com/forum/topic/174503-tray-menu-to-showhide-files-extensions-hidden-system-files-and-selection-checkboxes/ #AutoIt3Wrapper_Res_Description=Modifies the folder view to show/hide various file options. #AutoIt3Wrapper_Res_Fileversion=0.3.0.0 #AutoIt3Wrapper_Res_ProductVersion=0.3 #AutoIt3Wrapper_Res_LegalCopyright=n/a #AutoIt3Wrapper_Res_Field=ProductName|Show For Files #AutoIt3Wrapper_Run_Au3Stripper=y #Au3Stripper_Parameters=/SO /RM #endregion AutoIt3Wrapper directives section #cs - ref: http://www.askvg.com/create-simple-script-to-show-hide-file-extensions-in-windows-xp-vista-and-7/ http://www.askvg.com/create-simple-script-to-show-hide-hidden-files-and-folders-in-windows-xp-vista-and-7/ http://www.askvg.com/create-simple-script-to-show-hide-checkbox-to-select-items-in-windows-xp-vista-and-7/ #ce #NoTrayIcon #include <Constants.au3> Opt('TrayOnEventMode', 1) Opt('TrayMenuMode', 1) ; Default tray menu items (Script Paused/Exit) will not be shown. but AUTO-TOGGLE CHECKMARK is still ON, which is ok. Global $tHeader = TrayCreateItem('Show For Files:') TrayItemSetOnEvent(-1, 'Header') TrayItemSetState(-1, $TRAY_DEFAULT) Global $tExt = TrayCreateItem(' Extensions') TrayItemSetOnEvent(-1, 'ShowExt') Global $tHid = TrayCreateItem(' Hidden Files') TrayItemSetOnEvent(-1, 'ShowHid') Global $tSys = TrayCreateItem(' System Files') TrayItemSetOnEvent(-1, 'ShowSys') Global $tBox = TrayCreateItem(' Checkboxes') TrayItemSetOnEvent(-1, 'ShowBox') TrayCreateItem('') TrayCreateItem('Exit') TrayItemSetOnEvent(-1, '_Exit') TraySetState() TraySetToolTip(Chr(0)) While True UpdateCheckmarks() Sleep(100) WEnd Func UpdateCheckmarks() If RegRead('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced', 'HideFileExt') = 1 Then TrayItemSetState($tExt, $TRAY_UNCHECKED) Else TrayItemSetState($tExt, $TRAY_CHECKED) EndIf If RegRead('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced', 'Hidden') = 1 Then TrayItemSetState($tHid, $TRAY_CHECKED) Else TrayItemSetState($tHid, $TRAY_UNCHECKED) EndIf If RegRead('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced', 'ShowSuperHidden') = 1 Then TrayItemSetState($tSys, $TRAY_CHECKED) Else TrayItemSetState($tSys, $TRAY_UNCHECKED) EndIf If RegRead('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced', 'AutoCheckSelect') = 1 Then TrayItemSetState($tBox, $TRAY_CHECKED) Else TrayItemSetState($tBox, $TRAY_UNCHECKED) EndIf EndFunc ;==>UpdateCheckmarks Func _Update_Explorer() ; ref: https://www.autoitscript.com/forum/topic/95139-update-refresh-windows-explorer/ Local $bOld = Opt("WinSearchChildren", True) Local $a = WinList("[CLASS:SHELLDLL_DefView]") For $i = 0 To UBound($a) - 1 DllCall("user32.dll", "long", "SendMessage", "hwnd", $a[$i][1], "int", 0x111, "int", 28931, "int", 0) Next Opt("WinSearchChildren", $bOld) EndFunc ;==>_Update_Explorer Func Header() ShellExecute('https://www.autoitscript.com/forum/topic/174503-tray-menu-to-showhide-files-extensions-hidden-system-files-and-selection-checkboxes/') TrayItemSetState($tHeader, $TRAY_UNCHECKED) EndFunc ;==>Header Func ShowExt() If BitAND(TrayItemGetState($tExt), $TRAY_UNCHECKED) Then RegWrite('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced', 'HideFileExt', 'REG_DWORD', 1) Else RegWrite('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced', 'HideFileExt', 'REG_DWORD', 0) EndIf _Update_Explorer() EndFunc ;==>ShowExt Func ShowHid() If BitAND(TrayItemGetState($tHid), $TRAY_UNCHECKED) Then RegWrite('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced', 'Hidden', 'REG_DWORD', 0) Else RegWrite('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced', 'Hidden', 'REG_DWORD', 1) EndIf _Update_Explorer() EndFunc ;==>ShowHid Func ShowSys() If BitAND(TrayItemGetState($tSys), $TRAY_UNCHECKED) Then RegWrite('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced', 'ShowSuperHidden', 'REG_DWORD', 0) Else RegWrite('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced', 'ShowSuperHidden', 'REG_DWORD', 1) RegWrite('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced', 'Hidden', 'REG_DWORD', 1) ; show system files implies show hidden files EndIf _Update_Explorer() EndFunc ;==>ShowSys Func ShowBox() If BitAND(TrayItemGetState($tBox), $TRAY_UNCHECKED) Then RegWrite('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced', 'AutoCheckSelect', 'REG_DWORD', 0) Else RegWrite('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced', 'AutoCheckSelect', 'REG_DWORD', 1) EndIf _Update_Explorer() EndFunc ;==>ShowBox Func _Exit() Exit EndFunc ;==>_Exit Download: save the script as "ShowForFiles.au3" and download the attached icon to compile (until i figure out how to upload the 817 KB compiled exe to the forum). ShowForFiles.ico EDIT: minor fix - clicking the header no longer triggers a checkmark on the header.1 point
-
Automate Activation of Game Key for Steam Client
MuffinMan reacted to ViciousXUSMC for a topic
Well I took a (short) look at IUIAutomation this weekend and got Autoit to find and activate the Steam Client window as the Info Finder tool pretty much gave me that part of the code. It does not let me see any of the elements inside of the window like the "file" options. I think based on some of the examples that this maybe normal behavior and I need to use the _UIA_DumpThemAll() to get my elements. I ran out of time before I figured out all the stuff to plug into the code and how to find the results. It will take some more time for sure but in the end I should learn a new valuable skill.1 point -
Help with guicntrlsetdata
SerLanceloth reacted to kylomas for a topic
SirLanceLoth, GUICtrlSetData($Edit1, "text to appear in the input :" & GUICtrlRead($Input1)& @CRLF, 1)kylomas1 point -
Wingens, Glad you found the answer useful - we are all guilty of overcomplicating things from time to time. But I am afraid I have no idea about the other problem - although I do see you have a thread running on that question so I will reply there if anything comes to mind. M231 point
-
Amending the FAQ in the help file.
squareroot2news reacted to BrewManNH for a topic
Q: How do I do "X" A: Read the help file Q: But now I want to do "Y" too, how do I do that? A: Read the help file, and search the forums because it's been answered 1000 times already.1 point -
Include source after copmpiling
MuffinMan reacted to JLogan3o13 for a topic
Hi, LuxiVDN. This is how I do it, in case I do something stupid and delete my source (not that that ever happens) Using this method, the source file only gets put onto the machine when you want it, not every time you run the script. You can make the switch for your command line anything you would like. In this case, if you execute "MySource.exe" /Extract from the Run line, it will extract the source code and then exit without actually running through the script. If StringInStr($cmdlineRaw, "/Extract") Then FileInstall("C:MySource.au3", @TempDir & "MySource.au3", 1) Exit EndIf1 point -
Communicate between 2 scripts
guestscripter reacted to Melba23 for a topic
FSoft, search for "+inter +script +communication" and you will find lots of threads showing various ways of doing it. My personal favourite is trancexx's MailSlot. M231 point