Changeset 18354


Ignore:
Timestamp:
Oct 27, 2012, 5:59:40 PM (7 years ago)
Author:
obi
Message:

[titan] tithek fix kinox streamcould hoster

File:
1 edited

Legend:

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

    r18121 r18354  
    6767        debug(99, "tmpfile: %s", tmpfile);
    6868
    69         tmpstr = gethttp(tmphost, tmpfile, 80, NULL, NULL, NULL, 0);
     69// old not working we need cookie
     70//      tmpstr = gethttp(tmphost, tmpfile, 80, NULL, NULL, NULL, 0);
     71//new
     72        char* cookie = NULL;
     73        char* cmd = NULL;
    7074
    71         sleep(10);
     75//getstream1="GET /iupl3hux3jsa HTTP/1.1\r\nHost: streamcloud.eu\r\nUser-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.99 Safari/535.1\r\nConnection: close\r\nAccept-Encoding: gzip\r\n\r\n"
     76//echo -e $getstream1 | /var/usr/local/share/titan/plugins/tithek/netcat streamcloud.eu 80
     77        send = ostrcat(send, "GET /", 1, 0);
     78        send = ostrcat(send, file, 1, 0);
     79        send = ostrcat(send, " HTTP/1.1\r\nHost: ", 1, 0);
     80        send = ostrcat(send, host, 1, 0);
     81        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\r\nConnection: close\r\nAccept-Encoding: gzip\r\n\r\n", 1, 0);
     82        debug(99, "send: %s", send);
     83
     84        cmd = ostrcat(cmd, "echo -e \"", 1, 0);
     85        cmd = ostrcat(cmd, send, 1, 0);
     86        cmd = ostrcat(cmd, "\" | /var/usr/local/share/titan/plugins/tithek/netcat ", 1, 0);
     87        cmd = ostrcat(cmd, host, 1, 0);
     88        cmd = ostrcat(cmd, " 80", 1, 0);
     89        debug(99, "cmd: %s", cmd);
     90        free(tmpstr), tmpstr = NULL;
     91        tmpstr = command(cmd);
     92        cookie = string_resub("Set-Cookie: afc=", ";", tmpstr, 0);     
     93        debug(99, "cookie: %s", cookie);
     94//newend
     95 
     96        sleep(5);
    7297
    7398        //get hash from tmpstr
     
    126151        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);
    127152        send = ostrcat(send, host, 1, 0);
     153        send = ostrcat(send, "\r\nCookie: afc=", 1, 0);
     154        send = ostrcat(send, cookie, 1, 0);
    128155        send = ostrcat(send, "\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\n", 1, 0);
    129156        send = ostrcat(send, hash, 1, 0);
     
    132159        free(tmpstr), tmpstr = NULL;
    133160        tmpstr = gethttpreal(tmphost, tmpfile, 80, NULL, NULL, NULL, 0, send, NULL);
    134        
    135         streamlink = oregex(".*file: \".*(http:.*video.mp4).*\".*", tmpstr);                           
     161        debug(99, "tmpstr: %s", tmpstr);
     162//      streamlink = oregex(".*file: \".*(http:.*video.mp4).*\".*", tmpstr);
     163        streamlink = string_resub("file: \"", "\"", tmpstr, 0);
    136164        free(tmpstr); tmpstr = NULL;
    137165
Note: See TracChangeset for help on using the changeset viewer.