惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V2EX - 技术
V2EX - 技术
L
LangChain Blog
IT之家
IT之家
S
SegmentFault 最新的问题
博客园 - 三生石上(FineUI控件)
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
The Blog of Author Tim Ferriss
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
U
Unit 42
B
Blog RSS Feed
GbyAI
GbyAI
Microsoft Security Blog
Microsoft Security Blog
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
T
Threatpost
C
CERT Recently Published Vulnerability Notes
Cisco Talos Blog
Cisco Talos Blog
The Register - Security
The Register - Security
Vercel News
Vercel News
S
Schneier on Security
Spread Privacy
Spread Privacy
C
Cyber Attacks, Cyber Crime and Cyber Security
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
博客园 - 叶小钗
雷峰网
雷峰网
博客园_首页
人人都是产品经理
人人都是产品经理
P
Palo Alto Networks Blog
The Hacker News
The Hacker News
T
Tor Project blog
L
Lohrmann on Cybersecurity
Know Your Adversary
Know Your Adversary
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
P
Privacy International News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tenable Blog
V
Vulnerabilities – Threatpost
大猫的无限游戏
大猫的无限游戏
博客园 - 【当耐特】
V
V2EX
Security Latest
Security Latest
A
About on SuperTechFans
Cloudbric
Cloudbric
S
Security Affairs
MongoDB | Blog
MongoDB | Blog
Y
Y Combinator Blog
Martin Fowler
Martin Fowler
TaoSecurity Blog
TaoSecurity Blog

博客园 - wolflion

《UNIX-Shell编程24学时教程》读书笔记Chap3,4 文件,目录操作 《UNIX-Shell编程24学时教程》读书笔记Chap1,2 Shell基础,脚本基础 《UNIX-Shell编程24学时教程》读书笔记chap7 变量 《软件调试的艺术》读书笔记 ubuntu环境准备 icmp的程序(ping的实现) cp命令 who命令 苦逼IT才能看懂的笑话 debug和release版区别 i5处理器的台式机[百度知道] 关于轮胎尺寸问题 常见内核数据结构.doc windows 系统编程 Chap7 线程和调度 EVRYTHNG.H Windows系统编程chap6 Windows系统编程 chap5 booklist 转 windows code
ftp的实现
wolflion · 2013-09-29 · via 博客园 - wolflion

ftp.h

#define BUFSIZE 512
#define CMDSIZE 64
#define ARGSIZE 64
#define PASSIVE_ON 0x1

struct ftpcmd{
char *alias;
char *name;
char *args;
int (*handler) (int fd, char *cmd, char *args);
};

typedef struct ftpcmd FTPCMD;

static void bail(const char*);
int send_ftpcmd(int, const char*, const char*);
char *get_localip(int, struct sockaddr_in *);
int active_listen();
int get_active_port();
int list_files(int);
int input_cmd(char *, int);
int check_ftpcmd(char *, char *);
int having_args(char *);
char *trim_right(char *);
int make_port_args(int, struct sockaddr_in *);
int download_file(char *, int);
int upload_file(FILE *, int);
void report(struct timeval *, struct timeval *, int);
int get_ftpcmd_status(int, char *);
int make_conn_active(int);
int make_conn_passive(int);
int passive_notify(int);
int active_notify(int);
void replace_delim(char *, char, char);
int parse_port(char *, int);
void init();
char *get_usrname();
void terminal_echo_off(int);
void terminal_echo_on(int);
void ignore_sigtstp();
void unignore_sigtstp();
int do_common_cmd(int, char*, char*);
int do_user(int, char*, char*);
int do_pasv(int, char*, char*);
int do_list_pasv(int, char*, char *);
int do_list_active(int, char *, char *);
int do_get_pasv(int, char *, char *);
int do_get_active(int, char *, char *);
int do_put_pasv(int, char*, char *);
int do_put_active(int, char*, char *);
int do_lchdir(int, char*, char *);
void abort_transfer(int);
void login(struct hostent *, int);
int print_final_msg(int, char *);