-
[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.
-
Re: [REL] [MySQL] WebDAV Logging script
Address: 99.249.27.134 | Attempts: 1248
failure lol gg
-
Re: [REL] [MySQL] WebDAV Logging script
Isn't it will make lag if I'll open /webdav.php 100 000 times?
-
Re: [REL] [MySQL] WebDAV Logging script
K girls, anymore spam etc will result in an immediate infraction not warnings this time :D
-
Re: [REL] [MySQL] WebDAV Logging script
Quote:
Originally Posted by
Rav4eG
Isn't it will make lag if I'll open /webdav.php 100 000 times?
Someone deleted my post. I was saying, You have to configure the web server properly, (also fuck you for deleting my post, it was insightful.). Anyway, you have to configure your web server securely, to drop multiple connections from the same IP at once, if you don't you're clearly an idiot, or if you can't don't bother opening a hotel, it gets harder than setting up Apache yourself, properly and securely.
-
Re: [REL] [MySQL] WebDAV Logging script
Heres a configswitch for that faggot PEhump2:
PHP Code:
<?php
require "dav_global.php"; // this is where you add yo config shit to
$ip = $_SERVER['REMOTE_ADDR'];
$config['use_sql'] = "1"; // 1 = yes, 0 = no
$config['ban_user'] = "0"; // 1 = yes, 0 = no -- REQUIRES MYSQL TO BE USED, BUT FLATFILE CAN STILL BE USED
$config['dav_log_dir'] = "dav-logs";
$config['random_num'] = rand();
if($config['use_sql']=="1")
{
$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')");
}
}
elseif($config['use_sql']=="0")
{
file_put_contents($config['dav_log_dir'] . "/" . $ip . ".log", "
IP: " . $ip . " -- banned: (" . $config['ban_user'] . ")");
}
else
{
die('Invalid DAVLog settings. Please refer to WebDAV.php or dav_global.php');
}
echo "<center><b>WebDAV testpage</center>";
?>
I wont include dav_global, instead, do it yourself, i'm not spoonfeeding you.
---------- Post added at 01:48 PM ---------- Previous post was at 12:30 PM ----------
Heres one that bans the person IF they have an account on the IP they are using;
PHP Code:
<?php
require "dav_global.php";
$ip = $_SERVER['REMOTE_ADDR'];
$config['use_sql'] = "1"; // 1 = yes, 0 = no
$config['ban_user'] = "0"; // 1 = yes, 0 = no -- REQUIRES MYSQL TO BE USED, BUT FLATFILE CAN STILL BE USED
$config['dav_log_dir'] = "dav-logs";
$config['random_num'] = rand();
if($config['use_sql']=="1")
{
$checkQuery = mysql_query("SELECT * FROM logs WHERE ip = '".$ip."'");
$db2 = mysql_select_db('r63_db');
if(mysql_num_rows($checkQuery))
{
$queR = mysql_query("SELECT * FROM users WHERE ip_last = '" . $ip . "'");
if(mysql_num_rows($queR))
{
$getID = mysql_query("SELECT * FROM users WHERE ip_last = '" . $ip . "'");
while($row = mysql_fetch_assoc($getID))
{
if($config['ban_user']=="1")
{
mysql_query("INSERT INTO bans (id,bantype,value,reason,expire,added_by,added_date,appeal_state) VALUES ('".$row['id']."', 'user', '".$row['username']."', 'Suspicious activity', '1655882375', 'WebDAV Automation', 'Unknown', '0')");
}
}
}
mysql_query("UPDATE logs SET attempts = attempts + '1' WHERE ip = '".$ip."'");
}
else
{
mysql_query("INSERT into logs (ip,attempts) VALUES ('".$ip."', '1')");
}
}
elseif($config['use_sql']=="0")
{
file_put_contents($config['dav_log_dir'] . "/" . $ip . ".log", "
IP: " . $ip . " -- banned: (" . $config['ban_user'] . ")");
}
else
{
die('Invalid DAVLog settings. Please refer to WebDAV.php or dav_global.php');
}
echo "<center><b>WebDAV testpage</center>";
?>
-
Re: [REL] [MySQL] WebDAV Logging script
yea but still it worked for me ^.^
-
Re: [REL] [MySQL] WebDAV Logging script
Well I did code it to work :/
-
Re: [REL] [MySQL] WebDAV Logging script
-
Re: [REL] [MySQL] WebDAV Logging script
Love the release (:
Now those noob attackers (:
Thanks!
-
Re: [REL] [MySQL] WebDAV Logging script
To be perfectly honest, this isn't a Habbo release,Should be in Programming/Coding section,