DelPhi 2020. 4. 12. 13:28

type

TArrayScan = record

ScanArray: STring;

Start: DWORD;

Finish: DWORD;

end;

Function GetMask(Array_of_bytes: String): String;

var

x, y: integer;

St: string;

Mask: string;

begin

St := StringReplace(Array_of_bytes, ' ', '', [rfReplaceAll]);

y := 1;

for x := 1 to (Length(St) div 2) do

begin

if (St[y] + St[y + 1]) <> '??' then

begin

Mask := Mask + 'O';

y := y + 2;

end else

begin

Mask := Mask + 'X';

y := y + 2;

end;

end;

Result := Mask;

end;

Procedure StringToArrayByte(Str: string; var Buffer: array of byte);

var

x, y, z: integer;

St: string;

begin

St := StringReplace(Str, ' ', '', [rfReplaceAll]);

y := 1;

for x := 0 to Length(St) div 2 - 1 do

begin

if St[y] + St[y + 1] <> '??' then

begin

Buffer[x] := StrToInt('$' + St[y] + St[y + 1]);

y := y + 2;

end else

begin

Buffer[x] := $00;

y := y + 2;

end;

end;

end;

Function CompareArray(DestAddress:DWORD ;CONST Dest: Array of byte; Source: array of byte;

ALength: integer; Mask: String; var ReTurn : TStringList) : Boolean;

var

x, y: integer;

a, b, c: integer;

begin

for x := 0 to Length(Dest) - Length(Source) do

begin

a:=0;

for y := 0 to Length(Source) - 1 do

begin

if (Dest[x + y] = Source[y]) or (Mask[Y+1] = 'X') then

begin

if y = (Length(Source) - 1) then

begin

Return.Add(IntToHex(DestAddress+x,8));

end;

end else

begin

Break;

end;

end;

end;

Result := True;

end;

Function ArrayScan(Struct: TArrayScan): TStringList;

var

ArrayStruct: TArrayScan;

mbi: Memory_Basic_Information;

StartAdr: DWORD;

FinishAdr: DWORD;

Mask: string;

Str : STring;

Buffer: array of byte;

ScanBuffer: array of byte;

data : COPYDATASTRUCT;

reTurn: TStringList;

begin

//

Str := StringReplace(Struct.ScanArray,' ','',[rfReplaceAll]);

StartAdr := Struct.Start;

FinishAdr := Struct.Finish;

Mask := GetMask(Str);

SetLength(ScanBuffer, Length(Str) div 2);

StringToArrayByte(Str, ScanBuffer);

reTurn := TStringList.Create;

while StartAdr <= FinishAdr - $10 do

begin

VirtualQueryEx(HandleWindow, PDWORD(StartAdr), mbi, sizeof(mbi));

if ((Mbi.RegionSize > 0) and

((Mbi.Type_9 = MEM_PRIVATE) or (Mbi.Type_9 = MEM_IMAGE)) and

(Mbi.State = MEM_COMMIT) and

((Mbi.Protect = PAGE_READONLY) or

(Mbi.Protect = PAGE_READWRITE) or

(Mbi.Protect = PAGE_WRITECOPY) or

(Mbi.Protect = PAGE_EXECUTE) or

(Mbi.Protect = PAGE_EXECUTE_READ) or

(Mbi.Protect = PAGE_EXECUTE_READWRITE) or

(Mbi.Protect = PAGE_EXECUTE_WRITECOPY) )) then

begin

SetLength(Buffer, 0);

SetLength(Buffer, mbi.RegionSize);

ReadProcessMemory(HandleWindow, mbi.BaseAddress, @Buffer[0],mbi.RegionSize, buf);

CompareArray(DWORD(mbi.BaseAddress),Buffer,ScanBuffer,Length(ScanBuffer),Mask,reTurn);

StartAdr := DWORD(MBI.BaseAddress) + MBI.RegionSize;

end else

begin

StartAdr := DWORD(MBI.BaseAddress) + MBI.RegionSize;

end;

end;

data.dwData := 4;

data.cbData := SizeOf(reTurn);

data.lpData := @reTurn;

Result := reTurn;

end;

posted by 핵커 커뮤니티
:
Python 2020. 4. 11. 13:44

사이트 주소 > https://www.python.org/downloads/

'Python' 카테고리의 다른 글

[Python] 간편 로그인 소스  (0) 2020.04.13
posted by 핵커 커뮤니티
:
PHP 2020. 4. 11. 13:16

[PHP]_php 시작_종료 태그,변수, 저장 확장자

작성한 파일의 확장자를 html로 지정하면 php의 시작, 종료 태그 사이의 내용을 해석하지 않는다.

따라서 php의 내용을 표현하려면 확장자를 php로 저장하여야 한다.

<시작,종료> 태그는

<?php

-

-

-

?>

이런식으로 된 형식이다.

만약 다음과 같은 형식을 사용하려면

php.ini에서 설정해 주어야 한다.

<?

?>

short_open_tag=on

변수명 앞에서 $를 붙여야함

$x1 = 1;

$x2 = 2;

주의점! > 저장할 때 확장자는 php로 한다. <

내용 출력 명령은

echo​ "원하는 내용";

echo 1;

 

'PHP' 카테고리의 다른 글

[PHP] PHP 함수의 인수 배우보자!!!  (0) 2020.04.14
[PHP] PHP 문자 N 문자를 연결해보자!  (0) 2020.04.14
[PHP] PHP 함수 생성 및 호출  (0) 2020.04.14
[PHP] PHP 다운로드  (0) 2020.04.14
posted by 핵커 커뮤니티
: