Skip to content

Commit

Permalink
Added referer
Browse files Browse the repository at this point in the history
  • Loading branch information
strawp committed Jan 13, 2017
1 parent 6e4b5b6 commit 6607f04
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions recon.php
Expand Up @@ -30,7 +30,7 @@
$db_host = 'localhost';

// Use this SQL to set up the DB
// CREATE TABLE log ( id int NOT NULL AUTO_INCREMENT, logtime DATETIME, method varchar(10), pageurl varchar(255), scripturl varchar(255), cookies varchar(255), useragent varchar(255), userip varchar(20), html TEXT, PRIMARY KEY (id) )
// CREATE TABLE log ( id int NOT NULL AUTO_INCREMENT, logtime DATETIME, method varchar(10), pageurl varchar(255), scripturl varchar(255), referer varchar(255), cookies varchar(255), useragent varchar(255), userip varchar(20), html TEXT, PRIMARY KEY (id) )

$url = 'http';
if( !empty( $_SERVER['HTTPS'] ) ){
Expand Down Expand Up @@ -114,6 +114,9 @@ function xssGatherInfo(){
// URL of the script itself
$info->scripturl = $url;

// Referer
$info->referer = $_SERVER['HTTP_REFERER'];

// User's user agent
$info->useragent = $_SERVER['HTTP_USER_AGENT'];

Expand All @@ -124,7 +127,7 @@ function xssGatherInfo(){

$info->logtime = date('Y-m-d H:i:s');

$aProperties = array( 'logtime', 'method', 'pageurl', 'scripturl', 'cookies', 'useragent', 'userip', 'html' );
$aProperties = array( 'logtime', 'method', 'pageurl', 'scripturl', 'referer', 'cookies', 'useragent', 'userip', 'html' );

// Log this request
if( $logging == 'file' ){
Expand Down

0 comments on commit 6607f04

Please sign in to comment.