Lol5916 Posted August 23, 2008 Share Posted August 23, 2008 Well this script is really hard to understand, so I will try and explain what it does: 1.) Creates a .htaccess file that stops THAT domain(which is specified from another file) from getting the images leeched. 2.) Creates a file called logger.php that has this information, $logger = "[output of $logfile]"; 3.) Creates a file called config.php that has this information, $pass = "[output of $password]"; The problem is... it doesn't do anything, at all. <?php $file = ".htaccess"; $h = $_POST['hp']; $logfile = $_POST['log']; $log = "logger.php"; $images = $_POST['info']; $password = $_POST['pass']; $admin = "admin/config.php"; $mes = 'RewriteEngine on\n'; $mes = 'RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?'.$images." [NC]\n"; $mes = 'RewriteRule \.(jpg|jpeg|png|gif|swf|bmp|)$ - [NC,F,L]'; $mes = '#.htaccess anti-leech created by Lol5916'; //Makes the .htaccess file if ($h=="yes") $fh = fopen($file, "w"); fwrite ($fh, "$mes"); fclose($fh); $logs = '$logger = '.$logfile."; //Makes the logging file $fh = fopen($log, "w"); fwrite ($fh, "$logs"); fclose($fh); $adminpanel = '$pass = '.$password.";'; //Makes Admin Panel Password $fh = fopen($admin, "w"); fwrite ($fh, "$adminpanel"); fclose($fh); ?> I probably should organize it better, but does anyone notice anything out of the ordinary? Link to comment https://forums.phpfreaks.com/topic/120951-need-some-help-with-a-script/ Share on other sites More sharing options...
DarkWater Posted August 23, 2008 Share Posted August 23, 2008 Several syntax errors? $adminpanel = '$pass = '.$password.";; $logs = '$logger = '.$logfile."; Try putting this at the top of the file so it's easier to debug: ini_set('display_errors', 1); error_reporting(E_ALL); Link to comment https://forums.phpfreaks.com/topic/120951-need-some-help-with-a-script/#findComment-623497 Share on other sites More sharing options...
Lol5916 Posted August 23, 2008 Author Share Posted August 23, 2008 And from that I get Parse error: syntax error, unexpected T_STRING in /home/******/******/******/installer.php on line 22 The new line 22 is: fwrite ($fh, "$logs"); fclose($fh); Link to comment https://forums.phpfreaks.com/topic/120951-need-some-help-with-a-script/#findComment-623504 Share on other sites More sharing options...
DarkWater Posted August 23, 2008 Share Posted August 23, 2008 Did you fix those other syntax errors? Link to comment https://forums.phpfreaks.com/topic/120951-need-some-help-with-a-script/#findComment-623514 Share on other sites More sharing options...
Lol5916 Posted August 23, 2008 Author Share Posted August 23, 2008 That's why I'm asking, I don't know how to fix it, I need it to display that variable. Link to comment https://forums.phpfreaks.com/topic/120951-need-some-help-with-a-script/#findComment-623518 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.