This forum is in archive mode. You will not be able to post new content.

Author Topic: URL Bruteforce I guess  (Read 18286 times)

0 Members and 1 Guest are viewing this topic.

Offline blk.Sith0

  • Serf
  • *
  • Posts: 27
  • Cookies: 0
    • View Profile
Re: URL Bruteforce I guess
« Reply #15 on: April 04, 2011, 02:55:01 PM »
Will this work if I do without the webserver? From the command line?

Do I need a framework?



How can I add a slash to my charset?
$charset .= abcdefghijlmnopqrstuvwxyz0123456789
Thanks for the help guys :)
« Last Edit: April 04, 2011, 03:15:33 PM by blk.Sith0 »

Offline ande

  • Owner
  • Titan
  • *
  • Posts: 2664
  • Cookies: 256
    • View Profile
Re: URL Bruteforce I guess
« Reply #16 on: April 04, 2011, 03:24:45 PM »
Will this work if I do without the webserver? From the command line?

Do I need a framework?



How can I add a slash to my charset?
$charset .= abcdefghijlmnopqrstuvwxyz0123456789
Thanks for the help guys :)

You CAN run PHP by command line, yes.

To add slash:
$charset .= "abcdefghijlmnopqrstuvwxyz0123456789\\";
« Last Edit: April 04, 2011, 03:24:58 PM by ande »
if($statement) { unless(!$statement) { // Very sure } }
https://evilzone.org/?hack=true

Offline blk.Sith0

  • Serf
  • *
  • Posts: 27
  • Cookies: 0
    • View Profile
Re: URL Bruteforce I guess
« Reply #17 on: April 05, 2011, 11:13:31 PM »
Now when I create a project, it gives me all these other files.

Do I need them, or can I use only the main php file? (index)

Offline ande

  • Owner
  • Titan
  • *
  • Posts: 2664
  • Cookies: 256
    • View Profile
Re: URL Bruteforce I guess
« Reply #18 on: April 05, 2011, 11:45:03 PM »
What kind of gay IDE are you using? :P You only need the index.php unless your IDE stuffs lots of code in the other files for some crazy ass reason
if($statement) { unless(!$statement) { // Very sure } }
https://evilzone.org/?hack=true

Offline blk.Sith0

  • Serf
  • *
  • Posts: 27
  • Cookies: 0
    • View Profile
Re: URL Bruteforce I guess
« Reply #19 on: April 06, 2011, 12:41:55 AM »
Yeah I uninstalled that IDE just now and switched to another lol

I get an error when trying to do this line in PHP.
Quote
for(int i=0; i<sizeof(mycharset); i++){

So first I did this and made a variable called i.
Quote
$i = 0;
But I'm pretty sure that the "sizeof" is only in C++, so what is the equivalent in PHP?

And for some reason, getting an error from this line.
Quote
$i = 0;
Unexpected T_Variable. I dont see what I did wrong.

This is annoying, Im still getting an error just from this.
Quote
for ($i=0; $i<=; $i++);
Its saying unexpected semicolon, with AND without the semicolon at the end. So I just dont know.
« Last Edit: April 06, 2011, 03:25:36 PM by blk.Sith0 »

Offline ande

  • Owner
  • Titan
  • *
  • Posts: 2664
  • Cookies: 256
    • View Profile
Re: URL Bruteforce I guess
« Reply #20 on: April 06, 2011, 11:54:48 AM »
You just quadposted... Also you should learn PHP from the start before you try something like this. Non the less, here is your solution:

Code: [Select]
for($i=0; $i<sizeof($mycharset); $i++){
     // Code logic here
}
if($statement) { unless(!$statement) { // Very sure } }
https://evilzone.org/?hack=true

Offline blk.Sith0

  • Serf
  • *
  • Posts: 27
  • Cookies: 0
    • View Profile
Re: URL Bruteforce I guess
« Reply #21 on: April 07, 2011, 04:42:24 AM »
Is this right? Change:
Code: [Select]
myget= "GET /users/" + mycharset[a] + mycharset[b] +"\r\n";(Thats the C++ version)
change it to this:
Code: [Select]
$myget = $_"GET /users/" + mycharset[a] + mycharset[b] +"\r\n";I thought of this after reading this.
I'm doing good, right, right?
« Last Edit: April 07, 2011, 04:43:04 AM by blk.Sith0 »

Offline ande

  • Owner
  • Titan
  • *
  • Posts: 2664
  • Cookies: 256
    • View Profile
Re: URL Bruteforce I guess
« Reply #22 on: April 07, 2011, 09:04:52 AM »
Is this right? Change:
Code: [Select]
myget= "GET /users/" + mycharset[a] + mycharset[b] +"\r\n";(Thats the C++ version)
change it to this:
Code: [Select]
$myget = $_"GET /users/" + mycharset[a] + mycharset[b] +"\r\n";I thought of this after reading this.
I'm doing good, right, right?


The "+" sign in PHP means pluss as in math. To add multiple characters you use the "."
Also. All variables starts with $
Code: [Select]
$myget = $_"GET /users/" . $mycharset[$a] . $mycharset[$b] . \r\n";
if($statement) { unless(!$statement) { // Very sure } }
https://evilzone.org/?hack=true

Offline blk.Sith0

  • Serf
  • *
  • Posts: 27
  • Cookies: 0
    • View Profile
Re: URL Bruteforce I guess
« Reply #23 on: April 07, 2011, 03:10:58 PM »
Thanks, I forgot about that, but I mean replacing the GET with $_GET.

Offline ande

  • Owner
  • Titan
  • *
  • Posts: 2664
  • Cookies: 256
    • View Profile
Re: URL Bruteforce I guess
« Reply #24 on: April 07, 2011, 03:26:33 PM »
Thanks, I forgot about that, but I mean replacing the GET with $_GET.

Not quiet sure I understand what you mean. The $_ part of the code in this case would cause an error. This is correct:

Code: [Select]
$myget = "GET /users/" . $mycharset[$a] . $mycharset[$b] . \r\n";
if($statement) { unless(!$statement) { // Very sure } }
https://evilzone.org/?hack=true

Offline I_Learning_I

  • Knight
  • **
  • Posts: 267
  • Cookies: 26
  • Nor black or white, not even grey. What hat am I?
    • View Profile
    • Hacking F0r Fr33
Re: URL Bruteforce I guess
« Reply #25 on: April 07, 2011, 04:53:32 PM »
I believe what blk was saying is that he was doing something like $_GET[$mycharset[$a].$mycharset[$b]].
However that code is used on a PHP server and not on a client, when you're a client you need to send a HTTP request, in this case you'll request the page site.com/asdsdasd.html since you're bruteforcing the URL, it means you're using the GET method and not the POST, therefore a HTTP request would be like:
GET site.com/asdsdasd.html\r\n

When you're working on a PHP server and handling a website you can use $_GET["id"] to detect the value the client sent to you on that variable using the GET method.
For instance, on a forum, you can access the forum.php?section=31 which would display Hacking and Security

In PHP the code would be something like:

Code: [Select]
if("$_GET["section"]){
       showsection($_GET["section"]);
}
The show section doesn't exist, I just used it so you can understand the theory.

Anyways, what matters to you is to work as a client, which means to make HTTP requests, and not to handle PHP requests.
Thanks for reading,
I_Learning_I

Offline blk.Sith0

  • Serf
  • *
  • Posts: 27
  • Cookies: 0
    • View Profile
Re: URL Bruteforce I guess
« Reply #26 on: April 08, 2011, 02:34:48 AM »
Code: [Select]
Hey in this line.
[codeif(bigfile.find("Course")!=string::npos){
Where does the bigfile part come from?

Offline ande

  • Owner
  • Titan
  • *
  • Posts: 2664
  • Cookies: 256
    • View Profile
Re: URL Bruteforce I guess
« Reply #27 on: April 08, 2011, 09:12:33 AM »
Code: [Select]
Hey in this line.
[codeif(bigfile.find("Course")!=string::npos){
Where does the bigfile part come from?

If you tell us where you are getting all this random code from, it will be alot easier to help you :P
if($statement) { unless(!$statement) { // Very sure } }
https://evilzone.org/?hack=true

Offline I_Learning_I

  • Knight
  • **
  • Posts: 267
  • Cookies: 26
  • Nor black or white, not even grey. What hat am I?
    • View Profile
    • Hacking F0r Fr33
Re: URL Bruteforce I guess
« Reply #28 on: April 08, 2011, 02:48:01 PM »
If you tell us where you are getting all this random code from, it will be alot easier to help you :P
Indeed! :D
But I'm starting to think Satan was right and that you really should do some light-reading first.
I don't know what you have so far, but doesn't look to me that you're understanding your own code, which is awful a in the future you might wanna go back to it, and still you won't understand.
Thanks for reading,
I_Learning_I

Offline blk.Sith0

  • Serf
  • *
  • Posts: 27
  • Cookies: 0
    • View Profile
Re: URL Bruteforce I guess
« Reply #29 on: April 09, 2011, 12:59:31 AM »
Thats your code that YOU posted here lol. You started write "buff" and "bigfile" and thats where you lost me.

 



Want to be here? Contact Ande, Factionwars or Kulverstukas on the forum or at IRC.