Kategoriarkiv: Old Base

htaccess password

AuthName “– Clasified area –” AuthType Basic AuthUserFile /data/www/htpasswd require user dinuser password filen laver du med /sti/til/apache/htpasswd -c .htpasswd dinuser  

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

Custom 404 i apache

Tilfoej: ErrorDocument 404 /404.html Til httpd.conf , enten i selve filen eller i et virtualhosts statement. Kan efter sigende ogsaa placeres i .htaccess. Filen skal her ligge i webroden af det aktuelle domaene. Ellers kan det nævnes at der er … Læs resten

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

Checking if someone is online with ICQ in PHP

<?php // *** // ICQ tjek funktion // *** function icq_test($uin) { $arr = file( “http://online.mirabilis.com/scripts/online.dll?icq=$uin&img=1”); $len = strlen($arr[1]); if ($len == 96) { return “<b><font color=\”#00FF00\”>Online</font></b>”; } elseif ($len == 83) { return “<b><font color=\”#FF4040\”>Offline</font></b>”; } elseif ($len == … Læs resten

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

Sessions i php

session_start(); if ( $_SESSION[“nick”] != “”)

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

Mål bandwidth troughput

http://freshmeat.net/redir/iperf/30604/url_tgz/iperf-1.7.0-source.tar.gz root@chilibeans:~/iperf-1.7.0# iperf -s -c localhost ———————————————————— Server listening on TCP port 5001 TCP window size: 64.0 KByte (default) ———————————————————— [ 6] local 127.0.0.1 port 5001 connected with 127.0.0.1 port 1952 [ ID] Interval Transfer Bandwidth [ 6] 0.0-10.0 sec … Læs resten

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

Keeping up2date with deamons

Apache http://httpd.apache.org/lists.html#http-announce

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

DECSystem 5100 running ultrix password recovery

i mounted /usr and got access to ‘vi’ and also ‘passwd’ changed the root pass and logged in. Here is a short guide on how to do when or if the problem arises for somebody else: How to recover root … Læs resten

Udgivet i Knowledge Base, Old Base, Retro hardware | Skriv en kommentar

Aabne sockets i freebsd

peanut# lsof | grep IPv4 syslogd 245 root 5u IPv4 0xc2799b94 0t0 UDP *:syslog sshd 398 root 4u IPv4 0xc27b5a70 0t0 TCP *:ssh (LISTEN) sendmail 403 root 3u IPv4 0xc27b55b8 0t0 TCP *:smtp (LISTEN) sendmail 403 root 5u IPv4 0xc27b535c … Læs resten

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

Add linux /proc in freebsd

Add to /etc/fstab: linproc /compat/linux/proc linprocfs rw 0 0

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

Debug Tools

strace <command> ¸ viser loebende hvad programmet laver ldd viser lib-deps: root@chilibeans:~/openssh-3.7p1# ldd /usr/local/sbin/sshd libutil.so.1 => /lib/libutil.so.1 (0x7002e000) libz.so.1 => /usr/lib/libz.so.1 (0x70040000) libnsl.so.1 => /lib/libnsl.so.1 (0x70060000) libcrypto.so.0 => /usr/lib/libcrypto.so.0 (0x70086000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x7018a000) libc.so.6 => /lib/libc.so.6 (0x701c8000) /lib/ld-linux.so.2 => … Læs resten

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