代码在D7里始终是unable to create process,调试其它程序正常(50)

冬月

Unregistered / Unconfirmed
GUEST, unregistred user!
就这么些代码在D7里始终是unable to create process,重启,换了机器也是这样,请教高手unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP, StdCtrls, ExtCtrls, StrUtils, IdHashMessageDigest, IdHash, Jpeg;type TForm1 = class(TForm) Image1: TImage
LoginBtn: TButton
Button1: TButton
Edit1: TEdit
UserEdt: TEdit
PwsEdt: TEdit
VerifyPicEdt: TEdit
Memo1: TMemo
IdHTTP1: TIdHTTP
procedure FormShow(Sender: TObject)
procedure LoginBtnClick(Sender: TObject)
private { Private declarations } public { Public declarations } end;var Form1: TForm1
QQ_Cookie, VerifySession:String;implementation{$R *.dfm}//提取字符串function SubString(aInputStr, aStr_L, aStr_R:string):string;var sPosB,sPosE:integer
Lwhtml,LwCstr_L,LwCstr_R:string;begin Result:=''
if Trim(aInputStr)='' then Exit
Lwhtml:= LowerCase(aInputStr)
LwCstr_L := LowerCase(aStr_L)
LwCstr_R := LowerCase(aStr_R)
sPosB:= Pos(LwCstr_L, Lwhtml) + Length(LwCstr_L)
sPosE:= PosEx(LwCstr_R, Lwhtml, sPosB)
if (sPosB<sPosE) and (sPosE>0) then Result:=Copy(aInputStr, sPosB, sPosE-sPosB);end;function HashStr2BinStr(Hash:string):string;var buf:array[0..63] of Char
i:Integer;begin Result:=''
FillChar(buf,SizeOf(buf),0)
SetLength(Result,Round(Length(Hash)/2))
FillChar(Result[1],Length(Result),0)
HexToBin(PChar(Hash),buf,SizeOf(buf))
for i:=0 to Round(Length(Hash)/2)-1 do Result[i+1]:=buf
end;function Fmd5(str:string):string;var md5 : TIdHashMessageDigest5
longWordRec : T4x4LongWordRecord;begin md5 := TIdHashMessageDigest5.Create
try {$IFDEF ID10} Result:=md5.HashStringAsHex(str)
{$ELSE} longWordRec:=md5.HashValue(str)
Result:=md5.AsHex(longWordRec)
{$ENDIF} finally md5.Free
end
end;function md5_3(str:string):string;begin Result:=Fmd5(str)
Result:=HashStr2BinStr(Result)
Result:=Fmd5(Result)
Result:=HashStr2BinStr(Result)
Result:=Fmd5(Result);end;function preprocess(pass,verifycode:string):string;begin Result:=Fmd5(md5_3(pass)+UpperCase(verifycode));end;procedure TForm1.FormShow(Sender: TObject);var ms:TMemoryStream
pic:TJPEGImage;begin ms:=TMemoryStream.Create
IdHTTP1.Request.SetHeaders
IdHTTP1.Request.RawHeaders.Clear
IdHTTP1.Request.Accept:='*/*'
IdHTTP1.Request.AcceptEncoding:='gzip, deflate'
IdHTTP1.Request.AcceptLanguage:='zh-cn'
//IdHTTP1.Request.CacheControl:='no-cache'
IdHTTP1.Request.Connection:='Keep-Alive'
//IdHTTP1.Request.ContentLength:=209
//IdHTTP1.Request.ContentType:='application/x-www-form-urlencoded'
IdHTTP1.Request.Host:='ptlogin2.qq.com'
//IdHTTP1.Request.Referer:='http://ui.ptlogin2.qq.com/cgi-bin/login?link_target=blank&appid=15000101&s_url=http%3A//php.qzone.qq.com/index.php%3Fmod%3Dportal%26act%3Dlogin&f_url=loginerroralert&target=top&qlogin_jumpname=jump&qlogin_param=u1%3Dhttp%3A//php.qzone.qq.com/index.php%3Fmod%3Dportal%26act%3Dlogin'
IdHTTP1.Request.UserAgent:='Mozilla/4.0 (compatible
MSIE 7.0
Windows NT 5.1
Trident/4.0
.NET CLR 2.0.50727
.NET CLR 3.0.4506.2152
.NET CLR 3.5.30729)'
IdHTTP1.Request.Host:='ui.ptlogin2.qq.com'
IdHTTP1.Get(Format('http://ptlogin2.qq.com/getimage?aid=15000101&%0.16f', [Time()]) , ms)
ms.Position:=0
pic:=TJPEGImage.Create
try pic.LoadFromStream(ms)
Image1.Picture.Assign(pic)
finally pic.Free
ms.Free
end
QQ_Cookie:= ''
QQ_Cookie:= SubString(IdHTTP1.Response.RawHeaders.Text, 'Set-Cookie: verifysession=', ';')
memo1.Lines.Add(QQ_Cookie)
memo1.Lines.Add('******************************')
QQ_Cookie:= 'verifysession=' + QQ_Cookie + ';'
memo1.Lines.Add(QQ_Cookie)
memo1.Lines.Add('******************************')
VerifySession:= QQ_Cookie
//IdHTTP1.Request.CustomHeaders.Clear
//IdHTTP1.Request.CustomHeaders.Add('Cookie:'+QQ_Cookie);end;procedure TForm1.LoginBtnClick(Sender: TObject);var Params:TStrings
url,tmp:String;begin Params :=TStringList.Create
try Params.Append('aid=15000101')
Params.Append('dumy=')
//???? Params.Append('fp=loginerroralert')
Params.Append('from_ui=1')
Params.Append('h=1')
Params.Append('p='+preprocess(PwsEdt.Text,VerifyPicEdt.Text));//密码和校验码MD5值 Params.Append('ptlang=0')
Params.Append('ptredirect=1')
Params.Append('u='+UserEdt.Text);//QQ号码 Params.Append('u1=http://php.qzone.qq.com/index.php?mod=portal&act=login')
Params.Append('verifycode='+VerifyPicEdt.Text);//校验码 try url := 'http://ptlogin2.qq.com/login'
IdHTTP1.HandleRedirects:=False
idhttp1.Post(url,Params)
//tmp:=idhttp1.Post(url,Params)
except end
finally Params.Free
end
Memo1.Lines.Add(tmp);end;end.
 

冬月

Unregistered / Unconfirmed
GUEST, unregistred user!
原因居然是编译出来的PROJECT。EXE文件被瑞星给杀掉了,上面的代码是病毒?
 
D

de410

Unregistered / Unconfirmed
GUEST, unregistred user!
盒子上的解决办法 http://bbs.2ccc.com/topic.asp?topicid=330829 该病毒没有exe或者dll的毒源体,因为自 SysConst.dcu 被置换的一刻开始,你已经是毒源体的创造者,该病毒原来早在 2005 年已经被发现,一个软件 QIP 2005 build 8094 中就曾经染毒,然后扩散看来,该病毒代码简单看来并没有伤害性,但是它完全是一个病毒的形态,不知道哪天会被利用的,那个俄罗斯高人把这个病毒分析出了源代码,并且提出了一个切实可行的解决方法,根据该病毒的特性,第一时间就是要把 Lib 中的 sysconst.bak 复制一份改名为 sysconst.dcu,注意,是复制而不是直接改名,因为如果你的系统还有潜在威胁的时候,如果还是有 sysconst.bak 在,那么这个病毒会认为它的工作已经完成而不会去动你的原版 sysconst.dcu,然后你要把你所有的项目重新编译,因为他们都已经染毒了。最好是做一下全盘检查。 BTW: 为什么一个 2005 年的“病毒”到了今天仍然还有那么多杀毒软件不报呢,因为从代码上来说,它的破坏性并没有,但是它的确拥有了病毒的特性。
 

Similar threads

顶部