From 6f44fa9b58b9696731c5049c3be9686a4d286a56 Mon Sep 17 00:00:00 2001 From: LE Xuan Sang Date: Thu, 22 Oct 2015 11:49:38 +0200 Subject: [PATCH] add plugins --- plugins/cookiex/cookiex.c | 32 +++++ plugins/cookiex/cookiex.c.o | Bin 0 -> 4428 bytes plugins/fileman/.DS_Store | Bin 0 -> 6148 bytes plugins/fileman/fileman.c | 188 ++++++++++++++++++++++++++++++ plugins/fileman/fileman.c.o | Bin 0 -> 14664 bytes plugins/pluginsman/.DS_Store | Bin 0 -> 6148 bytes plugins/pluginsman/pluginsman.c | 76 ++++++++++++ plugins/pluginsman/pluginsman.c.o | Bin 0 -> 9916 bytes 8 files changed, 296 insertions(+) create mode 100644 plugins/cookiex/cookiex.c create mode 100644 plugins/cookiex/cookiex.c.o create mode 100644 plugins/fileman/.DS_Store create mode 100644 plugins/fileman/fileman.c create mode 100644 plugins/fileman/fileman.c.o create mode 100644 plugins/pluginsman/.DS_Store create mode 100644 plugins/pluginsman/pluginsman.c create mode 100644 plugins/pluginsman/pluginsman.c.o diff --git a/plugins/cookiex/cookiex.c b/plugins/cookiex/cookiex.c new file mode 100644 index 0000000..26f74aa --- /dev/null +++ b/plugins/cookiex/cookiex.c @@ -0,0 +1,32 @@ +#include "../plugin.h" + +void init(); +call __init__ = init; + +void init() +{ + printf("Finish init\n"); +} + +void execute(int client,const char* method,dictionary rq) +{ + + /** + * Set cookie to the browser + */ + char* c = server_time(); + dictionary d = dict(); + dput(d,"test",c); + dput(d,"test1","This is another cookie"); + set_cookie(client,d); + + LOG("%s",c); + __t(client,"

Set the cookie

"); + freedict(d); +} + +void get(int client,const char* method,dictionary rq) +{ + + +} \ No newline at end of file diff --git a/plugins/cookiex/cookiex.c.o b/plugins/cookiex/cookiex.c.o new file mode 100644 index 0000000000000000000000000000000000000000..fb3f9d4d644ae1934bf9adbbda376afffa463867 GIT binary patch literal 4428 zcmbVQe`s6R6~6E3$&n>llH;aHH+xk{+@%Ya?B)ksmbP{pc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pmpdRl&28=k3%Uu>d12> z5S}6AzbAp5gOWc+0txe>jnbMA)A(O}!t3iM9WJOG!qwyH?$ZZP_RpP47}j&MrR;OF`=437G>iJDp)WyShhBvK3HndyWhnFK33xM* zf+9^kfVKq&#S@Mu9(VZZQ+Qa?#3M|+f(rqr15k;zBwjqS#ET~<8}cX(djt(dt`B;w zlB}?oHLj@-uYk@^sShXBc;cWkW->-5xgmB2QJ7UXGCdE-WSeW{^T=DX&-9eP`7 zKMqWZpX7mYto5tF?UeXQK5P7b1)r2seQyA_Bv3$pfw>}&>9mi81#?%YRke-1O)gEV5(iI@VjJO_+9c{@wo8)!Z~mBF9_#+ zlH0<+E!-9UJ>m1h9|ljylnP(5cq^unP!>qxe3FOz9L0dMj>5M^+Cu3?VI|+u!uPju z9zHAm`DU<^543OHm_ei>rFg8$G7Dcu<_prg|7w2 f(GI+-V3VtC#Ln?6Tf>0hoq{_BcM0wmH1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0next) + { + route = __s("%s%s%s", route, DIR_SEP, np->e.value.s); + if(flist == NULL) + flist = __s(FOLLIST, np->e.value.s,route); + else + flist = __s("%s,%s", flist,__s(FOLLIST,np->e.value.s,route)); + } + } + free(path); + //free(route); + return flist; +} + +void execute(int client,const char* method,dictionary rq) +{ + DIR *d; + struct dirent *dir; + struct stat st; + int frec=0,rrec = 0, id =0; + char* flist = "",*dlist = ""; + char* tmp= NULL; + char* rpath = R_STR(rq,"path"); + if(!rpath || strlen(rpath) == 0) rpath = DIR_SEP; + char* path = __s("%s%s",__plugin__.htdocs,rpath); + d = opendir(path); + + if (d) + { + while ((dir = readdir(d)) != NULL) + { + //ignore curent directory, parent directory and hidden files and folders + if(strcmp(dir->d_name,".") == 0 || + strcmp(dir->d_name,"..")==0|| *(dir->d_name)=='.') continue; + if( stat(__s("%s%s%s",path,DIR_SEP,dir->d_name), &st) == 0 ) + { + if(S_ISDIR(st.st_mode)) + { + tmp = __s(FRECORD,id, + dir->d_name, + (int)st.st_size, + __time(st.st_mtime), + 0, + "font-weight: bold;", + "folder"); + if(rrec != 0) + dlist = __s("%s,%s",dlist,tmp); + else + dlist = tmp; + rrec++; + //free(tmp); + + } else + { + tmp = __s(FRECORD, id, + dir->d_name, + (int)st.st_size, + __time(st.st_mtime),1,"", + mime(dir->d_name)); + if(frec != 0) + flist = __s("%s,%s",flist,tmp); + else + flist = tmp; + frec++; + //free(tmp); + } + id++; + } + } + closedir(d); + if(strlen(dlist) == 0) + dlist = flist; + else if(strlen(flist) > 0) + dlist = __s("%s,%s",dlist,flist); + } + json(client); + __t(client,RRECORD,dlist,frec+rrec,rpath,folder_list_from(rpath)); + if(path) free(path); + //if(rpath) free(rpath); + if(tmp) free(tmp); + +} + +void add(int c, const char* m, dictionary rq) +{ + json(c); + if(IS_GET(m)) + { + __t(c,__RESULT__,0,"Bad request:GET"); + return; + } + char* rpath = R_STR(rq,"path"); + if(!rpath) + { + __t(c,__RESULT__,0,"Unknow path"); + return; + } + + char * file_name = R_STR(rq,"pfile.file"); + if(file_name == NULL) + { + __t(c,__RESULT__,0,"Cannot send file to server"); + return; + } + + int size = R_INT(rq,"pfile.size"); + if(size>MAXSIZE) + { + __t(c,__RESULT__,0,"Cannot accept file more than 500Kb"); + return; + } + if(!upload(R_STR(rq,"pfile.tmp"),__s("%s/%s/%s",__plugin__.htdocs,rpath,file_name))) + { + __t(c,__RESULT__,0,"Cannot move file to plugin dir"); + return; + } + __t(c,__RESULT__,1,"OK"); + return; +} + +void mkfolder(int c, const char* m, dictionary rq) +{ + json(c); + if(IS_GET(m)) + { + __t(c,__RESULT__,0,"Bad request:GET"); + return; + } + char* dname = R_STR(rq,"dname"); + char* rpath = R_STR(rq, "path"); + if(!dname) + { + __t(c,__RESULT__,0,"Folder name is empty"); + return; + } + if(!rpath) + { + __t(c,__RESULT__,0,"Unknow path"); + return; + } + if(mkdir(__s("%s%s%s%s",__plugin__.htdocs,rpath,DIR_SEP,dname), 0755)) + { + __t(c,__RESULT__,0,"Error when create directory."); + return; + } + __t(c,__RESULT__,1,"OK"); +} + +void rmfolder(int c, const char* m, dictionary rq) +{ + json(c); + if(IS_GET(m)) + { + __t(c,__RESULT__,0,"Bad request:GET"); + return; + } + char* name = R_STR(rq,"name"); + char* rpath = R_STR(rq, "path"); + if(!name) + { + __t(c,__RESULT__,0,"Folder name is empty"); + return; + } + if(!rpath) + { + __t(c,__RESULT__,0,"Unknow path"); + return; + } + removeAll(__s("%s%s%s%s",__plugin__.htdocs,rpath,DIR_SEP,name),1); + //LOG("%s\n",name ); + //LOG("%s\n",rpath ); + __t(c,__RESULT__,1,"OK"); +} diff --git a/plugins/fileman/fileman.c.o b/plugins/fileman/fileman.c.o new file mode 100644 index 0000000000000000000000000000000000000000..24ac80d4c95c6307be6713fc72b2667977f3c5c1 GIT binary patch literal 14664 zcmb_j3z$>YwLVGCnF*Q9WS9X(F&O57pfE2UQWPEPpg~7P1Vm9oNHQ}inIt3`9?DP# z86~DDinLa3K`&LbwsNajt>CBC>$6sCRp`BXi`IUH@7ikB`e;?||L?O-CKJZ1y9^DX7SD(Cc(Z<;*z;Q%;ea9S zDgTneP_ey)M96?>=4zTGVL-a~&cF?}rZFO=wpUztEpd}TBq4g}iU z2D+kYR{iZFd})HFacMs`S<|G6B72dpKt~F*VOA)f-==y~e!v7Rd7^1gs8*(FT~?k* z_bZuknX|>lxJ3`5{gZ)<@bezl3hHTdk$7GbCo>>toQaOku`m7W8pxmKm-&-Ogy&pu^oOVc?D ze`yKf`ysX^^?Y>skpJ-E!%bwV*=BMwSq#8R;G@LCb zWP3kDJ{e9-dlbklU@6N^UEciq-9GKZS?X?B`TFwcB%BDQM4*sPkvrjvN7N>lBZG+B3x?Kw;4cP?S>}P)2|T zbN!rh5ionG_H!-)YjNlHaxAm`d*GSbaal$@!ZCH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_{#B@dS`oje zh|7HeQuDe6P+0%kBK}knpI5{~MSNcoA78{XMSOG-=WAx6KMxdfEnr4C3qI!r@IN%E zj|0FE;)#Jk0N*sy$ygMjWCVrrF~Iub69}81Y@lKW76So(+CVTfnyQ;~-uZ2_r%loD zu>oI(3I+U1I#7)N*mG7arnLte_&=kW&@9*@I9YIt;8ekBf+q`37yO1`bCZ>^EH+yvn=PBo zmeFR*YO`gw*|OVg8E&>Lw^){2EXysHZm}%4Se9EX%afZh_x}rd C0xMqt literal 0 HcmV?d00001 diff --git a/plugins/pluginsman/.DS_Store b/plugins/pluginsman/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0d_name,".") == 0 || + strcmp(dir->d_name,"..")==0 || *(dir->d_name)=='.') continue; + if( stat(__s("%s%s",__plugin__.pdir,dir->d_name), &st) == 0 ) + { + if(nrec != 0) + __t(client,","); + __t(client,"{\"name\":\"%s\",\"size\":%d,\"changed\":\"%s\"}", + dir->d_name, + (int)st.st_size, + __time(st.st_mtime) + ); + nrec++; + } + } + closedir(d); + } + __t(client,"], \"total\":%d}",nrec); + +} + +void install(int c, const char* m, dictionary rq) +{ + char * result = "{\"result\":%d,\"msg\":\"%s\"}"; + json(c); + if(IS_GET(m)) + { + __t(c,result,0,"Bad request:GET"); + return; + } + if(R_INT(rq,"test") != NULL) + LOG("Test is :%d \n",R_INT(rq,"test")); + char * file_name = R_STR(rq,"pfile.file"); + char* file_ext = R_STR(rq,"pfile.ext"); + if(file_name == NULL) + { + __t(c,result,0,"Cannot send file to server"); + return; + } + + if(strcasecmp(file_ext,PEXT) == 0) + { + int size = R_INT(rq,"pfile.size"); + if(size>MAXSIZE) + { + __t(c,result,0,"Cannot accept file more than 500Kb"); + return; + } + if(!upload(R_STR(rq,"pfile.tmp"),__s("%s/%s",__plugin__.pdir,file_name))) + { + __t(c,result,0,"Cannot move file to plugin dir"); + return; + } + __t(c,result,1,"OK"); + return; + } + + __t(c,result,0,"This is not a plugin file"); +} diff --git a/plugins/pluginsman/pluginsman.c.o b/plugins/pluginsman/pluginsman.c.o new file mode 100644 index 0000000000000000000000000000000000000000..a6a15ff70d9c57dcfb4822b5af30d720a4a28fcd GIT binary patch literal 9916 zcmb7K3wTuJnf_;T&SWMhnIr@d(SaceHy1Lwa7htuP=Z6b7C~{<4wIQlGBTMNW+pKx zQBsH{PsB=H+_t)lw06~9t3H;h+p2|yRxMuIZWY?6*x1J#E!)+{^@6ps?|aU7a+y%u zo+tmj-~0XF|NZxW&i7AV`uKl7EmX=;pzwjDA^CNFAmKR|>3%Bz!n13VmC?j9cx(=z zipfhQo=_+k>&{uS#n(4)TtCch>18$q5B;&)XMIXtNQI`h6YM7xipE+x+d}bVYl^y1 zXz7(p)-AKMmF?$j3I^4qsv8nHx59W1pRy@U2~9`KyiUpAL9GxPl&DmK+>h0K*>oW)0cp4DF>6*;TF z;_?wCA+DS_nuDFyUnZPvi)F|5_wV-?L099+HmNog8ogd@e{C{Y`RyCkIQR&K!s&D( z7D|RY*t{|Gk(KeOi}4q0Z#>@nkdsddLn%AURB@ckC>2>7 ziIH0$jdB$nTp;P;45R^H*%fi%sd%!3n*mYrsnT*oTw1ph3ai zrYGrDa3DQtguDL#lEw#je?Lg$QI+@I3Mai!+1)DL$-_jNIoxkZBRmeQy1)OY!GYb~ z@YerSlj-xN{=JJ$p|2J&YV<6NfxXNa*iEbD{RgE@1G`ys?;#!y{ib~K`=6qX_E7fs z%|ZTfdj|H>-tJKEkwKKZ_Hb+IRIG4wes`Q|3ho{=xg+OvpywU&H)0O@&WEGAUj%oT z06F2ofzCmx=H%Bnhca^mJ#Sl`i@X!;{gl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