laffo16 Posted May 5, 2008 Share Posted May 5, 2008 i dont think InetGet can check if a sub-directory exists, any suggestions on how i can do this?ie. http://www.blahblah.com/1532 (check if dirctory 1532 exists). thanks! Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 5, 2008 Share Posted May 5, 2008 i dont think InetGet can check if a sub-directory exists, any suggestions on how i can do this?ie. http://www.blahblah.com/1532 (check if dirctory 1532 exists). thanks!Directory browsing is a tightly controlled permission on a web server. You would have to be accessing it with credentials that had been granted that permission. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
MikeP Posted May 5, 2008 Share Posted May 5, 2008 (edited) I would bypass this problem by creating a little tool that tests it.. using another language (and running that exe with your script): in PHPin ASPin C++this tool would for example write a temporary text file that your autoit script would read...I don't know..maybe it's possible with Autoit.. just giving you hints.(or opening system.dll and using this) Edited May 5, 2008 by MikeP Link to comment Share on other sites More sharing options...
MikeP Posted May 5, 2008 Share Posted May 5, 2008 Nevermind.. I found a super easy trick ! check this : #include <INet.au3> ConsoleWrite(_INetGetSource('www.autoitscript.com/autoit3'))oÝ÷ ٩ݶ¼+ºÚ"µÍÚ[ÛYH ÒS]]LÉÝÂÛÛÛÛUÜ]JÒS]Ù]ÛÝÙJ ÌÎNÝÝÝË]]Ú]ØÜÛÛKØZZ ÌÎNÊJ this returns the source code of the page (here it's send to the console in autoit) ... just put this in a variable and check the text between <title></title> .. when the page (directory..) doesn't exist it's "AutoItScript Error" .. otherwise it's the actual title of the HTML page. If you can't code it I will. Link to comment Share on other sites More sharing options...
laffo16 Posted May 5, 2008 Author Share Posted May 5, 2008 i purchased an ebook from this webby, and was a little gutted to that it was stored in a /4 digit (unrestricted directory). same website just released another product so thought i'd try my luck at bruting the 4 digits. thanks for replys you guys, i will look into them, although i had no joy with the brute, oh well #include <INet.au3> $i = 1 $i_stop = 9999 While 1 ToolTip($i, 0, 105) $data = StringLen(_INetGetSource('http://www.xxxxxxx.com/' & $i)) ;MsgBox(0, "", $data) ; 385 was the char len for a 404 If $data > 390 Then MsgBox(0, "", $i) EndIf $i += 1 If $i > $i_stop Then ExitLoop EndIf WEnd Link to comment Share on other sites More sharing options...
Ealric Posted May 5, 2008 Share Posted May 5, 2008 i dont think InetGet can check if a sub-directory exists, any suggestions on how i can do this?ie. http://www.blahblah.com/1532 (check if dirctory 1532 exists). thanks!Like was previously suggested, you would more than likely have to use a PHP script to check that site (appears to be using apache / php). Something similar to:CODE$ch = curl_init();$url = "insert your url here";$var = @file_get_contents($url);curl_setopt($ch, CURLOPT_URL, $var); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 30);curl_exec($ch);curl_close($ch);if ($var != false){ "Do Something - perhaps write a local file that can be read by your script"}else{ return false;} My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic] 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