Follow us on Twitter!
Don't judge the unknown - Grindordie
Saturday, April 19, 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: 21
Guests Online: 19
Members Online: 2

Registered Members: 82839
Newest Member: fezphantom
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Author

perl url checker


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 24-01-06 13:48
I was trying to make a url checker in perl and now im completely lost

Code
#!/usr/bin/perl

$url = "http://www.hellboundhackers.org/challenges/real2/backups/backup_2004-09-$day_$hour00.sql";

$day = 1;
$hour = 1;

use LWP::Simple;
while(!$check)
 {
print $day, " ", $hour, "\n";
$hour = $hour + 1;
      if($hour == 24)
       {
      $day = $day + 1;
      $hour = 1;
       }
      if($day = 1||2||3||4||5||6||7||8||9)
       {
      $day = "$day";
       }
      if($hour = 1||2||3||4||5||6||7||8||9)
       {
      $hour = "$hour0";
       }
      if($day == 31)
       {
      print "YOU SCREWED UP, NOTHING WAS FOUND";
      exit;
       }
my $check = get $url;
 }
print "THE URL ", $url, " IS NOT EMPTY";




The problem is that it wont increment the day or hour variables and it wont add them to the URL




Edited by on 24-01-06 22:15
Author

RE: perl url checker


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 24-01-06 22:16
I fixed up the day and hour, but i still cant add them to the URL, someone help please


Author

RE: perl url checker

n3w7yp3
Member

Your avatar

Posts: 358
Location: USA
Joined: 19.03.05
Rank:
Moderate
Posted on 24-01-06 23:04
You have to use string concaticnation. Its done with the '.'. So, to add them into the URL, try:

"(insert URL here)" . $whatever . $whatever . ".php"

A mate of mine actually had code to solve this that was very similar to yours... I told him the same thing and it worked.

GL.


"Root is a state of mind" -- K0resh
Author

RE: perl url checker


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 25-01-06 02:19
but also, can perl read .sql files cause if not.....


Author

RE: perl url checker


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 25-01-06 02:27
but also, can perl read .sql files cause if not.....


Author

RE: perl url checker

n3w7yp3
Member

Your avatar

Posts: 358
Location: USA
Joined: 19.03.05
Rank:
Moderate
Posted on 25-01-06 17:22
Your code is not reading *sql files, itrs merlely checking for their existance.

While I have never seen a *.sql files, I'm sure that its possible to parse it with Perl. Even if its not ASCII, just chuck Perl into binmode and have it parse it then.


"Root is a state of mind" -- K0resh