Changeset 30274


Ignore:
Timestamp:
Oct 1, 2014, 6:39:55 PM (5 years ago)
Author:
obi
Message:

[tithek] update thefile hoster and movie4k

Location:
titan/plugins/tithek
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/plugins/tithek/movie4k.h

    r29534 r30274  
    395395                        hnamein = string_resub("width=\"16\"> &nbsp;", "</a></td>", tmpstr, 0);
    396396                        nolinks = ostrcat(tmpstr, NULL, 0, 0);
     397                        if(ostrstr(tmpstr, "set a cookie which will expire in 3 days and be accessible site wide") != NULL)
     398                        {
     399                                textbox(_("Message"), _("set a cookie which will expire in 3 days and be accessible site wide") , _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1200, 200, 0, 0);
     400                                writesys("/tmp/movie4k.error.cookie.list", tmpstr, 1);
     401                                return ret;
     402                        }
    397403                }
    398404                else
     
    400406                        unlink("/tmp/movie4k.list");
    401407                        writesys("/tmp/movie4k.list", tmpstr, 1);
    402                         tmpstr = command("cat /tmp/movie4k.list | grep ^links");
     408                        char* tmpstr1 = command("cat /tmp/movie4k.list | grep ^links");
     409                        tmpstr = ostrcat(tmpstr1, NULL, 1, 0);
     410                        char* cmd = ostrcat("cat /tmp/movie4k.list | grep ^'</SCRIPT>' | sed 's!</SCRIPT>!\\nlinks[!g' | sed 's!</td></tr>!\\nlinks[!g' | grep ^'links\\[<' | grep -v ^'links\\[<SCRIPT'", NULL, 0, 0);
     411                        printf("cmd: %s\n",cmd);
     412                        tmpstr1 = command(cmd);
     413                        free(cmd), cmd = NULL;
     414                        tmpstr = ostrcat(tmpstr, tmpstr1, 1, 0);
    403415                }
    404                
     416
     417                titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek/thefile1_tmp", NULL, NULL, NULL, tmpstr);
     418
     419
    405420                int count = 0;
    406421                int incount = 0;
     
    414429                        for(i = 0; i < max; i++)
    415430                        {
     431printf("ret1[i].part: %s\n",ret1[i].part);
     432
    416433                                if((!ostrncmp("links", ret1[i].part, 5) && nolinks == NULL) || nolinks != NULL)
    417434                                {
     
    422439
    423440                                                pathnew = string_resub("<a href=\\\"", "\\", ret1[i].part, 0);
     441                                                if(pathnew == NULL)
     442                                                        pathnew = string_resub("<a href=\"", "\"", ret1[i].part, 0);
     443
    424444                                                tmphname = string_resub("title=\\\"", " ", ret1[i].part, 0);
     445                                                if(tmphname == NULL)
     446                                                        tmphname = string_resub("title=\"", " ", ret1[i].part, 0);
     447                                               
    425448                                                if(tmphname == NULL)
    426449                                                        tmphname = string_resub("&nbsp;", "</a", ret1[i].part, 0);
     
    437460                                                        id = ostrcat(tmpid, NULL, 0, 0);
    438461
    439 //                                              debug(99, "(%d/%d/%d) pathnew: %s hname: %s id: %s",a ,i ,max ,pathnew , tmphname, id);
     462                                                debug(99, "(%d/%d/%d) pathnew: %s hname: %s id: %s",a ,i ,max ,pathnew , tmphname, id);
    440463
    441464                                                if(ostrstr(pathnew, "tvshows-") != NULL)
  • titan/plugins/tithek/thefile.h

    r30271 r30274  
    1010        char* usr_login = NULL, *referer = NULL, *fname = NULL, *op = NULL, *id = NULL, *cfduid = NULL;
    1111        char* pos4 = NULL, *pos5 = NULL, *pos6 = NULL, *redirect = NULL, *method_free = NULL, *rand = NULL;
     12        char* pos7 = NULL, *pos8 = NULL, *pos9 = NULL, *pos10 = NULL, *pos11 = NULL, *pos12 = NULL;
     13        char* streamlink1 = NULL;
    1214
    1315        if(link == NULL) return NULL;
     
    1517        unlink("/tmp/thefile1_get");
    1618        unlink("/tmp/thefile2_post");
    17        
     19        unlink("/tmp/thefile3_post");
     20               
    1821        char* tmplink = NULL, *pos = NULL, *path = NULL;
    1922
     
    4548
    4649        tmppath = ostrcat("/", path, 0, 0);
    47 /*
    48 15:02:11 T:3492  NOTICE: '
    49 GET /4x8bkdffgidh HTTP/1.1\r\n
    50 Host: thefile.me\r\n
    51 User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.99 Safari/535.1\r\n
    52 Connection: close\r\n
    53 Accept-Encoding: gzip\r\n\r\n'
    54 */
    5550
    5651        send = ostrcat(send, "GET ", 1, 0);
     
    6257        send = ostrcat(send, "\r\nConnection: close\r\nAccept-Encoding: gzip\r\n\r\n", 1, 0);
    6358       
    64         debug(99, "send: %s", send);
     59        debug(99, "1send: %s", send);
    6560
    6661        tmpstr = gethttpreal(tmphost, tmppath, 80, NULL, NULL, NULL, 0, send, NULL, 5000, 1);
     
    6964        free(send), send = NULL;
    7065
    71 //      waitmsgbar(7, 0, _("Connect with Hoster wait 7 seconds"), 1);
    72 
    7366        if(ostrstr(tmpstr, "The file is being transfered to our other servers. This may take few minutes.") != NULL)
    7467        {
     
    9992        free(tmpstr); tmpstr = NULL;
    10093        debug(99, "hashline: %s", hashline);
    101 //      if(hashline == NULL)
    102 //      {
    103 //              textbox(_("Message"), _("The page is temporarily unavailable") , _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1200, 200, 0, 0);
    104 //              goto end;
    105 //      }
    106 
     94
     95        free(hash), hash = NULL;
    10796        hash = ostrcat(hash, "redirect=", 1, 0);
    10897        hash = ostrcat(hash, redirect, 1, 0);
     
    121110        hashlen = oitoa(strlen(hash));
    122111
    123 /*
    124 15:02:11 T:3492  NOTICE: '
    125 POST /4x8bkdffgidh
    126 HTTP/1.1\r\n
    127 Content-Length: 164\r\n
    128 Accept-Encoding: gzip\r\n
    129 Host: thefile.me\r\n
    130 User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.99 Safari/535.1\r\n
    131 Connection: close\r\n
    132 Referer: http://thefile.me/4x8bkdffgidh\r\n
    133 Cookie: __cfduid=ddc102e72b9b793355a5be3d3dcb03ff01412168530377\r\n
    134 Content-Type: application/x-www-form-urlencoded\r\n\r\n
    135 redirect=&usr_login=&referer=http%3A%2F%2Fthefile.me%2F4x8bkdffgidh&fname=X-Men.2000.720p.BrRip.x264.YIFY.mp4&method_free=Free+Download&id=4x8bkdffgidh&op=download1'
    136 */
    137112        send = ostrcat(send, "POST ", 1, 0);
    138113        send = ostrcat(send, tmppath, 1, 0);
     
    148123        send = ostrcat(send, "\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\n", 1, 0);
    149124        send = ostrcat(send, hash, 1, 0);
    150         debug(99, "send: %s", send);
     125        debug(99, "2send: %s", send);
    151126        free(hash), hash = NULL;
    152127
     
    155130        debug(99, "tmpstr: %s", tmpstr);
    156131        titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek/thefile2_post", NULL, NULL, NULL, tmpstr);
    157 /*
    158 ///////////
    159 15:02:11 T:3492  NOTICE: '
    160 POST /4x8bkdffgidh
    161 HTTP/1.1\r\n
    162 Content-Length: 220\r\n
    163 Accept-Encoding: gzip\r\n
    164 Host: thefile.me\r\n
    165 User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.99 Safari/535.1\r\n
    166 Connection: close\r\n
    167 Referer: http://thefile.me/4x8bkdffgidh\r\n
    168 Cookie: aff=6304; __cfduid=ddc102e72b9b793355a5be3d3dcb03ff01412168530377\r\n
    169 Content-Type: application/x-www-form-urlencoded\r\n\r\n
    170 redirect=&rand=aivaddwv4wpeil6z72doczmarkitsvau3x52gvi&btn_download=Create+Download+Link&method_premium=&down_direct=1&referer=http%3A%2F%2Fthefile.me%2F4x8bkdffgidh&method_free=Free+Download&id=4x8bkdffgidh&op=download2'
    171132
    172133        pos7 = ostrstr(tmpstr, "<input type=\"hidden\" name=\"redirect\" value=");
     
    188149        op = getxmlentry(pos12, "value=");
    189150
     151        free(hash), hash = NULL;
    190152        hash = ostrcat(hash, "redirect=", 1, 0);
    191153        hash = ostrcat(hash, redirect, 1, 0);
     
    193155        hash = ostrcat(hash, rand, 1, 0);
    194156        hash = ostrcat(hash, "&btn_download=Create+Download+Link&method_premium=&down_direct=1&referer", 1, 0);
    195         char* referer_encode = htmldecode(referer);
     157        char* referer_encode = htmlencode(referer);
    196158        hash = ostrcat(hash, referer_encode, 1, 0);
    197159        hash = ostrcat(hash, "&method_free=Free+Download", 1, 0);
     
    201163        hash = ostrcat(hash, "&op=", 1, 0);
    202164        hash = ostrcat(hash, op, 1, 0);
    203         debug(99, "hash: %s", hash);
     165        debug(99, "3hash: %s", hash);
    204166        hashlen = oitoa(strlen(hash));
    205        
     167
     168        free(send), send = NULL;       
     169/*
    206170        send = ostrcat(send, "POST ", 1, 0);
    207171        send = ostrcat(send, tmppath, 1, 0);
     
    216180        send = ostrcat(send, "\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\n", 1, 0);
    217181        send = ostrcat(send, hash, 1, 0);
    218         debug(99, "send: %s", send);
     182*/
     183        send = ostrcat(send, "POST ", 1, 0);
     184        send = ostrcat(send, tmppath, 1, 0);
     185        send = ostrcat(send, " HTTP/1.1\r\nContent-Length: ", 1, 0);
     186        send = ostrcat(send, hashlen, 1, 0);
     187        send = ostrcat(send, "\r\nAccept-Encoding: gzip\r\nHost: ", 1, 0);
     188        send = ostrcat(send, tmphost, 1, 0);
     189        send = ostrcat(send, "\r\nUser-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.99 Safari/535.1", 1, 0);
     190        send = ostrcat(send, "\r\nConnection: close\r\nReferer: ", 1, 0);
     191        send = ostrcat(send, link, 1, 0);
     192        send = ostrcat(send, "\r\nCookie: cfduid=", 1, 0);
     193        send = ostrcat(send, cfduid, 1, 0);
     194        send = ostrcat(send, "\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\n", 1, 0);
     195        send = ostrcat(send, hash, 1, 0);
     196        debug(99, "3send: %s", send);
    219197
    220198        tmpstr = gethttpreal(tmphost, tmppath, 80, NULL, NULL, NULL, 0, send, NULL, 5000, 1);
    221199        free(send), send = NULL;
    222200        debug(99, "tmpstr: %s", tmpstr);
    223         titheklog(debuglevel, "/tmp/thefile2_post", NULL, NULL, NULL, tmpstr);
     201        titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek/thefile3_post", NULL, NULL, NULL, tmpstr);
    224202///////
    225203
    226         streamlink = string_resub("data-url=\"", "\"", tmpstr, 0);
     204        if(ostrstr(tmpstr, "This direct link will be available for your IP next 8 hours") != NULL)
     205                textbox(_("Message"), _("This direct link will be available for your IP next 8 hours") , _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1200, 200, 0, 5);
     206
     207        streamlink1 = string_resub("<h3 class=\"x\"><span>", "</span></h3>", tmpstr, 0);
     208        streamlink = string_resub("<a href=\"", "</a>", streamlink1, 0);
     209
    227210        debug(99, "streamlink1: %s", streamlink);
    228211        htmldecode(streamlink, streamlink);
    229212        debug(99, "streamlink2: %s", streamlink);
    230 */     
     213
    231214end:
    232215        free(tmphost); tmphost = NULL;
     
    240223        free(timestamp), timestamp = NULL;
    241224        free(ip); ip = NULL;
     225        free(streamlink1), streamlink1 = NULL;
     226        free(redirect), redirect = NULL;
     227        free(rand), rand = NULL;
     228        free(referer), referer = NULL;
     229        free(method_free), method_free = NULL;
     230        free(op), op = NULL;
     231        free(id), id = NULL;
     232        free(redirect), redirect = NULL;
     233        free(cfduid), cfduid = NULL;
     234        free(usr_login), usr_login = NULL;
     235        free(fname), fname = NULL;
    242236
    243237        return streamlink;
Note: See TracChangeset for help on using the changeset viewer.