[REL] [MySQL] WebDAV Logging script
I'm assuming you know how to make it so /webdav.php shows up as /webdav/ using htaccess, and you will also need to change the aliases around in apache/conf/httpd-dav.conf.
Contents of WebDAV.php:
PHP Code:
<?php
$con = mysql_connect("localhost", "root", "password") or die(mysql_error());
$db = mysql_select_db("dav_logs");
$ip = $_SERVER['REMOTE_ADDR'];
$checkQuery = mysql_query("SELECT * FROM logs WHERE ip = '".$ip."'");
if(mysql_num_rows($checkQuery))
{
mysql_query("UPDATE logs SET attempts = attempts + '1' WHERE ip = '".$ip."'");
}
else
{
mysql_query("INSERT into logs (ip,attempts) VALUES ('".$ip."', '1')");
}
echo "<center><b>WebDAV testpage</center>";
?>
Contents of log.php (or cunt.php):
PHP Code:
<?php
$con = mysql_connect("localhost", "root", "password") or die(mysql_error());
$db = mysql_select_db("dav_logs");
$gL = mysql_query("SELECT * FROM logs");
while($sL = mysql_fetch_assoc($gL))
{
$gN = mysql_query("SELECT * FROM logs WHERE ip = '".$sL['ip']."'");
$sN = mysql_num_rows($gN);
echo "<font face='tahoma'> Address: " . $sL['ip'] . " | Attempts: " . $sL['attempts'] . "<br>";
echo "</font face>";
}
?>
And the database structure:
Code:
CREATE TABLE IF NOT EXISTS `logs` (
`id` int(5) NOT NULL AUTO_INCREMENT,
`ip` varchar(50) NOT NULL,
`attempts` int(5) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `ip` (`ip`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;
Rate 'n' slate ladies
Re: [REL] [MySQL] WebDAV Logging script
spank ya for this mister Jonty ^_^
Re: [REL] [MySQL] WebDAV Logging script
Re: [REL] [MySQL] WebDAV Logging script
:L:L http://www.zaphotel.net/cunt.php
OT: Good release, will annoy 'attackers' alot. ;)
Re: [REL] [MySQL] WebDAV Logging script
Re: [REL] [MySQL] WebDAV Logging script
Very nice release Jonty :)
Re: [REL] [MySQL] WebDAV Logging script
Re: [REL] [MySQL] WebDAV Logging script
Re: [REL] [MySQL] WebDAV Logging script
Re: [REL] [MySQL] WebDAV Logging script
oh nice release, now I can go back to using Xampp xD
Re: [REL] [MySQL] WebDAV Logging script
Not much point in this, not flaming but not needed...
Re: [REL] [MySQL] WebDAV Logging script
Simple yet elegant. A clear thumbs up. Great work boi. Keep 'em comin.
Re: [REL] [MySQL] WebDAV Logging script
Quote:
Originally Posted by WEBDAV Log
Address: 81.231.21.58 | Attempts: 56
Lmfao!
Re: [REL] [MySQL] WebDAV Logging script
vLife, that so isnt me. I wasnt pressing F5 like a fool.. :)
Re: [REL] [MySQL] WebDAV Logging script
Quote:
Originally Posted by
davidon
oh nice release, now I can go back to using Xampp xD
What? You don't need this to 'fix' XAMPP, you could of simply denied all access to WebDAV. also, fuck XAMPP.