Leaderboard
Popular Content
Showing content with the highest reputation on 01/25/2018 in all areas
-
@TheSaint no problem, bear in mind I am working (slowly) on a new spy to integrate all different spying tools so far seen. Will have different tabs with more/les information, more different ways of example coding (plain MS UIA, wrapped, pageobjects in separate files) a certain control.3 points
-
Find keyword with condition
Earthshine and one other reacted to JLogan3o13 for a topic
@mrsamsum welcome to the forum. You will find you will not receive much help asking folks to do your work for you. This forum is dedicated to helping people improve their own scripts. It is not a place where you put in an order and someone barfs up the code for you. I would suggest reading through the help file under IE Management, or look at the IUIAutomation thread under the Examples forum, to get an idea of how to begin. Once you have done some reading, and have tried a few things on your own, if you run into any issues post what code you have in this thread and we will do our best to assist2 points -
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
-
1 point
-
1 point
-
For those of you interested in .bat
JLogan3o13 reacted to Jos for a topic
Yea, he is known for his rudeness and would just ignore him if I were you. On the other side you could simply try to understand what he is telling you as you are simply not making too much sense, but guess now I am rude to you ....right? What the hell....fuck it. *click* Jos1 point -
Solved:Tidy text file
Earthshine reacted to abdulrahmanok for a topic
Ty very much @Earthshine after playing around Finally I did it : #include<array.au3> ;#include '_Startup.au3' #include <Date.au3> #include<File.au3> dim $foundedNUM $fileToRead = @ScriptDir & "\Test.txt" ;###################################### Load Days Local $FileRead = FileRead($fileToRead) $aTxt = StringRegExpReplace($FileRead & @CRLF, "(.*?)(\r\n)(.*?)(\r\n)", "$1,");Read first line to array $aTxt = StringSplit($aTxt, ",") _ArrayDelete($aTxt, 0) ;Delete Total Rows Value Dim $Arraytofill[1] For $i = 0 to UBound($aTxt,1) -1 ;$aDate = StringSplit($aTxt[$i],"-") ;~ If UBound($aDate,1)=2 Then ; If not enough array rows Exitloop ;~ ExitLoop ;~ EndIf ;$Convert = StringReplace($aDate[3],$aDate[3],@YEAR) & "/" & StringReplace($aDate[2],$aDate[2],@MON) & "/" &$aDate[1] ;$old=$aTxt[$i] _ArrayAdd($Arraytofill,$aTxt[$i]) ;MsgBox(0,"Old: "&$aTxt[$i], $Convert) Next _ArrayDelete($Arraytofill, 0) ;Delete Total Rows Value _ArraySort($Arraytofill) _ArrayDisplay($Arraytofill,"$Arraytofill") $aTxt2 = StringRegExpReplace($FileRead & @CRLF, "(.*?)(\r\n)(.*?)(\r\n)", "$3,");Ready line and pass line $aTxt2 = StringSplit($aTxt2, ",");Ready line and pass line _ArrayDelete($aTxt2, 0) ;Delete Total Rows Value Dim $final_array[1] For $i = 0 to UBound($Arraytofill,1)-1 ;ConsoleWrite(@CRLF&$aTxt[$i]) $getLine=_LineNumsOfSearchStr($fileToRead,$Arraytofill[$i]) $Second_Line=FileReadLine($fileToRead,$foundedNUM+1) ;ConsoleWrite(@CRLF&"Next Line is: "&$Second_Line) _ArrayAdd($final_array,$Second_Line) Next _ArrayDelete($final_array, 0) ; _ArrayDisplay($final_array) For $i = 0 to UBound($Arraytofill,1)-1 ConsoleWrite(@CRLF&$Arraytofill[$i]) ConsoleWrite(@CRLF&$final_array[$i]) ;FileWrite($fileToRead,@crlf&$Arraytofill[$i]) ;FileWrite($fileToRead,@crlf&$final_array[$i]) Next Func _LineNumsOfSearchStr($sFileName, $searchString, $bDeleteLine = False) Local $location, $aCurrentLineNum, $iCurrentLineNum, $sFile, $iOccur = 1, $sRes = "" If FileExists($sFileName) = 0 Then Return 1 Do $sFile = FileRead($sFileName) $location = StringInStr($sFile, $searchString, 0, $iOccur) ; Find the $iOccur occurrence of the "substring" If $location > 0 Then $aCurrentLineNum = StringRegExp(StringRegExpReplace($sFile, "(?s)(.{" & $location & "})(.*)$", "\1"), "(?s)(\v+)", 3) ;Find line number $iCurrentLineNum = UBound($aCurrentLineNum) + 1 ; Line number $foundedNUM=$iCurrentLineNum ;Consolewrite(@crlf&"Founded Date Line Is: "&$foundedNUM&@crlf) ; _FileWriteToLine($sIniFile, 1, $iCurrentLineNum, True) ;ConsoleWrite("CharPos: " & $location & " Ln: " & $iCurrentLineNum & @CRLF) $sRes &= $iCurrentLineNum & "|" If $bDeleteLine Then Else $iOccur += 1 EndIf Else ExitLoop EndIf Sleep(10) Until 0 FileClose($sFile) ;ShellExecute($sFileName) Return StringSplit(StringTrimRight($sRes, 1), "|") EndFunc ;==>_LineNumsOfSearchStr Result: 01-Jan-18 Is : Value for Jan1 02-Jan-18 Is : Value for Jan2 03-Jan-18 Is : Value for Jan31 point -
Solved:Tidy text file
abdulrahmanok reacted to Earthshine for a topic
try this. added an _ArraySort with default paramters. Read the help file regarding For Loops for how to access all the elements of your array later in your program once built. #include<array.au3> ;#include '_Startup.au3' #include <Date.au3> #include<File.au3> $fileToRead = @ScriptDir & "\Test.txt" ;###################################### Load Days Local $FileRead = FileRead($fileToRead) & @CRLF $aTxt = StringRegExpReplace($FileRead & @CRLF, "(.*?)(\r\n)(.*?)(\r\n)", "$1,");Read first line to array $aTxt = StringSplit($aTxt, ",") ;_ArrayDisplay($aTxt) ;$sDate = $aTxt[1] ;$aDate = StringSplit($sDate,"-") Dim $Arraytofill[1] For $i = 1 to UBound($aTxt) $aDate = StringSplit($aTxt[$i],"-") If UBound($aDate,1)=2 Then ; If not enough array rows Exitloop ExitLoop EndIf $Convert = StringReplace($aDate[3],$aDate[3],@YEAR) & "/" & StringReplace($aDate[2],$aDate[2],@MON) & "/" &$aDate[1] $old=$aTxt[$i] _ArrayAdd($Arraytofill,$Convert) ;MsgBox(0,"Old: "&$aTxt[$i], $Convert) Next _ArraySort($Arraytofill) _ArrayDisplay($Arraytofill) $iDateCalc = _DateDiff( 'D',$Arraytofill[2],$Arraytofill[1]) MsgBox( 4096, "", "Resault " & $iDateCalc ) if $iDateCalc >=1 Then MsgBox(0,"","This line must go down") Else MsgBox(0,"","Keep line") EndIf1 point -
Solved:Tidy text file
abdulrahmanok reacted to Earthshine for a topic
that code does not compile. How about the whole thing? I will assist you, but I won't do your work for you.1 point -
1 point
-
Updated to v0.1.0.3 https://github.com/Danp2/WebDriver/releases/latest1 point
-
So, the regex way... because it allows such a variation $NumberOfVars = _StringSplitToVar("0017-0008 0017 l2a 1 -18407.00 5110.90 0.00 0.03 -70735.59" , "\S+") For $k = 0 to $NumberOfVars msgbox(0, '' , eval("StringToVar" & $k)) Next Func _StringSplitToVar($sStr , $what_to_get) Local $aString = StringRegExp($sStr , $what_to_get, 3) For $i = 0 To UBound($aString)-1 assign("StringToVar" & $i , $aString[$i] , 2) Next return UBound($aString)-1 EndFunc1 point
-
Regnumkey
nitron reacted to JLogan3o13 for a topic
@nitron that is why I typically use WMI: Local $oWMI = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") If IsObj($oWMI) Then $aSystem = $oWMI.ExecQuery("Select * from Win32_Product") For $oApp In $aSystem ConsoleWrite("Application: " & $oApp.Name & " Version: " & $oApp.Version & @CRLF) Next Else ConsoleWrite("Unable to connect to WMI" & @CRLF) EndIf People with debate WMI vs. Registry; neither is perfect, and WMI can run a little slowly, but I find it less of a headache.1 point -
Get property/status of control from _UIA_getObjectByFindAll
Earthshine reacted to VBScab for a topic
@junkew, The function name is actually 'IsObj' but thanks for the pointer! All working now1 point -
Get property/status of control from _UIA_getObjectByFindAll
Earthshine reacted to junkew for a topic
check on isobj($objKey_Finish,"click")) highlighting helps _UIA_action($objKey_Finish,"highlight") _uia_getPropertyValue($objKey_Finish,"<your property") See UIWrapper source for details on the properties you can get1 point -
1 point
-
I wanna keep a script running
careca reacted to Moonscarlet for a topic
Hello, How about using WinExists()? $Title = "flypop" While 1 If WinExists($Title) Then ControlSend($Title,"","","{ENTER}") Sleep(10) WEnd Or this (in case ControlSend() isn't enough): $Title = "flypop" While 1 If WinExists($Title) Then WinActivate($Title) WinWaitActive($Title) Send("{ENTER}") EndIf Sleep(10) WEnd1 point -
@junkew - Thanks for your UDF. I am coming to grips with it for the first time, not used it before. One thing that held me up a bit at the start, was waiting for something to show while hovering the mouse over a control. It would have been better, if you had written - Hover your mouse over the element you want to handle & Press ctrl+w in one line. Just a little thing, but it flummoxed me for a bit. I hope you don't mind that I made some basic changes to your simplespy.au3 script. I wanted a narrower window (200 less) and the window always set ON TOP, plus I wanted elements listed one under the other rather than tabbed across the edit field, and a blank line between each grouping. Hopefully I have not done anything I shouldn't have. Dcoder said I should share so I am ... so he's the one to blame, not me if something is amiss. Here it is folks. Backup your copy of junkew's original, and use my modified version instead ... if you dare. simplespy.au3 I've not read all 32 pages of this topic, so have no idea if anyone else has made any improvements. Thanks again junkew. Gawd, the pest Dcoder also wants a screenshot ... is there no escape from his demands.1 point
-
System Microphone
Draygoes reacted to gruntydatsun for a topic
Use devcon http://ccm.net/faq/1886-enable-disable-a-device-from-the-command-line https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/devcon1 point -
click a button on a webpage
sumandevadiga reacted to JLogan3o13 for a topic
@sumandevadiga you have been around long enough to know better than to resurrect an 11 year old post. AutoIt has changed a lot in 11 years, what worked then may not work as well now. I have broken your post out into its own thread this time; please do not hijack threads in the future.1 point -
click a button on a webpage
sumandevadiga reacted to Danp2 for a topic
You are clicking the wrong element. You need to focus your efforts on this one -- <div class="menu_head">POD images</div>1 point -
$NumberOfVars = _StringSplitToVar("0017-0008 0017 l2a 1 -18407.00 5110.90 0.00 0.03 -70735.59" , " ") For $k = 1 to $NumberOfVars msgbox(0, '' , eval("StringToVar" & $k)) Next Func _StringSplitToVar($sStr , $delim) Local $aString = StringSplit($sStr , $delim) For $i = 1 To $aString[0] assign("StringToVar" & $i , $aString[$i] , 2) Next return $aString[0] EndFunc1 point
-
Using VMware to access network shared files
davidacrozier reacted to jdelaney for a topic
These ones: DriveMapDel DriveMapAdd FileDelete _FileCreate1 point -
Using VMware to access network shared files
davidacrozier reacted to JLogan3o13 for a topic
I'm sorry, I am confused. You state you are running in VMware workstation, but you reference ESXi, which is a vSphere product. Have you created an embedded ESXi host in Workstation? If so to what end? And do you understand you are not going to be able to remote to a share on ESXi as you would a windows box, you would need to use esxcli or putty?1 point -
Using VMware to access network shared files
davidacrozier reacted to rootx for a topic
If WMware setting is ok.... try to clean and restart the service with CMD command net use \\yourrespath /d sc stop Server && sc start Server Paid attention on WmWare setting Devices staus and the rest choice Bridge Nat etc....1 point