Månedsarkiv: maj 2004

Tilpas vindue efter indholds stoerese[IE]

<body leftmargin=”0″ topmargin=”0″ rightmargin=”0″ onblur=”self.close();”> <div id=’mydiv’> 1blablablalbalbalbalabababfgadZ 2blablablalbalbalbalabababfgadZ 3blablablalbalbalbalabababfgadZ 4blablablalbalbalbalabababfgadZ </div> <script> w=document.all[“mydiv”].clientWidth || document.getElementById(“mydiv”).offsetWidth; h=document.all[“mydiv”].clientHeight || document.getElementById(“mydiv”).offsetHeight; document.write(document.body.offsetWidth); document.write(document.getElementById(“mydiv”).offsetHeight); window.resizeTo((document.body.offsetWidth+6),(document.getElementById(“mydiv”).offsetHeight+30)); </script>

Udgivet i Knowledge Base, Old Base, Programmering | Skriv en kommentar

Stoerelsen paa en div i javascript [IE Only]

<div id=’mydiv’> Hvor hoej er den her crap div??<br><br><br>Saa hoej? </div> <script> height=document.all[“mydiv”].clientHeight || document.getElementById(“mydiv”).offsetHeight width=document.all[“mydiv”].clientWidth || document.getElementById(“mydiv”).offsetWidth alert(height+’ ‘+width) document.write(document.mytab.style.offsetHeight); </script>

Udgivet i Knowledge Base, Windows | Skriv en kommentar

Størrelsen på en div i javascript [IE Only]

<div id=’mydiv’> Hvor hoej er den her crap div??<br><br><br>Saa hoej? </div> <script> height=document.all[“mydiv”].clientHeight || document.getElementById(“mydiv”).offsetHeight width=document.all[“mydiv”].clientWidth || document.getElementById(“mydiv”).offsetWidth alert(height+’ ‘+width) document.write(document.mytab.style.offsetHeight); </script>

Udgivet i Old Base, Programmering, Windows | Skriv en kommentar

Tailing dmesg [mike style]

while true; do clear; dmesg | tail; sleep 2; done;

Udgivet i Knowledge Base, Shellscript | Skriv en kommentar

Blaster removal

http://securityresponse.symantec.com/avcenter/venc/data/w32.blaster.worm.html

Udgivet i Old Base, Security | Skriv en kommentar

Blaster removal

http://securityresponse.symantec.com/avcenter/venc/data/w32.blaster.worm.html

Udgivet i Knowledge Base, Security | Skriv en kommentar

Easy way to make new passwords

On FreeBSD: jot -r -c 160 a { | rs -g 0 8 It will output something like this: whhmuqxn amajtohu ydtetwjw ysnctfcl svsiypsf cvalnoex dvoburbw fedkcmfx pikwqwiv umaxmqcq iqmtcnny vsunccxj owghvpgo lndrpswr flgtvyjz vphojoqc zofbcxto reaixjhj hmoeabtg fukuimvk //Vladimirr.dk

Udgivet i FreeBSD, Knowledge Base, Old Base | Skriv en kommentar

Register globals workaround

Be sure to think of the consequenses <? if (!empty($_REQUEST)) { extract($_REQUEST); } print $fisk; ?>

Udgivet i Knowledge Base, Old Base | Skriv en kommentar

ProFTPD via MySQL

ProFTPD via MySQL With mod_sql you can handle your user authentication in ProFTPD via an MySQL table. Required is a fresh compiled actual ProFTPD with mod_sql enabled. Enable mod_sql ./configure –with-modules=mod_sql:mod_sql_mysql First you should create an new datebase named “proftpd” … Læs resten

Udgivet i Knowledge Base, Old Base, SQL | Skriv en kommentar

sql til mod_sql_log

smid mod_sql_log ind: http://www.outoforder.cc/projects/apache/mod_log_sql/’ guide: http://www.linux-mag.com/2002-10/lamp_01.html sæt flg i mod_sql_log.conf: LogSQLLoginInfo localhost apache KoDe LogSQLSocketFile /var/run/mysql/mysql.sock LogSQLDatabase apache LogSQLCreateTables On LogSQLMassVirtualHosting On LogSQLPreserveFile apache_queries.sql nice queries: # sidste 30 besøg med lidt relevant data SELECT remote_host, request_uri, bytes_sent, status, FROM_UNIXTIME(time_stamp) … Læs resten

Udgivet i Apache, Knowledge Base, Old Base, SQL | Skriv en kommentar