sp1r1t.org

you are here : [-->programming]

base || news || coding || networks || linux || bioinf || stuff || contact



programming and source code

code (more or less usefull) :

setstdprnt : script to set the default printer of a win32 box
spit.c : udp flooder
webdns : webbased ip - hostname lookup tool
sd_moc.cmd : script to shut down the hosts of a MOC environment
ftpscan : scan IPs for active ftp servers
url2text : a 3 line perl script to decode an url
cdplayer : simple linux console cd-player
ascii-decode : perl script that translates binary, decimal, oktal and hexadecimal digits to ascii characters
sentimental torpedo : a 2D space action game
university code snippets : various stuff written for university classes
birthday reminder : perl script to be run by cron that reminds you of birthdays of friends and ex-girlfriends




setstdprnt (VBscript)

this small vb script sets the default printer on a m$ box. especially useful for networked boxes, call the script with different arguments for machines in different rooms to make your machines use the printer nearest to them as their default printer.

This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license.

usage: "setstdprnt.vbs printername"

download link (http) : setstdprnt.zip





webDNS - PHP based web frontend to do IP <-> hostname resolving

may seem absolutely senseless at first and only consists of very few lines of php code, but i need it from time to time, especially at school, where dns is only available via a http-only proxy, not directly to the client machines. this means you can't access a ftpserver though ftp is not blocked by the firewall - simply because you don't know its IP. this program solves the problem ;-).

scr is trivial, but nevertheless available for both the html form and the php script . of course, the program can also be used online.



sd_moc.bat - win32 batch file to remotely shut down the hosts of a MOC environment

a simple batch file using shutdown.exe to make sure all MOC hosts are shut down at the end of the course so you don't have to run around the room and switch every box off manually. there's nothing you can do with it if you don't know what a MOC environment is. fire it up from an account with appropriate priviledges, admin of nwtraders.msft is an obvious example.

grab it (.bat) .



ftpscan - ftp server scanner

ftpscan is a perl script that allows you to scan IPs for ftpservers. it features options to search for all servers, anonymous ftp servers or file dumps.

this is a very early version, use with caution! scanning IP ranges is not yet supported so you need to feed the program a file with a list of IPs using the -l option. various other things may or may not work. you have been warned.

the perl script is available here . there is also a very early man page for linux in raw format, you can get it here. you need to process the page using groff, the command is : groff -man -Tascii ftpscan.1



url2text.pl : a 3 line perl script to decode an url

decodes base64 encoded string to human readable string. usage example :

./url2text.pl %22%20%44%64
" Dd

grab it (.pl)




cdplayer : a simple console cd-player for linux

bzipped source and make file, run 'cdplayer --help' for more info.


grab it (.tar.bz2)




ascii-decode

perl script that translates binary, decimal, oktal and hexadecimal digits to ascii characters.


the perl script and some example input




Sentimental Torpedo (ST): a 2D space action game

ST development has begun and a Subversion repo is available for project members. ST is written in C++ using the libSDL .

See our development server for repo access.






university code snippets : various stuff written for university classes

perfect-numbers.cpp - calculate perfect numbers

Hanoi.java - solves the "towers of hanoi" - problem

seven-seg-display.py - a seven-seg display

bubble-sort.py - bubble sort algorithm






birthday reminder : perl script to be run by cron that reminds you of birthdays of friends and ex-girlfriends

this is a quick hack done in a few hours. see README for instructions and more info.

bday-notice.pl - the script itself

README - readme file

addressbook.csv - example data







base || news || coding || networks || linux || bioinf || stuff || contact