kaswar
12-23-2008, 07:48 PM
Well some guy asked me how to do it on msn and i decided to bring back some old fashion pascal and code one myself.
Don't leech.
{By: Kaswar}
Function FindAddress(StartAddress: DWORD; EndAddress: DWORD; BytesToFind: Array of Byte): DWORD;
var
x: DWORD;
s: integer;
count: integer;
begin
for x := StartAddress to EndAddress do
begin
for s := 0 to sizeof(BytesToFind) do
begin
if PByte(x + s)^ = BytesToFind[s] then begin
count := count + 1;
if (count = sizeof(BytesToFind)) then
result := x;
end;
end;
end;
Bringing back some delphi lol.
Example:
Superhaxthatwilllpwntheworld := FindAddress($00400000, $0090000, MyArray);
//Adding it to a TMemo, I AM NOT So sure that it will work for an exe scanning for the addresses
Memo1.Lines.Add(Format('$%8.8x', [superhaxthatwillpwntheworld])) //we need to format it to display as a string
-9:03 PM / Dec. 23.
Fixed a little idiosyncrasie
-4:12PM / Dec. 24
I keep screwing up, fixed a lot more errors.
-11:02 PM / Dec. 28
Newly revised never knew address loging needed a lot of thinking
Don't leech.
{By: Kaswar}
Function FindAddress(StartAddress: DWORD; EndAddress: DWORD; BytesToFind: Array of Byte): DWORD;
var
x: DWORD;
s: integer;
count: integer;
begin
for x := StartAddress to EndAddress do
begin
for s := 0 to sizeof(BytesToFind) do
begin
if PByte(x + s)^ = BytesToFind[s] then begin
count := count + 1;
if (count = sizeof(BytesToFind)) then
result := x;
end;
end;
end;
Bringing back some delphi lol.
Example:
Superhaxthatwilllpwntheworld := FindAddress($00400000, $0090000, MyArray);
//Adding it to a TMemo, I AM NOT So sure that it will work for an exe scanning for the addresses
Memo1.Lines.Add(Format('$%8.8x', [superhaxthatwillpwntheworld])) //we need to format it to display as a string
-9:03 PM / Dec. 23.
Fixed a little idiosyncrasie
-4:12PM / Dec. 24
I keep screwing up, fixed a lot more errors.
-11:02 PM / Dec. 28
Newly revised never knew address loging needed a lot of thinking