Changeset 19879


Ignore:
Timestamp:
02/01/13 15:43:21 (11 years ago)
Author:
obi
Message:

[tithek] update debug system

Location:
titan/plugins/tithek
Files:
8 edited

Legend:

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

    r19878 r19879  
    1919        tmpstr = gethttp(ip, path, 80, NULL, NULL, NULL, 0);
    2020        if(getconfigint("debuglevel", NULL) == 99)
    21                 writesys("/var/usr/local/share/titan/plugins/tithek/tmpstr", tmpstr, 0);
     21                writesys("/tmp/beeg1_tmpstr", tmpstr, 0);
    2222
    2323        if(tmpstr != NULL)
     
    2828        free(tmpstr); tmpstr = NULL;
    2929        free(ip), ip = NULL;
     30
     31        if(getconfigint("debuglevel", NULL) == 99)
     32                writesys("/tmp/beeg2_streamurl", streamurl, 0);
    3033
    3134// segfault munmap_chunk(): invalid pointer
  • titan/plugins/tithek/filenuke.h

    r19878 r19879  
    3838        sleep(2);
    3939        if(getconfigint("debuglevel", NULL) == 99)
    40                 writesys("/var/usr/local/share/titan/plugins/tithek/filenuke_gethttp", tmpstr, 0);
     40                writesys("/tmp/filenuke1_tmpstr", tmpstr, 0);
    4141
    4242        if(ostrstr(tmpstr, "<title>The page is temporarily unavailable</title>") != NULL)
     
    9292        post = gethttpreal(tmphost, tmpfile, 80, NULL, NULL, NULL, 0, send, NULL, 5000, 0);
    9393        if(getconfigint("debuglevel", NULL) == 99)
    94                 writesys("/var/usr/local/share/titan/plugins/tithek/filenuke_post1", post, 0);
     94                writesys("/tmp/filenuke2_tmpstr_post1", post, 0);
    9595
    9696//      gethttpreal(tmphost, tmpfile, 80, "/tmp/tithek/post", NULL, NULL, 0, send, NULL, 5000, 0);
     
    9898//      debug(99, "cmd: %s", cmd);
    9999//      post = command(cmd);
    100 //      writesys("/var/usr/local/share/titan/plugins/tithek/filenuke_post1", post, 0);
     100//      writesys("/tmp/filenuke2_post1", post, 0);
    101101//      free(cmd); cmd = NULL;
    102102
     
    104104        tmpstr = string_resub(";return p}('", ");'", post, 0);
    105105        if(getconfigint("debuglevel", NULL) == 99)
    106                 writesys("/var/usr/local/share/titan/plugins/tithek/filenuke_tmpstr1", tmpstr, 0);
     106                writesys("/tmp/filenuke3_tmpstr1", tmpstr, 0);
    107107       
    108108        post = string_replace_all(tmpstr, "", post, 1);
    109109        post = string_replace_all(";return p}(');'", "", post, 1);
    110110        if(getconfigint("debuglevel", NULL) == 99)
    111                 writesys("/var/usr/local/share/titan/plugins/tithek/filenuke_post2", post, 0);
     111                writesys("/tmp/filenuke4_post2", post, 0);
    112112
    113113        free(tmpstr),tmpstr = NULL;
     
    115115        tmpstr = string_resub(";return p}('", ");'", post, 0);
    116116        if(getconfigint("debuglevel", NULL) == 99)
    117                 writesys("/var/usr/local/share/titan/plugins/tithek/filenuke_tmpstr2", tmpstr, 0);
     117                writesys("/tmp/filenuke5_tmpstr2", tmpstr, 0);
    118118
    119119        b36code = oregex(".*;',[0-9]{2,2},[0-9]{2,2},'(.*)'.split.*", post);
     
    121121        b36code = string_replace_all("||", "| |", b36code, 1);         
    122122        if(getconfigint("debuglevel", NULL) == 99)
    123                 writesys("/var/usr/local/share/titan/plugins/tithek/filenuke_b36code2", b36code, 0);
     123                writesys("/tmp/filenuke6_b36code2", b36code, 0);
    124124       
    125125        struct splitstr* ret1 = NULL;
     
    201201
    202202        if(getconfigint("debuglevel", NULL) == 99)
    203                 writesys("/var/usr/local/share/titan/plugins/tithek/filenuke_tmpstr_last", tmpstr, 0);
     203                writesys("/tmp/filenuke7_tmpstr_last", tmpstr, 0);
    204204
    205205        streamlink = oregex(".*file.*(http:.*video.flv).*image.*", tmpstr);
     
    230230        if(streamlink == NULL)
    231231                streamlink = oregex(".*value=.*(http:.*video.avi).*\".*", tmpstr);                     
     232
     233        if(getconfigint("debuglevel", NULL) == 99)
     234                writesys("/tmp/filenuke8_streamlink", streamlink, 0);
    232235
    233236        free(tmpstr); tmpstr = NULL;
  • titan/plugins/tithek/flashx.h

    r19878 r19879  
    1111        char* ip = NULL;
    1212        char* streamlink = NULL;
     13
     14        unlink("/tmp/tithek/x9");
    1315
    1416        if(host == NULL || file == NULL) return NULL;
     
    3335
    3436        if(getconfigint("debuglevel", NULL) == 99)
    35                 writesys("/var/usr/local/share/titan/plugins/tithek/flashx1", tmpstr, 0);
     37                writesys("/tmp/flashx1_tmpstr_get1", tmpstr, 0);
    3638
    3739        free(tmpstr); tmpstr = NULL;
     
    5052
    5153        if(getconfigint("debuglevel", NULL) == 99)
    52                 writesys("/var/usr/local/share/titan/plugins/tithek/flashx2", tmpstr, 0);
     54                writesys("/tmp/flashx2_tmpstr_get2", tmpstr, 0);
    5355
    5456        free(tmpstr); tmpstr = NULL;
     
    6466        gethttpreal(tmphost, tmpfile, 80, "/tmp/tithek/x9", NULL, NULL, 0, send, NULL, 5000, 0);
    6567
     68        if(!file_exist("/tmp/tithek/x9"))
     69        {
     70                textbox(_("Message"), _("This file doesn't exist, or has been removed") , _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1200, 200, 0, 0);
     71                goto end;
     72        }
     73
     74        if(getconfigint("debuglevel", NULL) == 99)
     75                system("cp -a /tmp/tithek/x9 /tmp/flashx3_tmpstr_get3", tmpstr, 0);
     76
    6677        free(send); send = NULL;
    6778        tmpstr = command("cat /tmp/tithek/x9 | sed '1,1d' | zcat");
    6879
    6980        if(getconfigint("debuglevel", NULL) == 99)
    70                 writesys("/var/usr/local/share/titan/plugins/tithek/flashx4", tmpstr, 0);
     81                writesys("/tmp/flashx4_tmpstr_get3_zcat", tmpstr, 0);
    7182
    7283        streamlink = string_resub("<file>", "</file>", tmpstr, 0);
     84        if(getconfigint("debuglevel", NULL) == 99)
     85                writesys("/tmp/flashx5_streamlink", streamlink, 0);
    7386
     87end:
    7488        free(tmphost); tmphost = NULL;
    7589        free(tmpfile); tmpfile = NULL;
  • titan/plugins/tithek/putlocker.h

    r19841 r19879  
    2222        char* streamlink1 = NULL;
    2323
     24        unlink("/tmp/tithek/get");
     25        unlink("/tmp/tithek/x9");
     26
    2427        if(host == NULL || file == NULL) return NULL;
    2528
     
    5053                goto end;
    5154        }
    52                
     55        if(getconfigint("debuglevel", NULL) == 99)
     56                system("cp -a /tmp/tithek/get /tmp/putlocker1_tmpstr_get");
     57
    5358        char* header = NULL;
    5459        header = command("cat /tmp/tithek/get");
     
    8287        free(cmd); cmd = NULL;
    8388        free(lines); lines = NULL;
     89        if(getconfigint("debuglevel", NULL) == 99)
     90                writesys("/tmp/putlocker2_tmpstr_zcat", tmpstr, 0);
    8491
    8592        //get hash from tmpstr
     
    119126        gethttpreal(tmphost, tmpfile, 80, "/tmp/tithek/x9", NULL, NULL, 0, send, NULL, 5000, 0);
    120127        sleep(1);
     128        if(getconfigint("debuglevel", NULL) == 99)
     129                system("cp -a /tmp/tithek/x9 /tmp/putlocker3_tmpstr_post");
    121130
    122131        free(send); send = NULL;
    123132        tmpstr = command("cat /tmp/tithek/x9 | sed '1,1d' | zcat");
     133        if(getconfigint("debuglevel", NULL) == 99)
     134                writesys("/tmp/putlocker4_tmpstr_post_zcat", tmpstr, 0);
    124135       
    125136        if(ostrstr(tmpstr, "warning_message") != NULL)
     
    171182        free(send); send = NULL;
    172183
     184        if(getconfigint("debuglevel", NULL) == 99)
     185                writesys("/tmp/putlocker5_tmpstr_get", tmpstr, 0);
     186
    173187//Streaming version of this file is currently not available. You can download it below.
    174188
    175189        //get streamlink1
    176190        streamlink1 = getxmlentry(tmpstr, "url=");
     191        if(getconfigint("debuglevel", NULL) == 99)
     192                writesys("/tmp/putlocker5_streamlink", streamlink1, 0);
     193
    177194        free(tmpstr); tmpstr = NULL;
    178195
  • titan/plugins/tithek/streamcloud.h

    r19841 r19879  
    4242        tmpstr = gethttpreal(tmphost, tmpfile, 80, NULL, NULL, NULL, 0, send, NULL, 5000, 1);
    4343
     44        if(getconfigint("debuglevel", NULL) == 99)
     45                writesys("/tmp/streamcould1_tmpstr", tmpstr, 0);
    4446/*
    4547        old code       
     
    121123        free(tmpstr), tmpstr = NULL;
    122124        tmpstr = gethttpreal(tmphost, tmpfile, 80, NULL, NULL, NULL, 0, send, NULL, 5000, 0);
    123         debug(99, "tmpstr: %s", tmpstr);
     125        if(getconfigint("debuglevel", NULL) == 99)
     126                writesys("/tmp/streamcould2_tmpstr_post", tmpstr, 0);
     127
    124128//      streamlink = oregex(".*file: \".*(http:.*video.mp4).*\".*", tmpstr);
    125129        streamlink = string_resub("file: \"", "\"", tmpstr, 0);
     130        if(getconfigint("debuglevel", NULL) == 99)
     131                writesys("/tmp/streamcould3_streamlink", streamlink, 0);
     132
    126133        free(tmpstr); tmpstr = NULL;
    127134
  • titan/plugins/tithek/tithek.h

    r19878 r19879  
    12681268//                                              addmenulist(&mlist, "File Caching Playback (20MB / 240s)", NULL, NULL, 0, 0);
    12691269//                                              addmenulist(&mlist, "File Caching Playback (30MB / 360s)", NULL, NULL, 0, 0);
    1270                                                 if(status.expertmodus >= 11)
     1270                                                if(file_exist("/var/swap/etc/.tithekdownload") || status.expertmodus >= 11)
    12711271                                                        addmenulist(&mlist, "Download Full File", NULL, NULL, 0, 0);
    12721272                                        }
  • titan/plugins/tithek/vidstream.h

    r19878 r19879  
    4343
    4444        if(getconfigint("debuglevel", NULL) == 99)
    45                 writesys("/var/usr/local/share/titan/plugins/tithek/vidstream1", tmpstr, 0);
     45                writesys("/tmp/vidstream1_tmpstr", tmpstr, 0);
    4646
    4747        sleep(1);
     
    119119       
    120120        if(getconfigint("debuglevel", NULL) == 99)
    121                 writesys("/var/usr/local/share/titan/plugins/tithek/vidstream2", tmpstr, 0);
     121                writesys("/tmp/vidstream2_tmpstr_post", tmpstr, 0);
    122122
    123123        sleep(1);
    124124        streamlink = string_resub("file: \"", "\",", tmpstr, 0);
     125
     126        if(getconfigint("debuglevel", NULL) == 99)
     127                writesys("/tmp/vidstream3_streamlink", streamlink, 0);
    125128
    126129end:
  • titan/plugins/tithek/xvidstage.h

    r19878 r19879  
    3232        char* charlist = NULL;
    3333
     34        unlink("/tmp/tithek/get");
     35        unlink("/tmp/tithek/post");
     36
    3437        if(host == NULL || file == NULL) return NULL;
    3538
     
    5760        sleep(1);
    5861        free(send); send = NULL;
    59 //      system("cp /tmp/tithek/get /var/usr/local/share/titan/plugins/tithek/xvidstage4");
    6062        if(!file_exist("/tmp/tithek/get"))
    6163        {
     
    6466        }
    6567
     68        if(getconfigint("debuglevel", NULL) == 99)
     69                system("cp -a /tmp/tithek/get /tmp/xvidstage1_tmpstr_get", tmpstr, 0);
     70
    6671        tmpstr = command("cat /tmp/tithek/get");
    6772        cookie = string_resub("Set-Cookie: afc=", ";", tmpstr, 0);     
     
    6974
    7075        if(getconfigint("debuglevel", NULL) == 99)
    71                 writesys("/var/usr/local/share/titan/plugins/tithek/xvidstage1", tmpstr, 0);
     76                writesys("/tmp/xvidstage2_tmpstr", tmpstr, 0);
    7277
    7378        free(tmpstr), tmpstr = NULL;
     
    95100
    96101        if(getconfigint("debuglevel", NULL) == 99)
    97                 writesys("/var/usr/local/share/titan/plugins/tithek/xvidstage2", tmpstr, 0);
     102                writesys("/tmp/xvidstage3_tmpstr_zcat", tmpstr, 0);
    98103
    99104        sleep(1);
     
    167172///
    168173        gethttpreal(tmphost, tmpfile, 80, "/tmp/tithek/post", NULL, NULL, 0, send, NULL, 5000, 0);
     174
     175        if(!file_exist("/tmp/tithek/post"))
     176        {
     177                textbox(_("Message"), _("This file doesn't exist, or has been removed") , _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1200, 200, 0, 0);
     178                goto end;
     179        }
     180
     181        if(getconfigint("debuglevel", NULL) == 99)
     182                system("cp -a /tmp/tithek/post /tmp/xvidstage4_tmpstr_post");   
     183
    169184        cmd = ostrcat(cmd, "cat /tmp/tithek/post | zcat", 1, 0);
    170185        debug(99, "cmd: %s", cmd);
    171186        post = command(cmd);
    172187        if(getconfigint("debuglevel", NULL) == 99)
    173                 writesys("/var/usr/local/share/titan/plugins/tithek/xvidstage_post1", post, 0);
     188                writesys("/tmp/xvidstage5_tmpstr_post1_zcat", post, 0);
    174189        free(cmd); cmd = NULL;
    175190
     
    177192        tmpstr = string_resub(";return p}('", ");'", post, 0);
    178193        if(getconfigint("debuglevel", NULL) == 99)
    179                 writesys("/var/usr/local/share/titan/plugins/tithek/xvidstage_tmpstr1", tmpstr, 0);
     194                writesys("/tmp/xvidstage6_tmpstr_post1_zcat_resub", tmpstr, 0);
    180195       
    181196        post = string_replace_all(tmpstr, "", post, 1);
    182197        post = string_replace_all(";return p}(');'", "", post, 1);
    183198        if(getconfigint("debuglevel", NULL) == 99)
    184                 writesys("/var/usr/local/share/titan/plugins/tithek/xvidstage_post2", post, 0);
     199                writesys("/tmp/xvidstage7_tmpstr_post2", post, 0);
    185200
    186201        free(tmpstr),tmpstr = NULL;
     
    188203        tmpstr = string_resub(";return p}('", ");'", post, 0);
    189204        if(getconfigint("debuglevel", NULL) == 99)
    190                 writesys("/var/usr/local/share/titan/plugins/tithek/xvidstage_tmpstr2", tmpstr, 0);
     205                writesys("/tmp/xvidstage8_tmpstr_post2_resub", tmpstr, 0);
    191206
    192207        b36code = oregex(".*;',[0-9]{2,2},[0-9]{2,2},'(.*)'.split.*", post);
     
    194209        b36code = string_replace_all("||", "| |", b36code, 1);         
    195210        if(getconfigint("debuglevel", NULL) == 99)
    196                 writesys("/var/usr/local/share/titan/plugins/tithek/xvidstage_b36code2", b36code, 0);
     211                writesys("/tmp/xvidstage9_tmpstr_post2_resub_b36code2", b36code, 0);
    197212       
    198213        struct splitstr* ret1 = NULL;
     
    274289
    275290        if(getconfigint("debuglevel", NULL) == 99)
    276                 writesys("/var/usr/local/share/titan/plugins/tithek/xvidstage_tmpstr_last", tmpstr, 0);
     291                writesys("/tmp/xvidstage10_tmpstr_last", tmpstr, 0);
    277292
    278293        streamlink = oregex(".*file.*(http:.*video.flv).*image.*", tmpstr);
     
    303318        if(streamlink == NULL)
    304319                streamlink = oregex(".*value=.*(http:.*video.avi).*\".*", tmpstr);                     
     320
     321        if(getconfigint("debuglevel", NULL) == 99)
     322                writesys("/tmp/xvidstage11_streamlink", streamlink, 0);
    305323
    306324        free(tmpstr); tmpstr = NULL;
Note: See TracChangeset for help on using the changeset viewer.