Parsi Coders
[DELPHI]Anti JoeBox, CwSandbox, Anubis - نسخه قابل چاپ

+- Parsi Coders (http://parsicoders.com)
+-- انجمن: Cracking / Anti Crack (http://parsicoders.com/forumdisplay.php?fid=75)
+--- انجمن: Anti Debug (http://parsicoders.com/forumdisplay.php?fid=76)
+---- انجمن: Delphi (http://parsicoders.com/forumdisplay.php?fid=81)
+---- موضوع: [DELPHI]Anti JoeBox, CwSandbox, Anubis (/showthread.php?tid=1076)



[DELPHI]Anti JoeBox, CwSandbox, Anubis - Amin_Mansouri - 10-16-2011

کد:
function IsInSandbox(Serial: string):boolean;
var
  hOpen:    HKEY;
  sBuff:    array[0..256] of char;
  BuffSize: integer;
begin
  if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, PChar('Software\Microsoft\Windows\CurrentVersion'), 0, KEY_QUERY_VALUE, hOpen)) = ERROR_SUCCESS then begin
    BuffSize := SizeOf(sBuff);
    RegQueryValueEx(hOpen, PChar('ProductId'), nil, nil, @sBuff, @BuffSize);
    if sBuff = Serial then  Result := True;

    RegCloseKey(hOpen);
  end;
end;