Compare commits

..

2 Commits

Author SHA1 Message Date
zhaarey 86d1c1a507 change dns 3 months ago
zhaarey aa1886e487 fix get-m3u8 3 months ago
  1. 6
      test.c

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

Loading…
Cancel
Save