From: b Date: Sun, 19 Jan 2014 18:42:51 +0000 (+0000) Subject: Two everythings are ready! X-Git-Url: http://bicyclesonthemoon.info/git-projects/?a=commitdiff_plain;h=4c4bdbfd7d86fbc75046c2f80c71c08d02472afe;p=ott%2Fenhance Two everythings are ready! git-svn-id: svn://botcastle1b/npb@27 0d794883-4e4e-4f65-aa7a-0e7f5947bab5 --- diff --git a/403 b/403 index 5a5a1bb..06ca40e 100755 Binary files a/403 and b/403 differ diff --git a/403.htm b/403.htm index a555251..bfae310 100644 --- a/403.htm +++ b/403.htm @@ -1,12 +1,12 @@ - It's NewpixbOTTification time! + It's 403fication time! 1190.bicyclesonthemoon.dnsd.info -

It's 403ification time!

+

It's 403fication time!

403 by URL
URL of image: diff --git a/npbd b/npbd index 7d3edec..b2f68dd 100755 Binary files a/npbd and b/npbd differ diff --git a/npbd.cpp b/npbd.cpp index 4f4e38f..6130131 100644 --- a/npbd.cpp +++ b/npbd.cpp @@ -1,5 +1,5 @@ - // //Download images and add - // // Newpixbots to them! +// // //Download images and add + // // Newpixbots to them! (or Megans) // // // // Requires cgilib // // //line 146 of cgi.h @@ -12,16 +12,21 @@ #include #include #include -//#include #include +#include #include #include -#define WGET_PATH "/usr/bin/wget" -#define NPB_PATH "./npb" -#define RM_PATH "/bin/rm" -#define LOG_PATH "/var/log/npb/npb.log" -#define USERAGENT "NewpixbOTTification\x20(1190.bicyclesonthemoon.dnsd.info/npb/npb.htm)" +#define WGET_PATH "/usr/bin/wget" +#define NPB_PATH "./npb" +#define MEG_PATH "./403" +#define RM_PATH "/bin/rm" +#define LOG_PATH "/var/log/npb/npb.log" +#define LOG_PATH2 "/var/log/npb/403.log" +#define USERAGENT "NewpixbOTTification\x20(1190.bicyclesonthemoon.dnsd.info/npb/npb.htm)" +#define USERAGENT2 "403fication\x20(1190.bicyclesonthemoon.dnsd.info/npb/403.htm)" +#define MSTD_PATH "/pro/npb/mpb.png" +#define MSTD_PATH2 "/pro/npb/503.png" int main (int argc, char *argv[]); void mustard(int mustard); @@ -38,11 +43,19 @@ struct stat st; unsigned long p; unsigned short q; char **up; +bool meg=false; int main (int argc, char *argv[]) { cgi=cgiInit(); + sprintf(path,"%s",(getenv("PATH_INFO")!=NULL)?(getenv("PATH_INFO")):""); + if(strcmp(path,"/403")==0) + { + meg=true; + //mustard(0); + } + up=cgiGetFiles(cgi); if (up) { @@ -58,7 +71,7 @@ int main (int argc, char *argv[]) sub=fork(); if(sub==0) { - t=execl(WGET_PATH,WGET_PATH,"-q","-t","2","-U",USERAGENT,"-O",path,url,(char *)0); + t=execl(WGET_PATH,WGET_PATH,"-q","-t","2","-U",meg?USERAGENT2:USERAGENT,"-O",path,url,(char *)0); exit(t); } waitpid(sub,&t,0); @@ -68,7 +81,7 @@ int main (int argc, char *argv[]) sub=fork(); if(sub==0) { - t=execl(NPB_PATH,NPB_PATH,path,path,"q",(char *)0); + t=execl(meg?MEG_PATH:NPB_PATH,meg?MEG_PATH:NPB_PATH,path,path,"q",(char *)0); exit(t); } waitpid(sub,&t,0); @@ -102,7 +115,7 @@ void mustard(int mustard) { if(mustard) { - cgiRedirect("/pro/npb/mpb.png"); + cgiRedirect(meg?MSTD_PATH2:MSTD_PATH); } sub=fork(); if(sub==0) @@ -111,7 +124,7 @@ void mustard(int mustard) exit(t); } waitpid(sub,&t,0); - pix=fopen(LOG_PATH,"at"); + pix=fopen(meg?LOG_PATH2:LOG_PATH,"at"); if(pix!=NULL) { fprintf(pix,"%x %s\n",mustard,url);