📄 download.c
字号:
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <errno.h>#include <stdarg.h>#include <ctype.h>#include <sys/socket.h>#include <netinet/in.h>#include <netdb.h>#include <unistd.h>#include <arpa/inet.h>#include <fcntl.h>#include <sys/time.h>#include <host.h>#include <ants.h>#include <http.h>#include <config.h>int main() { int i, fd, thread; struct mission my_mission; struct mission *pms = &my_mission; char name[MAX_HOSTNAME]; char referer[MAX_HOSTNAME]; char path[MAX_HOSTNAME] = "/usr/src/"; pms->file_path = path; while(1) { fd = scan_temp(path); if(fd >= 1) { i = rebuild_ants(fd, pms); if(i) { down_http(pms); } } else { printf("please input url.\n"); scanf("%s", name); printf("please input referer.\n"); scanf("%s", referer); if(strlen(referer) <= 3) *pms->referer = 0; /*auto fill*/ else strcpy(pms->referer, referer); printf("please input thread number : range 1-20\n"); scanf("%d",&thread); build_ants(pms, name, &thread); down_http(pms); } } exit(0); return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -