Jump to content

0_00_0

Members
  • Posts

    13
  • Joined

  • Last visited

0_00_0's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. So I've been looking everywhere for an answer to this but I haven't managed to get anything to work. Below is the basic function to set a proxy for IE through the registry. Many say that I can simply write a proxy in the format "user:pass@server:port" to ProxyServer but that hasn't worked for me. I have also tried other suggestions such as creating a ProxyUser / ProxyPass key and writing credentials to those keys but still no dice. Func _IESetProxy($tProxy) If $tProxy="0" Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", "REG_DWORD", 0) Else RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer", "REG_SZ", $tProxy) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", "REG_DWORD", 1) EndIf EndFunc I believe this article from Microsoft may have something to do with it? http://support.microsoft.com/kb/834489/EN-US So I tried this (with 0 and 1 values): RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE") RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE", "iexplore.exe", "REG_DWORD", 0) RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE", "explorer.exe", "REG_DWORD", 0) and still no luck! Please! I desperately need help for this! Thanks a million in advance!
  2. This should be very easy but I can't figure out what is going on. Maybe I've been looking at the code for too long but I've tried everything I can think of. I am creating and saving "projects" in txt format. This is the function to save the project. I used to have the function overwrite the file but I have now tried to completely delete the file before writing but still no success. The file saving works great. Opening the file after saving will not work. Func SaveProject() $tProjectContents = "" $tProjectPath = FileSaveDialog("Save Project As...", @ScriptDir & "\Projects", "Text files (*.txt)", -1, GUICtrlRead($hProjectList)) If @error Or $tProjectPath = "" Then MsgBox(0, "", "Invalid project path") SetError(1) Return "" EndIf $tProjectContents &= "[ACCNAME]" & GUICtrlRead($hAccInput) & "[/ACCNAME]" & @CRLF $tProjectContents &= "[ACCPASS]" & GUICtrlRead($hAccPassInput) & "[/ACCPASS]" & @CRLF If FileExists($tProjectPath) Then FileDelete($tProjectPath) MsgBox(0, "", "Deleted " & $tProjectPath) EndIf $hOutFile = FileOpen($tProjectPath, 10) ;2=overwrite previous contents + 8=create path FileWrite($hOutFile, $tProjectContents) FileFlush($hOutFile) FileClose($hOutFile) If @error Then MsgBox(0, "", "Error saving file?") Else Zout("Saved new project: " & $tProjectPath) MsgBox(0, "", "Saved " & $tProjectPath) $splitFileName = StringSplit($tProjectPath, '\') $tFileName = $splitFileName[$splitFileName[0]] ;check if filename isnt already there If _GUICtrlListBox_FindString($hProjectList, $tFileName, True) = -1 Then GUICtrlSetData($hProjectList, $tFileName & "|") EndIf EndIf EndFunc This is the function I use to read the files. FileExists returns false for files that are clearly there! $fContents is empty! ;get project option Func GetOption($tFile, $OPT) If FileExists($tFile) Then MsgBox(0, $tFile, "file exists!") Else MsgBox(0, $tFile, "file " & $tFile & " doesn't exist :\") EndIf $hFile = FileOpen($tFile, 0) $fContents = FileRead($hFile) MsgBox(0, "debug", "fContents: " & @crlf & $fContents) FileClose($hFile) $tOpt = _StringBetween($fContents, '[' & $OPT & ']', '[/' & $OPT & ']') If @error Then Return "errorsz" Else Return $tOpt[0] EndIf EndFunc Hopefully there is some glaring issue with my code or there is some better way of flushing the file :s. Thanks in advance!
  3. Hey quick question here - I am downloading a file and trying to open it but the file will not be found. I have a loop that waits for the file to exist but it never exists! The file is very clearly in the same directory as the script that is running. I have tried using fileopen, fileflush, fileclose but that doesn't help at all. I would really appreciate any feedback! $rObjs = _IETagNameGetCollection($hIE, "img") For $rObj In $rObjs If StringInStr($rObj.src, "data:image") > 0 Then $nSrc = StringReplace($rObj.src, "data:image/jpg;base64, ", "") ;download base64 image Run('base64decode.exe ' & $nSrc) While Not FileExists(@ScriptDir & "tImg.jpg") Sleep(1000) MsgBox(0, "", "waiting for file to exist") WEnd EndIf NextIf you need any more code please let me know this is just the relevant snippit.
  4. Ah Darn I was wondering why it was only showing up until a certain point in the error dialog. Is there any workaround? Thanks for the feedback!
  5. Hi all I'm sure this is a pretty easy solution but I can't seem to figure it out. I am trying to pass in a base64 code to the converter I have written in C#. I am getting an Unterminated String error on the $b64code initialization line. #RequireAdmin $b64code = '/9j/4AAQSkZJRgABAQEASABIAAD/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/hAylodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjQ0MTdDNDIxMTI5RTExRTI5NTQ2ODc5NEJGNzEwNkI5IiB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m trying to use StringRegExp() to look for proxies in a text file. The format of the text files are in jumbled HTML and I want to just pick out the proxies from it. The problem is that it if it`s given a string such as abc123.123.123.123:8080abc, it will not pick out the abc`s in front and after. I`m going to try and stick a couple breaks in there to see if i can figure it out, but maybe someone can help me out with a more specific filter. It finds the proxies, but with any text directly attached to it. I thought this would work Func proxyLeech($proxyFileName) $proxyFile = FileOpen($proxyFileName, 0) $currentLine = FileReadLine($proxyFile) while not $currentLine = "" while StringLen($currentLine) > 0 $tempLine = $currentLine While StringLen($tempLine) > 0 GUICtrlSetData($hOutput, $tempLine) if StringRegExp ($tempLine, "[0-9].[0-9].[0-9].[0-9]:[0-9]", 0) Then MsgBox(0, "Found Proxy", $currentLine & @CRLF & $tempLine) Exitloop(2) EndIf $tempLine = StringTrimRight($tempLine, 1) WEnd $currentLine = StringTrimLeft ($currentLine, 1) WEnd $currentLine = FileReadLine($proxyFile) WEnd FileClose($proxyFile) EndFunc edit: threw an exitloop(2) in there so it doesn`t find the same proxy twice edit2: here is an example proxy file, I am just getting the raw html using _INetGetSource(). Unless there is a better way of reading it... <tr><td>128.112.139.73:3124</td><td>CoDeen/PlanetLab? </td><td>13 minutes ago</td><td>United States</td></tr><tr><td>128.112.139.73:3127</td><td>CoDeen/PlanetLab? proxy</td><td>13 minutes ago</td><td>United States</td></tr><tr><td>128.112.139.73:3128</td><td>CoDeen/PlanetLab? proxy</td><td>13 minutes ago</td><td>United States</td></tr><tr><td>128.112.139.80:3124</td><td>Planetlab/CoDeeN proxy server</td><td>13 minutes ago</td><td>United States</td></tr><tr><td>128.112.139.80:3127</td><td>CoDeen/PlanetLab? server</td><td>13 minutes ago</td><td>United States</td></tr><tr><td>128.112.139.80:3128</td><td>CoDeen/PlanetLab? proxy server</td><td>13 minutes ago</td><td>United States</td></tr></table> <div style="text-align:center; margin-top:10px; margin-bottom: 10px">
  8. Damn you guys are helpful. I just assumed it would be at the back because I added the other controls after it. Disabling it was definitely the smart thing to do, thats the method I took. I'm sure adding it after works too. Thanks a bunch guys! Thats all my questions for now, feel free to lock it up!
  9. ok thanks a bunch that worked. Aside from generating anywhere from (x-2)->(x) numbers, but this isn't a huge issue right now. Just another quick question, I didn't want to start a whole new topic on it. Whenever I add a background picture to my GUI it disables all my controls. Here is my GUI code: #include <GUIConstants.au3> #include <String.au3> $width = 250 $height = 225 $hGui = guicreate("Generator", $width, $height) guisetstate(@SW_SHOW) ;this line give mah GUI errorZ! guictrlcreatepic("bk.jpg", 0, 0, $width, $height) $hNum1 = guictrlcreateinput("0123", 15, 70, 35, 25) $hNum2 = guictrlcreateinput("012345", 55, 70, 45, 25) $hNum3 = guictrlcreateinput("01234", 105, 70, 40, 25) $hNum4 = guictrlcreateinput("012345", 150, 70, 45, 25) $hNum5 = guictrlcreateinput("0123", 200, 70, 35, 25) $hGenNum1 = guictrlcreateinput("0000", 15, 130, 35, 25) $hGenNum2 = guictrlcreateinput("000000", 55, 130, 45, 25) $hGenNum3 = guictrlcreateinput("00000", 105, 130, 40, 25) $hGenNum4 = guictrlcreateinput("000000", 150, 130, 45, 25) $hGenNum5 = guictrlcreateinput("0000", 200, 130, 35, 25) $genButton = GUICtrlCreateButton("GENERATE", ($width/2)-20, 160) while 1 $msg = GUIGetMsg() if $msg = $GUI_EVENT_CLOSE Then Exit endif wEnd
  10. Hello There! I'm basically trying to make a string of x random numbers from 0-9. For example: genCode(4) could generate 3942. The problem I'm having now is that it just adds them togeather. I'm looking for a concat, or sprintf equivalent in autoIT. func genCode($length) $code = String("") $tempRand=0 $count = 0 while $length > $count $tempRand=Random(0, 9) $code = String($code) + String($tempRand) $count = $count + 1 WEnd return $code EndFunc
  11. Hey not sure just how advanced this is, but I thought it would be a cool idea to have a java server, autoIT client. I'm having no difficulty connecting, I can tell there is a connection, but my java code stops at line 40, msg = inStream.readLine(); Is there going to be compatibility issues between the messages autoIT is sending and the ones java is expecting to receive? autoIT client: $c_Ip = "127.0.0.1" $c_Port = 6424 TCPStartup() $socket = TCPConnect($c_Ip, $c_Port) if $socket = -1 Then msgbox(0, "Error", "Error Connecting") EndIf while True $msg = inputbox("Send msg", "Send msg to server") TCPSend($socket, $msg) sleep(1) WEnd Java server: import java.net.*; import javax.swing.*; import java.io.*; import java.util.*; import java.awt.*; import java.io.BufferedReader; public class Server { public Server() { } public static void main(String[] args) { final int port = 6424; Socket clientsocket = null; ServerSocket sSocket = null; BufferedReader in = null; InputStream ins = null; BufferedReader inStream = null; String msg = ""; try{ sSocket = new ServerSocket(port); }catch(IOException e){ System.out.println("Error: " + e); } System.out.println("Starting server.."); try{ clientsocket = sSocket.accept(); }catch(IOException e){ System.out.println("Error: " + e); } System.out.println("Connection detected!"); try{ ins = clientsocket.getInputStream(); InputStreamReader blah = new InputStreamReader(ins); inStream = new BufferedReader(blah); }catch(IOException aE){ System.out.println("Error: " + aE ); } while(true){ try{ msg = inStream.readLine(); if(msg != ""){ System.out.println(msg); msg = ""; } ins = clientsocket.getInputStream(); System.out.println("e" + msg); }catch(IOException aE){ System.out.println("Error: " + aE); System.exit(0); } } } }
  12. k, this isnt supposed to be evil, i'm just intending this to be a test on my behalf. any answers?
  13. #include <GUIConstants.au3> $skypeWinStatus = "c" $winText = "a" $a = 0 $counter1 = 0 $time = FileGetTime(@Windowsdir & "\Notepad.exe", 1) Global $winText = WinGetText ("Target Skype Window", "") Global $array = StringSplit(StringReplace($winText, "Call Duration 00:01", @LF), @LF) hotkeyset("{F5}", "finished") Global $skypeWindow = winGetHandle("classname=tSkMainForm.UnicodeClass") Global $skypeTestAlive = WinGetState($skypeWindow) if @error then msgbox(0, "error", "window could not be found") endif winSetTitle($skypeWindow, "Contacts", "Target Skype Window") $winText = winGetText($skypeWindow, "") createGUI() getSkypeHandle() moveSkypeWin() makePhoneCall() func getSkypeHandle() Global $skypeWindow = winGetHandle("Skype Call Feedback - Mozilla Firefox") Global $mozillaWindow = winGetHandle("classname=MozillaUIWindowClass") Global $skypeTestAlive = WinGetState($skypeWindow) Global $mozillaTestAlive = winGetState($mozillaWindow) if @error then msgbox(0, "error", "window could not be found") endif GUICtrlSetData (-1, "testing for firefox") if $mozillaTestAlive = 1 then winkill($mozillaWindow) endif winSetTitle($skypeWindow, "Contacts", "Target Skype Window") $winText = winGetText($skypeWindow, "") GUICtrlSetData (-1, "getting Window handle") endfunc func moveSkypeWin() winsetState($skypeWindow, "", @SW_RESTORE) WinMove($skypeWindow, "", 1, 2, 200, 600) GUICtrlSetData (-1, "moving skype window") endfunc func makePhoneCall() while $counter1 < 3 $time = FileGetTime(@Windowsdir & "\Notepad.exe", 1) GUICtrlSetData (-1, "entering phone number") ControlSend($skypeWindow, "", "", "{TAB}", 0) ControlSend($skypeWindow, "", "", "{TAB}", 0) sleep(1000) if $counter1 = 0 then $phoneNum = IniRead("settings.ini", "PhoneNumbers", "Phone1", "4166482182") elseif $counter1 = 1 then $phoneNum = IniRead("settings.ini", "PhoneNumbers", "Phone2", "4166482182") elseif $counter1 = 2 then $phoneNum = IniRead("settings.ini", "PhoneNumbers", "Phone3", "4166482182") else $phoneNum = IniRead("settings.ini", "PhoneNumbers", "Phone3", "4166482182") endif send($phoneNum) send("{ENTER}") while $a < 1 $array = StringSplit(StringReplace($winText, "Call Duration 00:01", @LF), @LF) $winText = winGetText($skypeWindow, "") $time = FileGetTime(@Windowsdir, 0, 0) GUICtrlSetData (-1, $array[0]) sleep(2000) if $array[0] = 4 then GUICtrlSetData (-1, "they answered the phone! lawl!") SoundPlay ("gocrazy.wav", 1) $a = 1 elseif $array[1] = "Call Duration 00:01" then GUICtrlSetData (-1, "they answered! lawl!") SoundPlay ("gocrazy.wav", 1) $a = 1 elseif $array[2] = "Call Duration 00:01" then GUICtrlSetData (-1, "they answered! lawl!") soundplay("gocrazy.wav", 1) $a = 1 elseif $array[0] = "2" then GUICtrlSetData (-1, "call ended somehow") SoundPlay("byebye.wav", 0) $a = 1 elseif $time[5] = 59 then GUICtrlSetData (-1, "time ran out baby.") $a = 1 elseif $time[5] = 58 then GUICtrlSetData (-1, "time ran out baby.") $a = 1 elseif $time[5] = 57 then GUICtrlSetData (-1, "time ran out baby.") $a = 1 endif wEnd sleep(2000) send("{ESC}") GUICtrlSetData (-1, "call ended") sleep(2000) $a = 0 getSkypeHandle() moveSkypeWin() sleep(2000) $counter1 = $counter1 + 1 wEnd $counter1 = 0 makePhoneCall() endfunc func finished() Exit endfunc ;output window settings func createGUI() GUICreate("Output", 250, 250, 401, 1) GUISetState (@SW_SHOW) GUISetBkColor(0x62940F) GUISetFont(9, 300) GUICtrlCreateEdit ("Output", 5, 5 , 250 , 250) winsetState("Output", "", @SW_DISABLE) WinActivate ("Target Skype Window") endfunc while 1 $MSG = GuiGetMsg() if $MSG = $GUI_EVENT_CLOSE then Exitloop endif wEnd this is my autoit program, for the program skype. it automatically makes phonecalls to people, and if they pick up, it plays a sound. anyhow, for some reason, its giving me an array out of bounds or something error: happens on line 106 elseif $array[2] = "call duration 00:01" then elseif ^ERROR Error: Array variable has incorrect number of subscripts or subscript dimension range exeeded. anyways, what am i missing? what am i doing wrong? i did a test earlier to see if the value exists. and it does. because i made it print everything to a notepad window, and it printed out 3 things: array[0], array[1], and array[2] so.. im boggled. help plz this was made, just as a test of my programming abilities.
×
×
  • Create New...