Changeset 42028
- Timestamp:
- Mar 31, 2018, 9:16:01 PM (3 years ago)
- Location:
- titan/plugins/tithek
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/plugins/tithek/kinox.h
r42025 r42028 179 179 line = ostrcat(line, pic, 1, 0); 180 180 line = ostrcat(line, "#kinox_search_", 1, 0); 181 /* 182 line = ostrcat(line, "#/tmp/localhoster/hoster.sh get '", 1, 0); 183 line = ostrcat(line, getconfig("tithek_kinox_url", NULL), 1, 0); 184 line = ostrcat(line, "/", 1, 0); 185 line = ostrcat(line, pic, 1, 0); 186 line = ostrcat(line, "'#kinox_search_", 1, 0); 187 */ 188 181 189 line = ostrcat(line, oitoa(incount + time(NULL)), 1, 1); 182 190 line = ostrcat(line, ".jpg#KinoX - Search#22\n", 1, 0); … … 304 312 int cloudflare = 1; 305 313 int localhoster = 1; 314 newurl = ostrcat(getconfig("tithek_kinox_url", NULL), "/", 0, 0); 315 newurl = ostrcat(newurl, path, 1, 0); 316 306 317 if(cloudflare == 0) 307 318 { 308 newurl = ostrcat(getconfig("tithek_kinox_url", NULL), "/", 0, 0);309 newurl = ostrcat(newurl, path, 1, 0);310 311 319 // tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0); 312 320 // tmpstr = gethttps(link, NULL, NULL, NULL, NULL, NULL, 1); … … 316 324 { 317 325 // new start 318 cmd = ostrcat("/tmp/localhoster/hoster.sh get '", link, 0, 0);326 cmd = ostrcat("/tmp/localhoster/hoster.sh get '", newurl, 0, 0); 319 327 cmd = ostrcat(cmd, "'", 1, 0); 320 328 debug(99, "cmd: %s", cmd); … … 656 664 titheklog(debuglevel, "/tmp/kinox7_tmpstr5", hname, NULL, NULL, tmpstr5); 657 665 658 tmpstr5 = string_replace_all("\\", "", tmpstr5, 1); 666 int cloudflare = 1; 667 int localhoster = 1; tmpstr5 = string_replace_all("\\", "", tmpstr5, 1); 659 668 if(ostrstr(tmpstr5, "iframe src") != NULL) 660 669 url4 = string_resub("<iframe src=\"", "\"", tmpstr5, 0); … … 762 771 string_tolower(pichname); 763 772 pichname = stringreplacecharonce(pichname, '\n', '\0'); 764 type = 14; 773 int cloudflare = 1; 774 int localhoster = 1; type = 14; 765 775 766 776 debug(99, "-------------------------------"); … … 802 812 type = 14; 803 813 804 debug(99, "-------------------------------"); 814 int cloudflare = 1; 815 int localhoster = 1; debug(99, "-------------------------------"); 805 816 debug(99, "(%d/%d) %s (Part4) url: %s extra: %s",i ,max , hname, url4, extra); 806 817 … … 919 930 searchname = string_replace(".html", "", searchname, 0); 920 931 debug(99, "searchname: %s", searchname); 932 free(searchname), searchname = NULL; 933 934 searchname = oregex("://.*/Stream/(.*).html.*", ret0[0].part); 935 debug(99, "new searchname: %s", searchname); 921 936 } 922 937 free(ret0), ret0 = NULL; … … 932 947 } 933 948 934 // tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0); 935 // tmpstr = gethttps(link, NULL, NULL, NULL, NULL, NULL, 1); 949 pathnew = oregex("://.*/(.*).*", link); 950 printf("new pathnew: %s\n",pathnew); 951 952 int cloudflare = 1; 953 int localhoster = 1; 954 newurl = ostrcat(getconfig("tithek_kinox_url", NULL), "/", 0, 0); 955 newurl = ostrcat(newurl, pathnew, 1, 0); 956 957 if(cloudflare == 0) 958 { 959 // tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0); 960 // tmpstr = gethttps(link, NULL, NULL, NULL, NULL, NULL, 1); 961 tmpstr = gethttps(newurl, NULL, NULL, NULL, NULL, NULL, 1); 962 } 963 else 964 { 936 965 // new start 937 cmd = ostrcat("/tmp/localhoster/hoster.sh get '", link, 0, 0);938 cmd = ostrcat(cmd, "'", 1, 0);939 debug(99, "cmd: %s", cmd);940 tmpstr = command(cmd);941 free(cmd), cmd = NULL;966 cmd = ostrcat("/tmp/localhoster/hoster.sh get '", newurl, 0, 0); 967 cmd = ostrcat(cmd, "'", 1, 0); 968 debug(99, "cmd: %s", cmd); 969 tmpstr = command(cmd); 970 free(cmd), cmd = NULL; 942 971 // new end 972 } 943 973 944 974 debug(99, "tmpstr: %s", tmpstr); 945 946 975 free(newurl), newurl = NULL; 947 976 … … 1073 1102 hlink = string_replace("https:////Stream/", "", hlink, 1); 1074 1103 hlink = string_replace("https:///Stream/", "", hlink, 1); 1075 1104 1105 if(cloudflare == 0) 1106 { 1107 // tmpstr1 = gethttp("kinox.to", pathnew, 80, NULL, NULL, 10000, NULL, 0); 1108 tmpstr1 = gethttps(pathnew, NULL, NULL, NULL, NULL, NULL, 1); 1109 } 1110 else if(localhoster == 1) 1111 { 1112 cmd = ostrcat("/tmp/localhoster/hoster.sh hoster '", pathnew, 0, 0); 1113 cmd = ostrcat(cmd, "'", 1, 0); 1114 debug(99, "cmd: %s", cmd); 1115 url = ostrcat(cmd, NULL, 0, 0); 1116 } 1117 else 1118 { 1119 // new start 1120 cmd = ostrcat("/tmp/localhoster/hoster.sh get '", pathnew, 0, 0); 1121 cmd = ostrcat(cmd, "'", 1, 0); 1122 debug(99, "cmd: %s", cmd); 1123 tmpstr1 = command(cmd); 1124 free(cmd), cmd = NULL; 1125 // new end 1126 } 1127 /* 1076 1128 // debug(99, "pathnew: %s", pathnew); 1077 1129 // tmpstr1 = gethttp("kinox.to", pathnew, 80, NULL, NULL, 10000, NULL, 0); … … 1085 1137 // new end 1086 1138 // debug(99, "tmpstr1 1: %s", tmpstr1); 1087 1139 */ 1088 1140 tmpstr1 = string_replace_all("\\", "", tmpstr1, 1); 1089 1141 // debug(99, "tmpstr1 2: %s", tmpstr1); 1090 1142 1091 if(ostrstr(tmpstr1, "<iframe src=") != NULL) 1092 { 1093 url = string_resub("<iframe src=\"", "\"", tmpstr1, 0); 1094 // debug(99, "iframe1.1 url: %s", url); 1095 } 1096 else if(ostrstr(tmpstr1, "/iframe>") != NULL) 1097 { 1098 free(pathnew), pathnew = NULL; 1099 pathnew = ostrcat(getconfig("tithek_kinox_url", NULL), "/aGET/Mirror/", 0, 0); 1100 pathnew = ostrcat(pathnew, hlink, 1, 0); 1101 // debug(99, "iframe2.1 pathnew: %s", pathnew); 1102 free(tmpstr1), tmpstr1 = NULL; 1103 // tmpstr1 = gethttps(pathnew, NULL, NULL, NULL, NULL, NULL, 1); 1104 // new start 1105 cmd = ostrcat("/tmp/localhoster/hoster.sh get '", pathnew, 0, 0); 1106 cmd = ostrcat(cmd, "'", 1, 0); 1107 debug(99, "cmd: %s", cmd); 1108 tmpstr1 = command(cmd); 1109 free(cmd), cmd = NULL; 1110 // new end 1111 // debug(99, "iframe2.2 tmpstr1: %s", tmpstr1); 1112 tmpstr1 = string_replace_all("\\", "", tmpstr1, 1); 1113 // debug(99, "iframe2.3 tmpstr1: %s", tmpstr1); 1114 1143 if(localhoster == 0) 1144 { 1115 1145 if(ostrstr(tmpstr1, "<iframe src=") != NULL) 1116 1146 { 1117 1147 url = string_resub("<iframe src=\"", "\"", tmpstr1, 0); 1118 // debug(99, "iframe2.4url: %s", url);1148 // debug(99, "iframe1.1 url: %s", url); 1119 1149 } 1120 } 1121 else 1122 { 1123 tmpstr1 = string_resub("<a href=\"", "\"", tmpstr1, 0); 1124 // debug(99, "tmpstr1 3: %s", tmpstr1); 1125 url = ostrcat(tmpstr1, NULL, 0, 0); 1150 else if(ostrstr(tmpstr1, "/iframe>") != NULL) 1151 { 1152 free(pathnew), pathnew = NULL; 1153 pathnew = ostrcat(getconfig("tithek_kinox_url", NULL), "/aGET/Mirror/", 0, 0); 1154 pathnew = ostrcat(pathnew, hlink, 1, 0); 1155 // debug(99, "iframe2.1 pathnew: %s", pathnew); 1156 free(tmpstr1), tmpstr1 = NULL; 1157 // tmpstr1 = gethttps(pathnew, NULL, NULL, NULL, NULL, NULL, 1); 1158 // new start 1159 cmd = ostrcat("/tmp/localhoster/hoster.sh get '", pathnew, 0, 0); 1160 cmd = ostrcat(cmd, "'", 1, 0); 1161 debug(99, "cmd: %s", cmd); 1162 tmpstr1 = command(cmd); 1163 free(cmd), cmd = NULL; 1164 // new end 1165 // debug(99, "iframe2.2 tmpstr1: %s", tmpstr1); 1166 tmpstr1 = string_replace_all("\\", "", tmpstr1, 1); 1167 // debug(99, "iframe2.3 tmpstr1: %s", tmpstr1); 1168 1169 if(ostrstr(tmpstr1, "<iframe src=") != NULL) 1170 { 1171 url = string_resub("<iframe src=\"", "\"", tmpstr1, 0); 1172 // debug(99, "iframe2.4 url: %s", url); 1173 } 1174 } 1175 else 1176 { 1177 tmpstr1 = string_resub("<a href=\"", "\"", tmpstr1, 0); 1178 // debug(99, "tmpstr1 3: %s", tmpstr1); 1179 url = ostrcat(tmpstr1, NULL, 0, 0); 1180 } 1126 1181 } 1127 1182 1128 1183 type = 14; 1184 if(localhoster == 1) 1185 type = 111; 1129 1186 1130 1187 debug(99, "-------------------------------"); -
titan/plugins/tithek/tithek.h
r42016 r42028 647 647 char* tithekdownload(char* link, char* localname, char* pw, int pic, int flag) 648 648 { 649 int ret = 1, port = 80, timeout = 10000, ssl = 0 ;649 int ret = 1, port = 80, timeout = 10000, ssl = 0, cloudflare = 0; 650 650 char* ip = NULL, *pos = NULL, *path = NULL; 651 651 char* tmpstr = NULL, *localfile = NULL; 652 652 653 653 if(link == NULL) return NULL; 654 if(ostrncmp("http://", link, 7) && ostrncmp("https://", link, 8)) return NULL; 655 654 if(ostrncmp("http://", link, 7) && ostrncmp("https://", link, 8) && ostrncmp("/tmp/localhoster/hoster.sh get", link, 30)) return NULL; 655 /* 656 if(!ostrncmp("/tmp/localhoster/hoster.sh get", link, 30)) 657 cloudflare = 1; 658 else if(!ostrncmp("https://", link, 8)) 659 */ 656 660 if(!ostrncmp("https://", link, 8)) 657 661 ssl = 1; … … 719 723 if(pic == 1) 720 724 { 721 if(ssl == 1) 725 if(cloudflare == 1) 726 { 727 char* cmd = NULL; 728 cmd = ostrcat(link, " > ", 0, 0); 729 cmd = ostrcat(cmd, localfile, 1, 0); 730 debug(99, "cmd: %s", cmd); 731 tmpstr = command(cmd); 732 free(cmd), cmd = NULL; 733 } 734 else if(ssl == 1) 722 735 gethttps(link, localfile, NULL, NULL, NULL, NULL, 0); 723 736 else if(tithekdownloadcount >= 24) //start max 24 threads
Note: See TracChangeset
for help on using the changeset viewer.