Changeset 24310 for titan/plugins/tithek/putlocker.h
- Timestamp:
- 10/14/13 18:36:57 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/plugins/tithek/putlocker.h
r24309 r24310 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* hash = NULL; 13 char* hashstr = NULL; 14 char* hashlen = NULL; 15 char* ip = NULL; 16 char* phpsessid = NULL; 17 char* serverid = NULL; 18 char* usender = NULL; 19 char* streamlink = NULL; 20 char* streamlink1 = NULL; 21 char* tmpstr2 = NULL; 8 char* tmphost = NULL, *tmpfile = NULL, *tmpstr = NULL, *send = NULL, *hash = NULL, *hashstr = NULL, *hashlen = NULL; 9 char* ip = NULL, *phpsessid = NULL, *serverid = NULL, *usender = NULL, *streamlink = NULL, *streamlink1 = NULL, *tmpstr2 = NULL; 22 10 23 unlink("/tmp/tithek/get"); 24 unlink("/tmp/tithek/x9"); 11 unlink("/tmp/putlocker1_tmpstr_get"); 12 unlink("/tmp/putlocker2_tmpstr_post"); 13 unlink("/tmp/putlocker3_tmpstr_get"); 14 unlink("/tmp/putlocker4_streamlink"); 25 15 26 16 if(host == NULL || file == NULL) return NULL; … … 42 32 tmpstr = gethttpreal(tmphost, tmpfile, 80, NULL, NULL, NULL, 0, send, NULL, 5000, 1); 43 33 free(send); send = NULL; 34 debug(99, "tmpstr: %s", tmpstr); 35 titheklog(debuglevel, "/tmp/putlocker1_tmpstr_get", NULL, tmpstr); 36 44 37 phpsessid = getxmlentry(tmpstr, "PHPSESSID="); 45 38 debug(99, "phpsessid: %s", phpsessid); … … 51 44 //get hash from tmpstr 52 45 char* pos = ostrstr(tmpstr, "<input type=\"hidden\" value="); 53 debug(99, "tmpstr: %s", tmpstr);54 46 hashstr = getxmlentry(pos, "value="); 55 47 // free(tmpstr) after getxml or segfault... … … 71 63 send = ostrcat(send, " HTTP/1.1\r\nContent-Length: ", 1, 0); 72 64 send = ostrcat(send, hashlen, 1, 0); 73 send = ostrcat(send, "\r\nAccept-Encoding: gzip\r\nConnection: close\r\nUser-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.99 Safari/535.1\r\nHost: www.", 1, 0);74 send = ostrcat(send, host, 1, 0);65 send = ostrcat(send, "\r\nAccept-Encoding: gzip\r\nConnection: close\r\nUser-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.99 Safari/535.1\r\nHost: ", 1, 0); 66 send = ostrcat(send, tmphost, 1, 0); 75 67 send = ostrcat(send, "\r\nCookie: usender=", 1, 0); 76 68 send = ostrcat(send, usender, 1, 0); … … 87 79 free(send); send = NULL; 88 80 debug(99, "tmpstr: %s", tmpstr); 89 titheklog(debuglevel, "/tmp/putlocker 4_tmpstr_post_zcat", NULL, tmpstr);81 titheklog(debuglevel, "/tmp/putlocker2_tmpstr_post", NULL, tmpstr); 90 82 91 83 if(ostrstr(tmpstr, "warning_message") != NULL) … … 127 119 send = ostrcat(send, "GET ", 1, 0); 128 120 send = ostrcat(send, streamlink, 1, 0); 129 send = ostrcat(send, " HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: www.", 1, 0);130 send = ostrcat(send, host, 1, 0);121 send = ostrcat(send, " HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: ", 1, 0); 122 send = ostrcat(send, tmphost, 1, 0); 131 123 send = ostrcat(send, "\r\nCookie: SERVERID=", 1, 0); 132 124 send = ostrcat(send, serverid, 1, 0); … … 139 131 tmpstr = gethttpreal(tmphost, tmpfile, 80, NULL, NULL, NULL, 0, send, NULL, 5000, 0); 140 132 free(send); send = NULL; 141 titheklog(debuglevel, "/tmp/putlocker5_tmpstr_get", NULL, tmpstr); 133 debug(99, "tmpstr: %s", tmpstr); 134 titheklog(debuglevel, "/tmp/putlocker3_tmpstr_get", NULL, tmpstr); 142 135 143 136 //get streamlink1 144 137 streamlink1 = getxmlentry(tmpstr, "url="); 145 titheklog(debuglevel, "/tmp/putlocker 5_streamlink", NULL, streamlink1);138 titheklog(debuglevel, "/tmp/putlocker4_streamlink", NULL, streamlink1); 146 139 147 140 free(tmpstr); tmpstr = NULL;
Note: See TracChangeset
for help on using the changeset viewer.