⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 decode_napster.c

📁 一个网络工具包,可以嗅探email和http等数据包中的密码等信息.注意要先把libnet-1.0.2a.tar.gz和 libnids-1.16.tar.gz装上,不然会因为缺少库函数而无法编译和安
💻 C
字号:
/*  decode_napster.c  Napster. w00w00!    Copyright (c) 2000 Dug Song <dugsong@monkey.org>   $Id: decode_napster.c,v 1.5 2000/11/16 07:00:08 dugsong Exp $*/#include "config.h"#include <sys/types.h>#include <stdio.h>#include <string.h>#include "buf.h"#include "decode.h"intdecode_napster(u_char *buf, int len, u_char *obuf, int olen){	struct buf inbuf, outbuf;	u_short i, type;	buf_init(&inbuf, buf, len);	buf_init(&outbuf, obuf, olen);	if (buf_get(&inbuf, &i, sizeof(i)) != sizeof(i))		return (0);	i = pletohs(&i);	if (buf_get(&inbuf, &type, sizeof(type)) != sizeof(type))		return (0);	type = pletohs(&type);	if (type != 2 || i > buf_len(&inbuf))		return (0);		buf_put(&outbuf, buf_ptr(&inbuf), i);	buf_put(&outbuf, "\n", 1);		buf_end(&outbuf);		return (buf_len(&outbuf));}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -