Jump to content

Need some help with a Script


Lol5916

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.