} if (isset($_GET["www-graĥs"])) { www_graphs(); exit; } if (isset($_GET["www-table"])) { www_table(); exit; } if (isset($_GET["www-search"])) { www_search(); exit; } Privileges_members_ownstats(); if (isset($_GET["whois"])) { whois(); exit; } page(); function page() { $t = time(); $familysite = $_GET["familysite"]; $tpl = new templates(); $q = new mysql_squid_builder(); $page = CurrentPageName(); $categories = $q->GET_CATEGORIES($familysite); $familysiteenc = urlencode($familysite); $thumbs = $q->GET_THUMBNAIL($familysite, 320); if (strpos($categories, ",") > 0) { $categoriesZ = explode(",", $categories);
function scan() { if (isset($_POST['host']) && isset($_POST['nmap']) || isset($_POST['dig']) || isset($_POST['whois'])) { echo '<div class="post"><h2 class="title"><a href="#">Scan results</a></h2><div class="entry">'; echo '<p class="meta">Used proxychains: '; if ($_POST['proxychains'] == 'yes') { echo 'Yes • '; } else { echo 'No • '; } echo ' Target - ' . htmlspecialchars($_POST['host']) . '</p>'; if ($_POST['nmap'] == 'yes') { nmap($_POST['host'], $_POST['ncmd']); } if ($_POST['dig'] == 'yes') { dig($_POST['host']); } if ($_POST['whois'] == 'yes') { whois($_POST['host']); } echo '</div></div>'; } }
function dnslookup($o) { $domain = str_replace("/", "", str_replace("http://", "", $o['domain'])); $ip = gethostbyname($domain); $r = array('domain' => $domain, 'ip' => $ip, 'madwireip' => check_madwire_ip($ip), 'whois' => whois(str_replace('www.', '', $domain)), 'ipwhois' => whois($ip)); $doc = new DOMDocument(); $doc->loadHTMLFile("http://" . $domain); if (strpos($doc->saveHTML(), '/css/madstyles.php') !== false) { $r['bcstyles'] = "Yes"; } else { $r['bcstyles'] = "No"; } // here comes the view! (INSIDE THE CONTROLLER!) ?> <h1>Domain Details</h1> <p> <table style="width: 100%"> <tr> <td class="lbl">Domain Name</td> <td><?php print $r['domain']; ?> </td> </tr> <tr> <td class="lbl">ip</td> <td><?php print $r['ip']; ?> </td> </tr> <tr> <td class="lbl">Madwire System?</td> <td><?php if ($r['madwireip']) { print "Yes, " . $r['madwireip'][1] . ", " . $r['madwireip'][2] . ", " . $r['madwireip'][3]; } else { print "No"; } ?> </td> </tr> <tr> <td class="lbl">BC Mad Style Present?</td> <td><?php print $r['bcstyles']; ?> </td> <tr> <td class='lbl'>DNS A Record</td> <td><?php print "<pre>" . diga($domain) . "</pre>"; ?> </td> </tr> <tr> <td class='lbl'>DNS MX Records</td> <td><?php print "<pre>" . digmx($domain) . "</pre>"; ?> </td> </tr> <tr> <td class='lbl'>WHOIS</td> <td><pre><?php print $r['whois']; ?> </pre></td> </tr> <tr> <td class='lbl'>IP Whois</td> <td><pre><?php print $r['ipwhois']; ?> </pre></td> </tr> <tr> <td class='lbl'>ARIN</td> <td> <form action="http://whois.arin.net/ui/query.do" method="post" name="whois_query" id="whois_query" target="_blank"> <input type="hidden" name="xslt" value="http://whois.arin.net/ui/arin.xsl"> <input type="hidden" name="flushCache" value="false"> <input type="hidden" id="queryinput" name="queryinput" value="<?php print $r['ip']; ?> "> <input id="whoisSubmitButton" type="submit" name="" value="Arin WHOIS"> </form> </td> </tr> <td class='lbl'>RIPE</td> <td> <form method="get" action="https://apps.db.ripe.net/search/query.html" target="_blank"> <input type="hidden" name="searchtext" id="searchtext" class="searchField" size="20" value="<?php print $r['ip']; ?> "> <input type="submit" class="searchButton" name="search:doSearch" alt="submit search" value="RIPE Whois"> </form> </td> </tr> <tr> <td class="lbl">APNIC</td> <td> <form method="post" action="http://wq.apnic.net/apnic-bin/whois.pl" id="whoisform" target="_blank"> <input title="WHOIS search" name="searchtext" class="search" value="<?php print $r['ip']; ?> " type="hidden"> <input name="whois" title="Search" value="APNIC Whois" type="submit"> </form> </td> </tr> </table> </p> <?php }
} if (count($cmd) == 3) { nslookup($cmd[1], $cmd[2]); } if (count($cmd) == 2) { nslookup($cmd[1]); } else { error(4); } break; case "/whois": if (intval($chatID) < 0) { break; } if (count($cmd) == 2) { whois($cmd[1]); } else { error(4); } break; case "/test": test(); break; case "/curl": curl($cmd[1]); //run_shell_cmd('curl %s', $cmd[1]); break; case "/help": help($cmd_list); break; /*case "/search":
<?php // here you can directly run xpath queries to debug your tests $Query = "//*[local-name()='p']"; $DOM = new DOMDocument(); $DOM->loadHTMLFile('test.html'); $X = new DOMXPath($DOM); print $Query; whois($X->query($Query)); function whois($nodeList) { $return = array(); foreach ($nodeList as $node) { $return[] = $node->tagName . ($node->getAttribute('id') ? '#' . $node->getAttribute('id') : '') . ($node->getAttribute('class') ? '.' . join('.', split(' ', $node->getAttribute('class'))) : ''); } print "<pre>"; print_r($return); print "</pre>"; }
include 'views/domainlookup.php'; include 'views/_footer.php'; } elseif ($q == "ajax") { ini_set('display_errors', 0); $domain = actualDomain($_GET['domain']); if ($a == "ip") { print ipLookup($domain); } if ($a == "madwireSystem") { print check_madwire_ip($domain); } if ($a == "bcStyles") { print check_bc_styles($domain); } if ($a == "dnsA") { print "<pre>" . diga($domain) . "</pre>"; } if ($a == "whois") { print "<pre>" . whois($domain) . "</pre>"; } if ($a == "dnsMX") { print "<pre>" . digmx($domain) . "</pre>"; } if ($a == "ipWhois") { print "<pre>" . ipWhois($domain) . "</pre>"; } } else { include 'views/_header.php'; include 'views/home.php'; include 'views/_footer.php'; }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <form action="" method="post"> <input type="text" name="domain" placeholder="example.ir"> <input type="submit" value="whois" name="submit"> </form> <br> <?php if (isset($_POST['submit'])) { require_once 'irwhois.php'; $result = whois($_POST['domain']); echo '<pre>'; echo $result; echo '</pre>'; } ?> </body> </html>
$result = ''; while (!feof($fp)) { $result .= fgets($fp, 128); } fclose($fp); } return $result; } // set language isset($_COOKIE["ipplanLanguage"]) && myLanguage($_COOKIE['ipplanLanguage']); //setdefault("window",array("bgcolor"=>"white")); $title = my_("WHOIS results"); newhtml($p); $w = myheading($p, $title, true); // explicitly cast variables as security measure against SQL injection list($lookup) = myRegister("S:lookup"); if (!$_GET) { myError($w, $p, my_("You cannot reload or bookmark this page!")); } //$data = $whois->lookup($lookup); $data = whois(WHOISSERVER, $lookup); if (!$data) { myError($w, $p, my_("Whois query failed - are you behind a firewall?")); } else { /* $data = preg_replace("/\((.*?)\)/", "<a href='whois.php?lookup=\\1'>(\\1)</a>", $data); */ insert($w, block("<pre>" . htmlspecialchars($data) . "</pre>")); } printhtml($p);
$pass = mysql_escape_string($pass); $pass = sha1($pass); } $sql = "INSERT INTO users (name, email, phone, password, regionid, firstid, type, status, role)\n\t\t\t\tVALUES ('{$company}','{$email}','{$phone}','{$pass}','{$region}','{$firstid}', 'perf', '0', 'user');"; if (ExecFromDB($sql) == TRUE) { proc_actlink(mysql_insert_id()); echo "Вы успешно зарегистрированы! Письмо для активации отправлено на email"; } else { echo "Ошибка при регистрации!"; } } else { die("Не указано лицо (ЮЛ/ФЛ)"); } } if (!empty($_REQUEST['customer']) && $_REQUEST['customer'] == "TRUE") { $whois = whois(); if ($whois == "FL") { if (!empty($_REQUEST['fio'])) { $fio = $_REQUEST['fio']; $fio = mysql_escape_string($fio); } if (!empty($_REQUEST['email'])) { $email = $_REQUEST['email']; $email = mysql_escape_string($email); } if (!empty($_REQUEST['pass'])) { $pass = $_REQUEST['pass']; $pass = mysql_escape_string($pass); $pass = sha1($pass); } $sql = "INSERT INTO users (fio, email, password, type, status, role,whois)\n\t\t\t\tVALUES ('{$fio}','{$email}','{$pass}', 'cust', '0', 'user','FL');";
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <form action="" method="post"> <input type="text" name="code" placeholder="0123456789"> <input type="submit" value="Check" name="submit"> </form> <br> <?php if (isset($_POST['submit'])) { require_once 'irid.php'; $result = whois($_POST['code']); if ($result) { echo 'Valid'; } else { echo 'Invalid'; } } ?> </body> </html>