Changeset 24255
- Timestamp:
- 10/13/13 02:16:16 (9 years ago)
- Location:
- titan/plugins/tithek
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/plugins/tithek/filenuke.h
r24251 r24255 6 6 debug(99, "in host: %s file: %s", host, file); 7 7 int debuglevel = getconfigint("debuglevel", NULL); 8 char* tmphost = NULL; 9 char* tmpfile = NULL; 10 char* tmpstr = NULL; 11 char* send = NULL; 12 char* id = NULL; 13 char* fname = NULL; 14 char* op = NULL; 15 char* hash = NULL; 16 char* hashlen = NULL; 17 char* ip = NULL; 18 char* b36code = NULL; 19 char* base = NULL; 20 char* search = NULL; 21 char* post = NULL; 22 char* streamlink = NULL; 23 char* cmd = NULL; 24 25 char* tmpstr2 = NULL; 26 char* tmpstr3 = NULL; 27 char* charlist = NULL; 8 char* tmphost = NULL, *error = NULL, *tmpfile = NULL, *tmpstr = NULL, *send = NULL, *id = NULL, *fname = NULL, *op = NULL, *hash = NULL, *hashlen = NULL, *ip = NULL; 9 char* b36code = NULL, *base = NULL, *search = NULL, *post = NULL, *streamlink = NULL, *cmd = NULL, *tmpstr2 = NULL, *tmpstr3 = NULL, *charlist = NULL; 28 10 29 11 if(host == NULL || file == NULL) return NULL; 30 12 31 tmphost = ostrcat( host, NULL, 0, 0);13 tmphost = ostrcat("www.", host, 0, 0); 32 14 tmpfile = ostrcat("/", file, 0, 0); 33 15 debug(99, "tmphost: %s", tmphost); … … 43 25 if(ostrstr(tmpstr, "<title>The page is temporarily unavailable</title>") != NULL) 44 26 { 45 tmpstr = string_resub("<td align=\"center\" valign=\"middle\">", "</td>", tmpstr, 1);46 string_deltags( tmpstr);47 tmpstr = string_replace("Terms", "\nTerms", tmpstr, 1);48 tmpstr = strstrip(tmpstr);49 if( tmpstr == NULL || strlen(tmpstr) == 0)50 tmpstr = ostrcat(_("The page is temporarily unavailable"), tmpstr, 0, 1);51 textbox(_("Message"), tmpstr, _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1200, 400, 0, 0);27 error = string_resub("<td align=\"center\" valign=\"middle\">", "</td>", tmpstr, 0); 28 string_deltags(error); 29 error = string_replace("Terms", "\nTerms", error, 1); 30 error = strstrip(error); 31 if(error == NULL || strlen(error) == 0) 32 error = ostrcat(_("The page is temporarily unavailable"), error, 0, 1); 33 textbox(_("Message"), error, _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1200, 400, 0, 0); 52 34 goto end; 53 35 } … … 235 217 end: 236 218 219 free(error); error = NULL; 237 220 free(tmphost); tmphost = NULL; 238 221 free(tmpfile); tmpfile = NULL; -
titan/plugins/tithek/flashx.h
r24254 r24255 8 8 debug(99, "hosterurl: %s", hosterurl); 9 9 int debuglevel = getconfigint("debuglevel", NULL); 10 char* tmphost = NULL; 11 char* tmppath = NULL; 12 char* tmpstr = NULL; 13 char* send = NULL; 14 char* streamlink = NULL; 15 char* ip = NULL, *pos = NULL, *path = NULL; 10 char* tmphost = NULL, *tmppath = NULL, *tmpstr = NULL, *send = NULL, *streamlink = NULL, *ip = NULL, *pos = NULL, *path = NULL, *error = NULL; 16 11 17 12 if(host == NULL || file == NULL) return NULL; … … 43 38 tmpstr = gethttpreal(tmphost, tmppath, 80, NULL, NULL, NULL, 0, send, NULL, 5000, 1); 44 39 titheklog(debuglevel, "/tmp/flashx_tmpstr_get1", NULL, tmpstr); 45 // writesys("/var/usr/local/share/titan/plugins/tithek//flashx_tmpstr_get1", tmpstr, 0); 46 //printf("\n#######################################################\n"); 47 40 writesys("/var/usr/local/share/titan/plugins/tithek//flashx_tmpstr_get1", tmpstr, 0); 41 //printf("\n#######################################################\n"); 42 43 if(ostrstr(tmpstr, "<center>Video not found, deleted or abused, sorry!<br") != NULL) 44 { 45 error = string_resub("<li> <center>", "<br", tmpstr, 0); 46 string_deltags(error); 47 error = strstrip(error); 48 if(error == NULL || strlen(error) == 0) 49 error = ostrcat(_("The page is temporarily unavailable"), NULL, 0, 0); 50 textbox(_("Message"), error, _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1200, 400, 0, 0); 51 goto end; 52 } 53 48 54 char* cookie1 = string_resub("Set-Cookie: pageredir=", ";", tmpstr, 0); 49 55 debug(99, "cookie1: %s", cookie1); … … 84 90 85 91 titheklog(debuglevel, "/tmp/flashx_tmpstr_get2", NULL, tmpstr); 86 //writesys("/var/usr/local/share/titan/plugins/tithek//flashx_tmpstr_get2", tmpstr, 0);92 writesys("/var/usr/local/share/titan/plugins/tithek//flashx_tmpstr_get2", tmpstr, 0); 87 93 //printf("\n#######################################################\n"); 88 94 … … 90 96 char* hash2tmp = string_resub("<input type=\"hidden\" name=\"id\" value=\"", "\"", tmpstr, 0); 91 97 98 if(hash1tmp == NULL || hash2tmp == NULL) goto end; 92 99 char* hash1 = htmlencode(hash1tmp); 93 100 char* hash2 = htmlencode(hash2tmp); 101 free(hash1tmp); hash1tmp = NULL; 102 free(hash2tmp); hash2tmp = NULL; 94 103 95 104 // htmldecod cant / to %2f … … 101 110 hash = ostrcat(hash, hash2, 0, 0); 102 111 char* hashlen = NULL; 112 113 if(hash == NULL) goto end; 103 114 hashlen = oitoa(strlen(hash)); 104 115 debug(99, "hashlen: %s", hashlen); … … 122 133 send = ostrcat(send, "\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\n", 1, 0); 123 134 send = ostrcat(send, hash, 1, 0); 124 135 free(hash); hash = NULL; 136 free(hashlen); hashlen = NULL; 137 125 138 debug(99, "send: %s", send); 126 139 tmpstr = gethttpreal(tmphost, "/player/show.php", 80, NULL, NULL, NULL, 0, send, NULL, 5000, 1); 127 140 128 141 titheklog(debuglevel, "/tmp/flashx_tmpstr_get3", NULL, tmpstr); 129 //writesys("/var/usr/local/share/titan/plugins/tithek//flashx_tmpstr_get3", tmpstr, 0);142 writesys("/var/usr/local/share/titan/plugins/tithek//flashx_tmpstr_get3", tmpstr, 0); 130 143 //printf("\n#######################################################\n"); 131 144 //var code ='<object id="nuevoplayer" width="'+ww+'" height="'+hh+'" data="http://play.flashx.tv/nuevo/player/player.swf?config=http://play.flashx.tv/nuevo/player/play.php?str=4MfrzrW4qrPKnM2dw5/Fvcs=" type="application/x-shockwave-flash">'; … … 161 174 162 175 titheklog(debuglevel, "/tmp/flashx_tmpstr_get4", NULL, tmpstr); 163 //writesys("/var/usr/local/share/titan/plugins/tithek//flashx_tmpstr_get4", tmpstr, 0);176 writesys("/var/usr/local/share/titan/plugins/tithek//flashx_tmpstr_get4", tmpstr, 0); 164 177 //printf("\n#######################################################\n"); 165 178 … … 204 217 if(getconfigint("debuglevel", NULL) == 99) 205 218 writesys("/tmp/flashx_tmpstr_get5", tmpstr, 0); 206 //writesys("/var/usr/local/share/titan/plugins/tithek//flashx_tmpstr_get5", tmpstr, 0);219 writesys("/var/usr/local/share/titan/plugins/tithek//flashx_tmpstr_get5", tmpstr, 0); 207 220 //printf("\n#######################################################\n"); 208 221 … … 211 224 writesys("/tmp/flashx5_streamlink", streamlink, 0); 212 225 213 //end: 226 end: 227 free(error); error = NULL; 214 228 free(tmphost); tmphost = NULL; 215 229 free(tmphost); tmphost = NULL;
Note: See TracChangeset
for help on using the changeset viewer.