Compare commits

..

No commits in common. '86d1c1a5076197cef12a3955c4b2421c38ac7e91' and 'b96afbbd3af16a86a469f5e97a61662f8293f1cb' have entirely different histories.

  1. 6
      test.c

@ -113,7 +113,7 @@ static inline void init() {
// raise(SIGSTOP); // raise(SIGSTOP);
fprintf(stderr, "[+] starting...\n"); fprintf(stderr, "[+] starting...\n");
setenv("ANDROID_DNS_MODE", "local", 1); setenv("ANDROID_DNS_MODE", "local", 1);
static const char *resolvers[2] = {"1.1.1.1", "223.5.5.5"}; static const char *resolvers[2] = {"1.1.1.1", "1.0.0.1"};
_resolv_set_nameservers_for_net(0, resolvers, 2, "."); _resolv_set_nameservers_for_net(0, resolvers, 2, ".");
#ifndef MyRelease #ifndef MyRelease
subhook_install(subhook_new( subhook_install(subhook_new(
@ -458,13 +458,11 @@ void handle_m3u8(const int connfd) {
readfull(connfd, &adam[i], sizeof(uint8_t)); readfull(connfd, &adam[i], sizeof(uint8_t));
} }
char *ptr; char *ptr;
unsigned long adamID = strtoul(adam, &ptr, 10); unsigned long adamID = strtoul(adam, &ptr, adamSize);
const char *m3u8 = get_m3u8_method_play(leaseMgr, adamID); const char *m3u8 = get_m3u8_method_play(leaseMgr, adamID);
if (m3u8 == NULL) { if (m3u8 == NULL) {
fprintf(stderr, "[.] failed to get m3u8 of adamId: %ld\n", adamID);
writefull(connfd, NULL, sizeof(NULL)); writefull(connfd, NULL, sizeof(NULL));
} else { } else {
fprintf(stderr, "[.] m3u8 adamId: %ld, url: %s\n", adamID, m3u8);
strcat((char *)m3u8, "\n"); strcat((char *)m3u8, "\n");
writefull(connfd, (void *)m3u8, strlen(m3u8)); writefull(connfd, (void *)m3u8, strlen(m3u8));
} }

Loading…
Cancel
Save