Advertisement
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|
- NiXAPi
- USAGE:
- index.php?ip=196.43.78.225
- */
- error_reporting(0);
- $ipaddr = trim($_GET["ip"]);
- $hostname = gethostbyaddr($ipaddr);
- /*
- Leave variables below empty if you are not using a proxy to query the API. Paste the proxy in proxy format 127.0.0.1:1234
- */
- $api_proxy = "";
- //Proxy type: HTTP or SOCKS4 or SOCKS5
- $api_proxytype = "";
- if ($response = nix_api()) {
- $country = str_between($response, "<country>", "</country>");
- $abbr = str_between($response, "<abbr>", "</abbr>");
- $region = str_between($response, "<region>", "</region>");
- $city = str_between($response, "<city>", "</city>");
- $open_proxy = str_between($response, "<opd>", "</opd>");
- $tor = str_between($response, "<tor>", "</tor>");
- $data_center = str_between($response, "<dc>", "</dc>");
- $satellite_provider = str_between($response, "<sp>", "</sp>");
- $api_codes = str_between($response, "<codes>", "</codes>");
- $tor_nodes = str_between($response, "<tornodes>", "</tornodes>");
- $active_proxies = str_between($response, "<activeproxies>", "</activeproxies>");
- $total_proxies = str_between($response, "<totalproxies>", "</totalproxies>");
- $hosting_providers = str_between($response, "<hostingproviders>", "</hostingproviders>");
- $hosting_subnets = str_between($response, "<hostingsubnets>", "</hostingsubnets>");
- $satellite_providers = str_between($response, "<satelliteproviders>", "</satelliteproviders>");
- $satellite_subnets = str_between($response, "<satellitesubnets>", "</satellitesubnets>");
- echo "<pre>
- _____ _ __ __ _____ _____ _
- | | |_| | | | _ | _ |_|
- | | | | |- -| | | __| |
- |_|___|_|__|__| |__|__|__| |_|
- |s C R i P T z - T E A M . iNFO|</pre>";
- echo nl2br("
- CURRENTLY KEEPS RECORDS OF:
- [+] $hosting_providers hosting provider IP's in $hosting_subnets subnets.
- [+] $satellite_providers satellite provider IP's in $satellite_subnets subnets.
- [+] $total_proxies open proxies in the past two week period where $active_proxies proxies
- worked in the past 12 hours.
- [+] $tor_nodes Tor nodes
- IPv4: $ipaddr
- Hostname: $hostname
- Country long: $country
- Country abbr.: $abbr
- Region: $region
- City: $city
- Data center: $data_center
- Satellite provider: $satellite_provider
- Open proxy database: $open_proxy
- Tor network: $tor
- ");
- } else {
- die("[-] An error has occurred. Please try again.\n");
- }
- /*---------------------------------------------------------------------
- / DO NOT EDIT ANYTHING BELOW OR THE QUERY WILL FAIL /
- ---------------------------------------------------------------------*/
- function str_between($string, $start, $end)
- {
- $string = " " . $string;
- $ini = strpos($string, $start);
- if ($ini == 0) {
- return "";
- }
- $ini += strlen($start);
- $len = strpos($string, $end, $ini) - $ini;
- return substr($string, $ini, $len);
- }
- function nix_api()
- {
- global $ipaddr, $api_proxy, $api_proxytype;
- $proxy_regex = '(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\:\d{1,5})';
- if (!function_exists('curl_init')) {
- die("[-] Error: Curl is not enabled.\n");
- }
- // Load-balanced API server-pool
- $nixapi = "http://cli.nixapi.com/";
- $options = array(
- CURLOPT_RETURNTRANSFER => true,
- CURLOPT_HEADER => 1,
- CURLOPT_FOLLOWLOCATION => false,
- CURLOPT_ENCODING => "",
- CURLOPT_USERAGENT => "NiX API CLI",
- CURLOPT_AUTOREFERER => true,
- CURLOPT_CONNECTTIMEOUT => 4,
- CURLOPT_TIMEOUT => 60,
- CURLOPT_MAXREDIRS => 1,
- CURLOPT_SSL_VERIFYHOST => 0,
- CURLOPT_SSL_VERIFYPEER => false,
- CURL_HTTP_VERSION_1_1 => true,
- CURLOPT_VERBOSE => 0,
- CURLOPT_POSTFIELDS => "ipaddr=$ipaddr"
- );
- $ch = curl_init($nixapi);
- curl_setopt_array($ch, $options);
- if (!empty($proxy)) {
- switch ($proxytype) {
- case "HTTP":
- curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
- break;
- case "SOCKS4":
- curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
- break;
- case "SOCKS5":
- curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
- break;
- default:
- die("[-] Error: Invalid proxy type.\n");
- }
- if (preg_match("$proxy_regex", $proxy)) {
- curl_setopt($ch, CURLOPT_PROXY, $proxy);
- } else {
- die("[-] Error: Invalid proxy.\n");
- }
- }
- // Query NiX API
- $response = curl_exec($ch);
- $errno = curl_errno($ch);
- $errmsg = curl_error($ch);
- $info = curl_getinfo($ch);
- curl_close($ch);
- if ($errno == "0" && $info['http_code'] == "200") {
- return $response;
- } else {
- return false;
- }
- }
- function ip($ip = '')
- {
- if (preg_match("/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/", $ip)) {
- $parts = explode(".", $ip);
- foreach ($parts as $ip_parts) {
- if (intval($ip_parts) > 255 || intval($ip_parts) < 0) {
- return false;
- }
- }
- return true;
- } else {
- return false;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement