📄 432.htm
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>CTerm非常精华下载</title>
</head>
<body bgcolor="#FFFFFF">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="577">
<tr><td width="32%" rowspan="3" height="123"><img src="DDl_back.jpg" width="300" height="129" alt="DDl_back.jpg"></td><td width="30%" background="DDl_back2.jpg" height="35"><p align="center"><a href="http://apue.dhs.org"><font face="黑体"><big><big>apue</big></big></font></a></td></tr>
<tr>
<td width="68%" background="DDl_back2.jpg" height="44"><big><big><font face="黑体"><p align="center"> ● UNIX网络编程 (BM: clown) </font></big></big></td></tr>
<tr>
<td width="68%" height="44" bgcolor="#000000"><font face="黑体"><big><big><p align="center"></big></big><a href="http://cterm.163.net"><img src="banner.gif" width="400" height="60" alt="banner.gif"border="0"></a></font></td>
</tr>
<tr><td width="100%" colspan="2" height="100" align="center" valign="top"><br><p align="center">[<a href="index.htm">回到开始</a>][<a href="317.htm">上一层</a>][<a href="433.htm">下一篇</a>]
<hr><p align="left"><small>发信人: xhshi (变态), 信区: Hacker <br>
标 题: A really dirty tool! You can modify it to do any! <br>
发信站: BBS 水木清华站 (Sat Oct 4 21:02:03 1997) <br>
<br>
Compile and link these codes unde Linux. <br>
But you must be a ROOT to execute it! <br>
Xi xi .. it's really dirty.. <br>
<br>
/*************************************************************************** <br>
* CopyRight (c) 1997 * <br>
* According to the laws of People's Republic of China.No commercial usage * <br>
* without Shi Xiaohua's permission is legal. Otherwise anybody will be * <br>
* charged . * <br>
***************************************************************************/ <br>
<br>
#include <sys/param.h> <br>
#include <stdio.h> <br>
#include <netdb.h> <br>
#include <ctype.h> <br>
#include <signal.h> <br>
#include <errno.h> <br>
#include <sys/time.h> <br>
#include <sys/socket.h> <br>
#include <sys/file.h> <br>
#include <sys/ioctl.h> <br>
#include <malloc.h> <br>
#include <memory.h> <br>
#include <unistd.h> <br>
<br>
<br>
#include <net/if.h> <br>
#include <net/if_arp.h> <br>
#include <netinet/in.h> <br>
#include <netinet/in_systm.h> <br>
#include <netinet/ip.h> <br>
#include <netinet/udp.h> <br>
#include <netinet/tcp.h> <br>
#include <net/bpf.h> <br>
<br>
main(ac,av) <br>
int ac; <br>
char* av[]; <br>
{ <br>
int sockfd; <br>
struct sockaddr_in serv_addr,cli_addr; <br>
struct sockaddr from; <br>
struct sockaddr_in to; <br>
int to_len; <br>
int from_len; <br>
int i; <br>
int bufsize=256; <br>
unsigned char buf[256]; <br>
int data_len = -1; <br>
long tl; <br>
<br>
/*Open a socket by SOCKET_PACKAGE*/ <br>
if((sockfd=socket(PF_INET,SOCK_PACKET,htons(0x0003)))<0){ <br>
perror("Get Package error\n"); <br>
exit(1); <br>
} <br>
<br>
/*recvfrom interface*/ <br>
for(;;){ <br>
/* <br>
*Wait any packages coming through this interface <br>
*/ <br>
from_len = sizeof(from); <br>
data_len = recvfrom(sockfd,buf,bufsize,0,&from,&from_len); <br>
if (data_len<0){ <br>
perror("error ,get nothing\n"); <br>
exit(1); <br>
<br>
} <br>
/*Here you can add anything you want... <br>
*If you are not a big fool, it's easy to understand the buf <br>
*Xi xi... it's REALLY a DAMNED EVIL TOOL! <br>
*/ <br>
printf("buf is \n"); <br>
for(i=0;i<bufsize;i++) <br>
printf("%0x ",buf[i]); <br>
printf("\n"); <br>
for(i=0;i<bufsize;i++) <br>
if(buf[i]<=126&&buf[i]>=33) <br>
printf("%c",buf[i]); <br>
else printf("."); <br>
printf("\n"); <br>
} <br>
} <br>
<br>
<br>
!Just a cc -o can make anything possiable! Fantasy! <br>
<br>
-- <br>
</small><hr>
<p align="center">[<a href="index.htm">回到开始</a>][<a href="317.htm">上一层</a>][<a href="433.htm">下一篇</a>]
<p align="center"><a href="http://cterm.163.net">欢迎访问Cterm主页</a></p>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -