Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- _____ _____ _ _____ _____ _____ _____ _____ _____
- ___| | __ |_| _ |_ _|___ ___|_ _| __| _ | |
- |_ -| --| -| | __| | | |- _|___| | | | __| | | | |
- |___|_____|__|__|_|__| |_| |___| |_| |_____|__|__|_|_|_|
- |s C R i P T z - T E A M . i N F O|
- PORT CHECKER
- USAGE:
- index.php?site=somesite.com&port=80
- */
- error_reporting(0);
- if (isset($_GET['site']) && $_GET['site'] != "" && $_GET['port'] != "") {
- $site = $_GET['site'];
- $port = $_GET['port'];
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_HEADER, 1);
- curl_setopt($ch, CURLOPT_URL, $site . ":" . $port);
- $result = curl_exec($ch);
- $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
- curl_close($ch);
- if ($httpcode >= 200) {
- echo "[!] w00t! Found Open Port [ $site:$port ]";
- } else {
- echo "[-] Nothing found on [$site:$port]";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment