Follow us on Twitter!
Never in the field of human conflict was so much owed by so many to so few. - Winston Churchill
Thursday, April 24, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 30
Guests Online: 27
Members Online: 3

Registered Members: 82901
Newest Member: sjs
Latest Articles
View Thread

HellBound Hackers | Challenges | Realistic

Author

problem with real 2 script


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 18-02-07 09:43
I have this vbscript I am using to loop though the possible combinations of years from (2004-2007), months (09-12 anyway) , days (01-31 even if there isn't that many in a month) and hours (1000-2400) looking for the backup files, but I can not seem to find the file... am i missing something??

Vbscript to locate backup file...

To use this code copy the code into note page and save the file with a .vbs extension and double click to run the script.


Code

dim Ie
set ie = createobject("internetexplorer.application")
ie.Visible=true
r="http://hellboundhackers.org/challenges/real2/backups/backup_"
y=4
m = 1
d=1
h=1
For y= 4 to 7
   For m= 9 to 12
      for d= 1 to 31
         for h= 1 to 24
            if len(m) = 1 then
               m = "0" & "" & m
            end if
                  
            if len(d) = 1 then
               d = "0" & "" & d
            end if
                  
            url= r & "200" & y & "-" & m & "-" & d & "_"
            
            if Len(h) = 1 then
               url=url & "0" & h & "00.sql"
            Else
               url= url & h & "00.sql"
            End if
                        
            ie.navigate url
            do while ie.readystate <> 4
               'wait until the page completes loading so we can access the dom
               wscript.sleep 0250
            loop
            st=ie.document.getElementsByTagName("pre").length
            ' If our document contains a pre tag we are looking at a text file
            if st=1 then
               'throw an error so the script stop executing leaving us on this page
               msqbox(ie.document.getElementsByTagName("pre").count)
            end if
            next
         next
   next    
next



Author

RE: problem with real 2 script


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 29-04-07 15:53
Well, I'd disable smileys, first... it's hard to see your code clearly with Wink in the way.

Second, are you sure there would be a <pre> tag in the correct file? You can output plain text to a webpage without pre... instead of looking in the elements of the page for the tag you assume is there, why not try telling the program to look at the innerHTML to see if "Page cannot be located" or whatever IE error occurs? Then, you could wait for the page where it doesn't occur and Msgbox the URL.

As a possible other suggestion, you might want to look into using the MSHTML class to chew through the IE documents. It's not necessary but, if you keep encountering problems with your script, that might overcome them.



Author

RE: problem with real 2 script


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 29-04-07 16:22
and also, those are spoilers. Your code is spoiler.

You need to ask: 'Does anyone want to view my real2 code and tell me what am I doing wrong?'

Not post the code in the forum.