
a6m1n0
Active Members-
Posts
23 -
Joined
-
Last visited
Everything posted by a6m1n0
-
Make the window active, wait for it to be active, get the now active window coordinates, now that it's active send an ENTER key-- or move the mouse pointer and perform a click. It will amaze your friends. Or scare them? Not certain.
-
Very inventive idea guys! It is interesting what people come up with using AutoIt.
-
Check the value of $Sid...what you are posting is: "thesid" - not - thesid Follow me? That funtion you are using is trimming left and right -1 char, so what's left is the sid wrapped in quotation marks. Might be the problem, might not be.
-
Well I'll be damned. When you're wrong you are just wrong, and wrong I was, lol. I ran a test (attached) and it seems that I didn't do enough testing. But I have a good excuse. My first attempt using RC4 in AutoIt was _StingEncrypt. My second attempt was using RazerM's _StringEncryptRC4/_StringDecryptRC4 BUT I did not realize that the HEX conversion was called from within that UDF, and I was using it like _StringToHexEx(_StringEncryptRC4($mytext,$mypass)) and hence the assumed incompatibility. My third attempt was using Valik's script, and to be honest I can't remember what I was doing with it, but whatever it was it was not producing compatible results -- by this time it was early morning and I was to tired to worry about it deciding that I just needed to port it from something I knew worked. So, I stand corrected and apologies all around -- your script Valik, as well as your script RazerM, both work fine. I can at least say I learned a great deal about porting ASP VBScript to AutoIt3. The only bonus my UDF seems to have is that it is defined as one function instead of two, otherwise it produces the same results. RC4Test.au3
-
My apologies if I gave you the impression your code was wrong or broken, but I never stated that the your RC4 UDF or the others available here were 'wrong' or 'broken'. I stated they were incompatible with the implementations that I use in other programming languages. I am no expert in cryptography just a user of the methods. However, the scope of my current project require using AutoIt to interface with my existing code base, some of which was acquired from the links in my first post. Otherwise your RC4 implementation as well as the others offered here seem to work fine within AutoIt3 itself. EDIT: I planned to post a 'thank you' directly after posting this with a thorough explanation but was called away from my computer before I had a chance. So, Thank you for digging up your old code and posting it -- if I weren't in need of interfacing with RC4 implementations I already have then it would have been fine I am certain.
-
What is posted I ported from ASP VBScript to AutoIt3 as the syntax was the most similar. Tested with ASP VBScript, PHP with mcrypt, and Flash AsCrypt Library. Please note that I use the _StringToHex and _HexToString UDF's to handle the case of non-printable characters. Also note that the same function is used to decrypt as well as encrypt. Func _RC4Crypt($plaintxt, $psw) Local $sbox[256] Local $key[256] Local $temp, $a, $k, $cipherby, $cipher, $tempSwap, $aa, $bb, $intLength Local $i = 0 Local $j = 0 $intLength = StringLen($psw) For $aa = 0 To 255 $key[$aa] = Asc(StringMid($psw, Mod($aa,$intLength)+1, 1)) $sbox[$aa] = $aa Next $bb = 0 For $aa = 0 To 255 $bb = Mod(($bb + $sbox[$aa] + $key[$aa]), 256) $tempSwap = $sbox[$aa] $sbox[$aa] = $sbox[$bb] $sbox[$bb] = $tempSwap Next For $a = 1 To StringLen($plaintxt) $i = Mod(($i + 1), 256) $j = Mod(($j + $sbox[$i]), 256) $temp = $sbox[$i] $sbox[$i] = $sbox[$j] $sbox[$j] = $temp $k = $sbox[Mod(($sbox[$i] + $sbox[$j]), 256)] $cipherby = BitXOR(Asc(StringMid($plaintxt, $a, 1)), $k) $cipher &= Chr($cipherby) Next Return $cipher EndFunc; _RC4CryptoÝ÷ ØLZ^RÆ y«¢+Ø¥¹±Õ±ÐíÍÑÉ¥¹¹ÔÌÐì(¥¹±Õ±ÐíIйÔÌÐì)¥´ÀÌØíµåÁḬ́ÀÌØíµåÑáаÀÌØíµå¹ÑáаÀÌØíµå¡á¹ÑáаÀÌØíµåÑáаÀÌØíµ½áÑáÐ(ÀÌØíµåÁÍÌôÅÕ½ÐìÄÈÌÐÔØÅÕ½Ðì(ÀÌØíµåÑáÐôÅÕ½ÐíQ¡¥Ì¥ÌͽµÑáÐѼ¹ÉåÁСɸÅÕ½Ðì(ÀÌØíµå¹ÑáÐô}MÑÉ¥¹Q½!à¡}IÑ ÉåÁÐ ÀÌØíµåÑáаÀÌØíµåÁÍ̤¤(ÀÌØíµåÑáÐô}IÑ ÉåÁС}!áQ½MÑÉ¥¹ ÀÌØíµå¹ÑáФ°ÀÌØíµåÁÍ̤(ÀÌØíµ½áÑáÐôÅÕ½ÐìÅÕ½Ðì(ÀÌØíµ½áÑáеÀìôÅÕ½ÐíAÍÍݽÉèÅÕ½ÐìµÀí I1µÀìÀÌØíµåÁÍ̵Àí I1µÀí I1(ÀÌØíµ½áÑáеÀìôÅÕ½ÐíQáÐMÑÉ¥¹èÅÕ½ÐìµÀí I1µÀìÀÌØíµåÑáеÀí I1µÀí I1(ÀÌØíµ½áÑáеÀìôÅÕ½Ðí!`ÌäíIйÉåÁÑèÅÕ½ÐìµÀí I1µÀìÀÌØíµå¹ÑáеÀí I1µÀí I1(ÀÌØíµ½áÑáеÀìôÅÕ½Ðí!`ÌäíIÐÉåÁÑÅÕ½ÐìµÀí I1µÀìÀÌØíµåÑáеÀí I1µÀí I1)5Í ½à À°ÅÕ½ÐìÅÕ½Ðì°ÀÌØíµ½áÑáаÈÀ¤ I hope someone finds this useful.
-
I know that this is an ancient post, but can anyone provide the missing au3 source for Valik's script? I am having problems interfacing with 'true RC4' algorithm in both ASP and PHP+mcrypt with _StringEncrypt and _StringEncryptRC4. Thanks
-
How to read from/write to binary files?
a6m1n0 replied to a6m1n0's topic in AutoIt General Help and Support
Awesome. Thanks for the tip MSLxFanboy...I'm on it. -
Does AI have native abilities to read from and write to binary files, or will I have to use a Dll? Any info on this would be great. Thanks
-
AutoIt3 capable of reading ASCII data from console?
a6m1n0 replied to a6m1n0's topic in AutoIt General Help and Support
Global $cmdOUT = '' $PID = Run(@ComSpec & " /c find /i ""##"" c:\dynaswish.sol", "", @SW_HIDE, 2 ) While NOT @ERROR $cmdOUT &= StdoutRead($PID);returns nothing Wend MsgBox(1, "dynaswish.sol:", $cmdOUT) Works like a charm! Thanks for the examples and tips! -
I have searched/read these forums and the AutoIt help file and cannot seem to return to string a line of text that has ASCII characters in it, and to be honest I need everything *but* the ASCII data. For those unfamiliar with Flash, the type of file is a Flash *.sol (Shared Objects) file that is generated by Flash Projector file (movie.swf=>movie.exe). This is typically ran from a distributed presentation CD. The data that is returned at the console if: type c:\sharedobject.sol >test.txt Is: ¿ /TCSO sharedobject param ##1test.ext The only data I want/need is the ##1test.ext. Thats it, thats all I want. The methods I've tried thus far: ;found at: http://www.autoitscript.com/forum/index.php?s=&showtopic=15422&view=findpost&p=106049 #include <Constants.au3> Global $cmdOUT = '' $PID = Run("type c:\sharedobject.sol", "", @SW_HIDE, $STDOUT_CHILD) While NOT @ERROR $cmdOUT =& StdoutRead($PID);returns nothing $cmdOUT =& StdoutRead($PID, 0, 1);returns nothing $cmdOUT =& StdoutRead($PID, 50, 1);returns nothing Wend MsgBox(1, "dynaswish.sol:", $cmdOUT) And I've tried straight from the AI help file: $file = FileOpen("c:\sharedobject.sol", 0) ; Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ; Read in lines of text until the EOF is reached While 1 $line = FileReadLine($file) ;If @error = -1 Then ExitLoop MsgBox(0, "Line read:", $line) Wend FileClose($file) Is this even possible? Thanks for any input.
-
How to find file and return it's path to string
a6m1n0 replied to a6m1n0's topic in AutoIt General Help and Support
Awesome tip Digetal--That was the problem on this end. I downloaded the v3.1.1.75 (beta) zip file, after backing up the autoit program directory I unzipped the files, ran SciTe and a Beta Run--did not return any errors. Thanks for the help! Hope I can return the favor sometime. -
How to find file and return it's path to string
a6m1n0 replied to a6m1n0's topic in AutoIt General Help and Support
Ok, I think I need to upgrade to the latest Beta version. Again Thanks for the help Digetal...I'll give it a go and reply back here. EDIT: And yeah, I only use SciTe for builds and runs. -
How to find file and return it's path to string
a6m1n0 replied to a6m1n0's topic in AutoIt General Help and Support
Thanks for the help Digetal. I am trying to keep from having to write a temp file somewhere since this can cause problems with what I am trying to do, and would take to long to explain here--nothing top secret or anything, just would take to long. There has to be way to do this without writing a tmp file though, isn't there? I do appreciate the help and the swift reply, just need to know if this is possible or not with that script; well JdEb would know for certain I'm sure since it's his script. Thanks -
How to find file and return it's path to string
a6m1n0 replied to a6m1n0's topic in AutoIt General Help and Support
Ok, I cannot seem to get Larry's function to return a path and I am sure it is because I am a newb and am still learning. Let me rephrase: it returns all paths relative to the root directory of the drive--and this I am sure is beacause I modified the code (just what I mentioned above only), but only b/c out of the box it didn't work at all, and again I am sure this also is attributed to my newbness. :"> Since I need sciprts that are more 'out-of-the-box' so to speak until I can get the hang of this, I searched again for 'findfile' and ran across this URL with findfiles.au3: http://www.autoitscript.com/fileman/users/jdeb/jdeb_autoit_stuff.htm This script works really well, but fails Beta Run with SciTe if $DIR is defined as 'c:\'. How do I use this script to start it's search from the root directory of c:\? I have tried escaping the backslah eg 'c:\\' to account for the trimming of that slash, also tried 'c:\.' and 'c:\..' just for the heck of it and received the expected error. The error that is returned by SciTe is when $DIR = "c:\" or "c:" : Line 42: Invalid file handle used Line 42 is: $N_FILE = FileFindNextFile($N_SEARCH)I 'kind of' understand the error from reviewing the AutoIt help again, but for the life of me I could not articulate this, nor could I modify to suit my needs; me=newb, remember? Any help appreciated. Thanks for tolerating me. -
How to find file and return it's path to string
a6m1n0 replied to a6m1n0's topic in AutoIt General Help and Support
Ah ok. DOH! Thanks for the tip. (Man, you guys are fast!) Modified like so: FileFindNextFile($szSearchString), where $szSearchString is the argument passed to the function that Larry wrote. Works perfectly. Again, thanks for the help and the code. -
How to find file and return it's path to string
a6m1n0 replied to a6m1n0's topic in AutoIt General Help and Support
Ok, performed a search and found this script written by you Larry: http://www.autoitscript.com/forum/index.ph...owtopic=571&hl= The problem is when I attempt to Beta Run in SciTE with the example usage you provided (searching for *.au3 files) the following error is returned: ERROR: FileFindNextFile() [built-in] called with wrong number of args. $szBuffer = FileFindNextFile() Actually it reports an error for each line that FileFindNextFile() is used. Am I just misusing your script? (Not unlikely :$ ) -
How to find file and return it's path to string
a6m1n0 replied to a6m1n0's topic in AutoIt General Help and Support
Thanks for the tips Larry...I'll do that. -
Hi. Was wondering how I can find file and return it's path to string to autoit. I can of course use dir c:\filename.ext /s /b to return something in the cmd window or redirect/pipe it somewhere, but two probelms: 1) How to get this data into autoit as string if I use DIR, and 2) is there a better way to do this just using autoit? Some constants: The drive searched will always be C: The file searched for will always have the same name (8.3 format) Thanks
-
Awesome. I appreciate the effort. I will try parsing the text file to return the mac address back to AutoIt. This is really what I am trying to do. I need the MAC as a string. I am trying to write a net client (no, not .NET) that will uniquely identify the PC based on MAC. I do not want to use the actual MAC, but a hashed value (say md5($MAC)). I think though this regkey, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards will provide me with enough information to get/generate a unique id of some sort. One more thing I am wondering: can the VISA functions be used to obtain the MAC from the actual device? Just curious if anyone knows. Seems like overkill for my project but am curious. Again thanks for all the advice/info.
-
Ok, so output to text and parse text. Gotcha. I guess this means I can use getmac' as well? Thanks
-
Thanks LxP! I can definitely work with that. Question though: Is there no way then to get the value from the registry? Or discern the value from the NetCfgInstanceId? If that is indeed the MAC? Just curious. Again, thanks.
-
Hi. I am trying to determine the MAC address of the active network connection and write to text file. I have found the examples in the help & forum for accessing the registry of the system, how to determine what the active connection is (LAN, Dial-up, etc) but nothing on MAC address. I have searched registry, but all I see is the "NetCfgInstanceId" and not the MAC. I am still pretty new to AutoIt...I have only written some small, very simple programs. This though has me stumped. And how to handle several NIC's MAC? I only want the 'active' one. The target machines should only have one, but might have two (wireless and 10/100), but only one would be active. Thanks.