2023年3月30日 星期四

猴子補丁 delphi monkey patch

https://marc.durdin.net/category/delphi/
https://marc.durdin.net/category/delphi/
procedure MonkeyPatch(OldProc, NewProc: PBYTE);
var
  pBase, p: PBYTE;
  oldProtect: Cardinal;
begin
  p := OldProc;
  pBase := p;

  // Allow writes to this small bit of the code section
  VirtualProtect(pBase, 5, PAGE_EXECUTE_WRITECOPY, oldProtect);

  // First write the long jmp instruction.
  p := pBase;
  p^ := $E9;  // long jmp opcode
  Inc(p);
  PDWord(p)^ := DWORD(NewProc) - DWORD(p) - 4;  // address to jump to, relative to EIP

  // Finally, protect that memory again now that we are finished with it
  VirtualProtect(pBase, 5, oldProtect, oldProtect);
end;

function GetUStrCatAddr: Pointer; assembler;
asm
  lea  eax,
System.@UStrCat
end;

initialization
  MonkeyPatch(GetUStrCatAddr, @_UStrCatMonkey);
end.


 delphi memory virtualprotect Effective Address



Inline Assembler in Delphi (III) - Static Arrays



From: http://delphi.cjcsoft.net//viewthread.php?tid=48043

Title: Inline Assembler in Delphi (III) - Static Arrays

Question: How to work with static arrays in inline assembler

Answer:
Inline Assembler in Delphi (III)
Static Arrays
By Ernesto De Spirito edspirito@latiumsoftware.com


Passing static arrays as parameters

Static arrays parameters are passed as pointers to the first element of the array, independently of whether the parameter is passed by value or by reference (either as "var" or as "const").

Given the following declarations...

  const
    ARRAY_MAX = 5;

  type
    TArrayOfInt = packed array [0..ARRAY_MAX] of longint;

  var
    a, b: TArrayOfInt;

  procedure InitializeArray(var a: TArrayOfInt);
  var
    i: integer;
  begin
    for i := 0 to ARRAY_MAX do
      a[i] := i;
  end;

...the call to the procedure InitializeArray in assembler would be like this:

    // In Object Pascal:
    //   InitializeArray(a);
    // In Inline Assembler:
    asm
      mov eax, offset a        // EAX := @a;
      call InitializeArray     // InitializeArray;
    end;

OFFSET is an assembler unitary operator that returns the address of a symbol. OFFSET is not applicable to local symbols. You should use the LEA opcode (see below), which is more "universal".


Static arrays passed by value

If the array is passed by value, it is responsibility of the called function to preserve the array. When a function needs to change the values of one or more elements of an array passed by value, normally it creates a local copy and works on the copy. The compiler creates a copy for us in the "begin" of Pascal procedures and functions, but in full assembler procedures and functions we have to do it by ourselves. One way of doing it is like this:

  procedure OperateOnArrayPassedByValue(a: TArrayOfInt);
  var
    _a: TArrayOfInt;
  asm
    // Copy the elements of "a" (parameter) in "_a" (local copy)
    push esi                      // Saves ESI on the stack
    push edi                      // Saves EDI on the stack
    mov esi, eax                  // ESI := EAX; // @a
    lea edi, _a                   // EDI := @_a;
    mov eax, edi                  // EAX := EDI; // @_a
    mov ecx, type TArrayOfInt     // ECX := sizeof(TArrayOfInt);
    rep movsb                     // Move(ESI^, EDI^, ECX);
    pop edi                       // Restores EDI from the stack
    pop esi                       // Restores ESI from the stack

    // Here goes the rest of the function. We'll work on "_a" (the
    // local copy), whose first element is now pointed by EAX.
  end;

The new things here are the LEA and MOVSB opcodes, the REP prefix, and the TYPE operator, described below:


LEA  (Load Effective Address)

Moves to the first operand the address of the second. Here we compare LEA with MOV:

   Instruction           Translated as          Effect
  -------------------------------------------------------------------

   lea eax, localvar     lea eax, [ebp-$04]     EAX := @localvar;
                                                EAX := EBP - $04;

   mov eax, localvar     mov eax, [ebp-$04]     EAX := localvar;
                                                EAX := (EBP - $04)^;


MOVSB (MOVe String Byte)

Copies the byte pointed by ESI to the location pointed by EDI, and increments ESI and EDI so they point to the next byte. The work of MOVSB can be described as follows:

  ESI^ := EDI^;    // Assume ESI and EDI are of type PChar
  Inc(ESI);
  Inc(EDI);

Notes:

MOVSW and MOVSD are the Word (16-bit) and DWord (32-bit) versionsrespectively (ESI and EDI are incremented by 2 and 4 respectively).
The registers are decremented if the Direction Flag is set.


REP
---

The REP prefix is used in string operations to repeat the operation decrementing ECX until ECX is zero. The work of REP could be described as follows:

  // rep string_instruction

  @@rep:
    string_instruction
    loop @@rep

Notes:

REP is not a shorthand for a code like the above. It works a lot faster.
The value of ECX is not checked at the beginning of the loop (if ECX is zero, the instruction would be repeated 2^32 times, but will generate an AV long before that, as soon as ESI or EDI point to an invalid memory location).


TYPE

The TYPE operator is a unary operator evaluated at compile time, and it
returns the size in bytes of the operand, which must be a data type. For
example, TYPE WORD will return 2 and TYPE INTEGER will return 4.


Accessing the elements of an array

To access an element a[i] we need the values "@a[0]" and "i" in registers (like EDX and ECX, for example), and then we can use memory addressing as follows:

  lea edx, a                      // EDX := @a;
  mov ecx, i                      // ECX := i;
  mov ax, [edx+ecx*type integer]  // AX := EDX[ECX];  // a[i];
       // PWord(EDX + ECX * SizeOf(integer))^

In the example, we assumed that the elements have 2 bytes (we moved the value of a[i] to AX, a 16-bit register), that the array is not a packed one (each element actually occupies 4 bytes, the size of an integer, so this value was used to compute the position of the element), and that the array is zero-based. For example:

    var a: array [0..N] of word = (1, 2, 3, 6, ...);

    +------ EDX = @a
    |
    v
  +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+--
  | 1 | 0 |   |   | 2 | 0 |   |   | 3 | 0 |   |   | 6 | 0 |   |   |
  +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+--
    a[0]             a[1]            a[2]            a[3]
    [edx]          [edx+04]        [edx+08]        [edx+12]

If the array is not zero-based, we have to adjust the value of the index to make it zero-based before addressing the element. Examples:

  // a[1..100]
  :
  mov ecx, i                      // ECX := i;
  dec ecx                         // Dec(ECX); // Adjust ECX
  :

  // a[-10..10]
  :
  mov ecx, i                      // ECX := i;
  add ecx, 10                     // Inc(ECX, 10); // Adjust ECX
  :

The procedure InitializeArray (introduced above) can be implemented in assembler like this:

  procedure InitializeArray(var a: TArrayOfInt);
  asm                                // EAX = PByte(@a[0]);
    xor ecx, ecx                     // ECX := 0;
  @@loop:
    mov [eax+ecx*type integer], ecx  // PInteger(EAX+ECX*4)^ := ECX;
                                     //  ...or  EAX[ECX] := ECX;
    inc ecx                          // ECX := ECX + 1;
    cmp ecx, ARRAY_MAX               // if ECX     jle @@loop                       //   goto @@loop;
  end;

Or like this:

  procedure InitializeArray(var a: TArrayOfInt);
  asm                      // EAX = @a[0];
    xor ecx, ecx           // ECX := 0;
  @@loop:
    mov [eax], ecx         // EAX^ := ECX;
    inc ecx                // Inc(ECX);
    add eax, type integer  // Inc(EAX); // Point to the next element
    cmp ecx, ARRAY_MAX     // if ECX     jle @@loop             //   goto @@loop;
  end;


Returning array values

Functions returning arrays receive an additional last parameter which is the pointer to the memory location where they should place their return value (memory is allocated and freed if necessary by the caller). For example, let's consider the following function:

  function ReverseArray(const a: TArrayOfInt): TArrayOfInt;
  var
    i: integer;
  begin
    for i := 0 to ARRAY_MAX do
      Result[i] := a[ARRAY_MAX-i];
  end;

The function receives two parameters:

EAX = the address of the first element of the array "a"
EDX = the address of the first element of Result

The function can be rewritten in assembler as follows:

  function ReverseArray(const a: TArrayOfInt): TArrayOfInt;
  asm                                // EAX = @a[0]; EDX = @Result[0];
    push ebx                         // Save EBX
    mov ebx, eax                     // EBX := EAX;
    xor ecx, ecx                     // ECX := 0;
  @@loop:
    mov eax, ARRAY_MAX
    sub eax, ecx                     // EAX := ARRAY_MAX-ECX;
    mov eax, [ebx+eax*type integer]  // EAX := EBX[EAX];
    mov [edx+ecx*type integer], eax  // EDX[ECX] := EAX;
    inc ecx                          // ECX := ECX + 1;
    cmp ecx, ARRAY_MAX               // if ECX     jle @@loop                       //   goto @@loop;
    pop ebx                          // Restore EBX
  end;

Well, this is it for now. In the next issue we'll see how to work with records.



Previous: Inline Assembler in Delphi (II) - ANSI strings
Next: Inline Assembler in Delphi (IV) - Records


Monkey Patching delphi asm assembly lea load effective address


https://github.com/Purik/AIO
Call to MonkeyPatches module

Monkey patching methods (functions) in Delphi Win64

https://stackoverflow.com/questions/53511873/monkey-patching-methods-functions-in-delphi-win64

latex description algorithms pseudocode standard value variable

 illinois.edu
https://ctan.math.illinois.edu › latex › contrib
  This paper describes a LATEX environment named pseudocode that can be used for describing algorithms in pseudocode form. This is the 

LaTeX algorithmic for loop
LaTeX algorithm While
LaTeX algorithm For
LaTeX algorithm parameters
LaTeX algorithm Function
LaTeX Procedure

https://www.unf.edu/~broggio/cop3530/2220pseu.htm

https://en.wikibooks.org/wiki/LaTeX/Algorithms

 https://www.overleaf.com/learn/latex/Algorithms

 

https://users.csc.calpoly.edu/~jdalbey/SWE/pdl_std.html    

PSEUDOCODE STANDARD
Pseudocode is a kind of structured english for describing algorithms. It allows the designer to focus on the logic of the algorithm without being distracted by details of language syntax.  At the same time, the pseudocode needs to be complete.  It describe the entire logic of the algorithm so that implementation becomes a rote mechanical task of translating line by line into source code.

 https://www.indeed.com/career-advice/career-development/pseudocode

 How To Write Pseudocode (Definition, Components and Pros)
indeed.com https://www.indeed.com › career-advice
 Pseudocode primarily uses plain text to describe various coding actions and their correct sequence in the algorithm. You can also include ...

 

 

 

2023年3月28日 星期二

characters sprites textures models reverse game 3d model Game Archive assets sprites UnPacker

 https://www.kodeco.com/36285673-how-to-reverse-engineer-a-unity-game

http://www.gameburp.com/game-developer-resources/#2d_Graphics_tools_tilemaps

 https://www.gamedeveloper.com/audio/38-great-resources-for-game-developers

https://answers.unity.com/questions/211863/how-do-i-extract-assets-from-a-pre-compiled-unity.html

https://forum.playcanvas.com/t/assets-free-3d-models-sprites-icons-and-sounds-for-your-games/19199

2023年3月23日 星期四

SvcMgr ScktComp SConnect ScktCnst "tsocketdispatcherthread" scktsrvr dpr socket server

  proxy server gatekeeper socket server agent VisiBroker

利用 ScktSrvr 打造多功能 Socket 服務器 - Delphi - bestlong 怕失憶論壇 - Powered by Discuz!

http://www.bestlong.idv.tw/forum.php?mod=viewthread&tid=1236&page=1

 一個客戶端連接創建一個TSocketDispatcherThread類的服務線程為該客戶端服務,

"tsocketdispatcherthread" scktsrvr dpr A separate thread per client connection. The server scktsrvr.dpr comes with source code, see TSocketDispatcherThread in ScktMain.pas. – Ondrej ...


 http://www.delphigroups.info/2/17/182900.html

How to create a socketserver service? - delphi

unit    UntSocketMain;
    
        Windows,    Messages,    SysUtils,    Classes,    Graphics,    Controls,    SvcMgr,    Dialogs,
        ScktComp,    SConnect,    ActiveX,    MidConst,    Registry,    ScktCnst;

type
        TSocketDispatcherThread    =    class(TServerClientThread,    ISendDataBlock)
        private
        FRefCount:    Integer;
        FInterpreter:    TDataBlockInterpreter;
        FTransport:    ITransport;
        FInterceptGUID:    string;
        FLastActivity:    TDateTime;
        FTimeout:    TDateTime;
        FRegisteredOnly:    Boolean;
        FAllowXML:    Boolean;
        protected
                    CreateServerTransport:    ITransport;    virtual;
        {    IUnknown    }
                    QueryInterface(const    IID:    TGUID;    out    Obj):    HResult;    stdcall;
                    _AddRef:    Integer;    stdcall;
                    _Release:    Integer;    stdcall;
        {    ISendDataBlock    }
                    Send(const    Data:    IDataBlock;    WaitForResult:    Boolean):
IDataBlock;    stdcall;
        public
        constructor    Create(CreateSuspended:    Boolean;    ASocket:
TServerClientWinSocket;
                const    InterceptGUID:    string;    Timeout:    Integer;    RegisteredOnly,
AllowXML:    Boolean);
        procedure    ClientExecute;    override;
        property    LastActivity:    TDateTime    read    FLastActivity;
        

type
        TSocketDispatcher    =    class(TServerSocket)
        private
        FInterceptGUID:    string;
        FTimeout:    Integer;
        procedure    GetThread(Sender:    TObject;    ClientSocket:
TServerClientWinSocket;
                var    SocketThread:    TServerClientThread);
        public
        constructor    Create(AOwner:    TComponent);    override;
        property    InterceptGUID:    string    read    FInterceptGUID    write    FInterceptGUID;
        property    Timeout:    Integer    read    FTimeout    write    FTimeout;
        

        type
        TMyService    =    class(TService)
        procedure    ServiceStart(Sender:    TService;    var    Started:    Boolean);
        private
        {    Private    declarations    }
        SocketDispatcher:    TSocketDispatcher;
        protected
        procedure    ReadSettings;
        public
                    GetServiceController:    TServiceController;    override;
        {    Public    declarations    }
        

var
        CttsoftService:    TCttsoftService;

implementation

{$R    *.DFM}

{    TSocketDispatcherThread    }
constructor    TSocketDispatcherThread.Create(CreateSuspended:    Boolean;
        ASocket:    TServerClientWinSocket;    const    InterceptGUID:    string;    Timeout:
Integer;
        RegisteredOnly,    AllowXML:    Boolean);
        
        FInterceptGUID    :=    InterceptGUID;
        FTimeout    :=    EncodeTime(Timeout    div    60,    Timeout    mod    60,    0,    0);
        FLastActivity    :=    Now;
        FRegisteredOnly    :=    RegisteredOnly;
        FAllowXML    :=    AllowXML;
        inherited    Create(CreateSuspended,    ASocket);


            TSocketDispatcherThread.CreateServerTransport:    ITransport;
var
        SocketTransport:    TSocketTransport;
        
        SocketTransport    :=    TSocketTransport.Create;
        SocketTransport.Socket    :=    ClientSocket;
        SocketTransport.InterceptGUID    :=    FInterceptGUID;
        Result    :=    SocketTransport    as    ITransport;


{    TSocketDispatcherThread.IUnknown    }

            TSocketDispatcherThread.QueryInterface(const    IID:    TGUID;    out    Obj):
HResult;
        
        if    GetInterface(IID,    Obj)    then    Result    :=    0    else    Result    :=    E_NOINTERFACE;


            TSocketDispatcherThread._AddRef:    Integer;
        
        Inc(FRefCount);
        Result    :=    FRefCount;


            TSocketDispatcherThread._Release:    Integer;
        
        Dec(FRefCount);
        Result    :=    FRefCount;


{    TSocketDispatcherThread.ISendDataBlock    }

            TSocketDispatcherThread.Send(const    Data:    IDataBlock;    WaitForResult:
Boolean):    IDataBlock;
        
        FTransport.Send(Data);
        if    WaitForResult    then
        while    True    do
                
                Result    :=    FTransport.Receive(True,    0);
                if    Result    =    nil    then    break;
                if    (Result.Signature    and    ResultSig)    =    ResultSig    then
                break    else
                FInterpreter.InterpretData(Result);
        


procedure    TSocketDispatcherThread.ClientExecute;
var
        Data:    IDataBlock;
        msg:    TMsg;
        Obj:    ISendDataBlock;
        Event:    THandle;
        WaitTime:    DWord;
        
        CoInitialize(nil);
        try
        FTransport    :=    CreateServerTransport;
        try
                Event    :=    FTransport.GetWaitEvent;
                PeekMessage(msg,    0,    WM_USER,    WM_USER,    PM_NOREMOVE);
                GetInterface(ISendDataBlock,    Obj);
                if    FRegisteredOnly    then
                FInterpreter    :=    TDataBlockInterpreter.Create(Obj,    SSockets)    else
                FInterpreter    :=    TDataBlockInterpreter.Create(Obj,    '');
                try
                Obj    :=    nil;
                if    FTimeout    =    0    then
                        WaitTime    :=    INFINITE    else
                        WaitTime    :=    60000;
                while    not    Terminated    and    FTransport.Connected    do
                try
                        case    MsgWaitForMultipleObjects(1,    Event,    False,    WaitTime,
QS_ALLEVENTS)    of
                        WAIT_OBJECT_0:
                                
                                WSAResetEvent(Event);
                                Data    :=    FTransport.Receive(False,    0);
                                if    Assigned(Data)    then
                                        
                                FLastActivity    :=    Now;
                                FInterpreter.InterpretData(Data);
                                Data    :=    nil;
                                FLastActivity    :=    Now;
                                
                        
                        WAIT_OBJECT_0    +    1:
                                while    PeekMessage(msg,    0,    0,    0,    PM_REMOVE)    do
                                DispatchMessage(msg);
                        WAIT_TIMEOUT:
                                if    (FTimeout    >    0)    and    ((Now    -    FLastActivity)    >    FTimeout)    then
                                FTransport.Connected    :=    False;
                        
                except
                        FTransport.Connected    :=    False;
                
                finally
                FInterpreter.Free;
                FInterpreter    :=    nil;
                
        finally
                FTransport    :=    nil;
        
        finally
        CoUninitialize;
        


{    TSocketDispatcher    }
constructor    TSocketDispatcher.Create(AOwner:    TComponent);
        
        inherited    Create(AOwner);
        ServerType    :=    stThreadBlocking;
        OnGetThread    :=    GetThread;


procedure    TSocketDispatcher.GetThread(Sender:    TObject;
        ClientSocket:    TServerClientWinSocket;
        var    SocketThread:    TServerClientThread);
        
{        SocketThread    :=    TSocketDispatcherThread.Create(False,    ClientSocket,
        InterceptGUID,    Timeout,    SocketForm.RegisteredAction.Checked,
SocketForm.AllowXML.Checked);
Quote

        }

        SocketThread    :=    TSocketDispatcherThread.Create(False,    ClientSocket,
        InterceptGUID,    Timeout,    False,    True);


procedure    ServiceController(CtrlCode:    DWord);    stdcall;
        
        CttsoftService.Controller(CtrlCode);


            TCttsoftService.GetServiceController:    TServiceController;
        
        Result    :=    ServiceController;


procedure    TMyService.ReadSettings;
        
        SocketDispatcher    :=    TSocketDispatcher.Create(nil);
        SocketDispatcher.Port    :=    211;
        SocketDispatcher.ThreadCacheSize    :=    10;
        SocketDispatcher.FInterceptGUID    :=    '';
        SocketDispatcher.FTimeout    :=    0;
        try
        SocketDispatcher.Open;
        except
        on    E:    Exception    do
                raise    Exception.CreateResFmt(@SOpenError,    [SocketDispatcher.Port,
E.Message]);
 
procedure    TMyService.ServiceStart(Sender:    TService;
        var    Started:    Boolean);
        
        if    not    LoadWinSock2    then
        raise    Exception.CreateRes(@SNoWinSock2);

        ReadSettings;
        Started    :=    True;
 

2023年3月18日 星期六

TRANSISTORS

 NEC 8P4SMA 8A MOLD ISOLATED SCR

SMG16C60F Thyristor SCR 

SD103A Schottky Diodes

DTC123EL DIGITAL TRANSISTORS

TOSHIBA-TB6643K Brushed DC Motor Driver ICs

2023年3月14日 星期二

wiki billiard balls material pf polyester resin Phenolic Cotton Phenol formaldehyde resin - Wikipedia

 https://en.wikipedia.org/wiki/Phenol_formaldehyde_resin

 

https://zh.wikipedia.org/wiki/%E9%85%9A%E9%86%9B%E6%A0%91%E8%84%82

Anti-Debug: Debug Flags execution sandbox debug tools ret jmp ntglobalflag

 https://www.google.com/search?q=execution+sandbox+debug+tools+ret+jmp+ntglobalflag&client=firefox-b-d&sxsrf=AJOqlzXnPaMUdTk-A-vN0FtPYW784yLI0A%3A1678790200781&ei=OE4QZIqfL5Xi2roPvLOIgAI&oq=execution+sandbox+&gs_lcp=Cgxnd3Mtd2l6LXNlcnAQARgAMgQIIxAnMgQIIxAnMgQIIxAnMgQIABAeMgYIABAIEB4yBggAEAgQHjIICAAQCBAeEA86BAgAEEdKBAhBGABQyQRYyQRg4xtoAHACeACAAUqIAUqSAQExmAEAoAEByAEKwAEB&sclient=gws-wiz-serp

https://www.apriorit.com/dev-blog/367-anti-reverse-engineering-protection-techniques-to-use-before-releasing-software
https://www.codeproject.com/Articles/1090943/Anti-Debug-Protection-Techniques-Implementation-an
https://anti-debug.checkpoint.com/techniques/debug-flags.html
https://blog.csdn.net/fengyunzhongwei/article/details/39160565
https://www.scribd.com/document/413964852/Anti-Debugging-Protection-Techniques-With-Examples-pdf

https://www.google.com/search?q=execution+sandbox+debug+tools+ret+jmp+ntglobalflag&client=firefox-b-d&sxsrf=AJOqlzXnPaMUdTk-A-vN0FtPYW784yLI0A%3A1678790200781&ei=OE4QZIqfL5Xi2roPvLOIgAI&oq=execution+sandbox+&gs_lcp=Cgxnd3Mtd2l6LXNlcnAQARgAMgQIIxAnMgQIIxAnMgQIIxAnMgQIABAeMgYIABAIEB4yBggAEAgQHjIICAAQCBAeEA86BAgAEEdKBAhBGABQyQRYyQRg4xtoAHACeACAAUqIAUqSAQExmAEAoAEByAEKwAEB&sclient=gws-wiz-serp

https://www.google.com/search?q=execution+sandbox+debug+tools+ret+jmp+ntglobalflag+apriorit+&client=firefox-b-d&sxsrf=AJOqlzUyvWu-d6_fkR8cjH7fpbD8LJorGA%3A1678790228836&ei=VE4QZNfQMp2n2roP0fi_4AU&ved=0ahUKEwjXyvf5nNv9AhWdk1YBHVH8D1wQ4dUDCA4&oq=execution+sandbox+debug+tools+ret+jmp+ntglobalflag+apriorit+&gs_lcp=Cgxnd3Mtd2l6LXNlcnAQDDoKCAAQRxDWBBCwAzoICAAQgAQQywE6BAgAEB46BggAEB4QD0oECEEYAFDyAViiHWD8ImgBcAF4AIABiAGIAe8CkgEDMi4ymAEAoAEBoAECyAEKwAEB&sclient=gws-wiz-serp

https://www.google.com/search?client=firefox-b-d&q=executtion+sandbox

 

 

sDebuggerPresent
PEB (Process Environment Block)
How to neutralize the IsDebuggerPresent check
TLS Callback
NtGlobalFlag
How to neutralize the NtGlobalFlag check
NtGlobalFlag and IMAGE_LOAD_CONFIG_DIRECTORY
Heap Flags and ForceFlags
How to neutralize the Heap Flags and ForceFlags checks
Trap Flag Check
How to neutralize the TF check
CheckRemoteDebuggerPresent and NtQueryInformationProcess
How to neutralize CheckRemoteDebuggerPresent and NtQueryInformationProcess
Other techniques of anti-debug protection based on NtQueryInformationProcess
How to neutralize the NtQueryInformationProcess checks
Breakpoints: Software and Hardware ones
SEH (Structured Exception Handling)
How to neutralize SEH checks
VEH (Vectored Exception Handler)
How to neutralize hardware breakpoint check and VEH
NtSetInformationThread – hiding thread from debugger
How to neutralize thread hiding from debugger
NtCreateThreadEx
How to neutralize NtCreateThreadEx
Handle Tracing
Stack Segment Manipulation 

HyperDbg: Reinventing Hardware-Assisted Debugging
misc0110.net
https://misc0110.net › files › hyperdbg_ccs22
  We describe how the pro- posed debugger enables transparent debugging of I/O devices, analy- ses performance of software, and provides means for code coverage.
 

Windows Anti-Debug Reference

http://www.symantec.com/connect/articles/windows-anti-debug-reference


2023年3月10日 星期五

Sensors | Free Full-Text | A Novel Deep Neural Network Method for HAR-Based Team Training Using Body-Worn Inertial Sensors neural network AI Deployment Workflow Train Optimize distribution

 https://www.mdpi.com/1424-8220/22/21/8507

 

  Sensors | Free Full-Text | A Novel Deep Neural Network Method for HAR-Based Team Training Using Body-Worn Inertial Sensors 

 PyTorch Recipes  A Problem-Solution Approach to Build, Train and Deploy Neural Network Models

neural network AI Deployment Workflow Train Optimize distribution

https://neptune.ai/blog/knowledge-distillation 

Knowledge Distillation: Principles, Algorithms, Applications - neptune.ai

DIANNE: a modular framework for designing, training and deploying deep neural networks on heterogeneous distributed infrastructure - ScienceDirect

Sensors | Free Full-Text | Quantization and Deployment of Deep Neural Networks on Microcontrollers

2023年3月8日 星期三

10Mbps BPSK ZIF transceivers for 1.2GHz, 2.3GHz and 3.4GHz

 max2870 23.5mhz-6ghz pll core board + control board for signal generator frequency source

 

 10Mbps BPSK ZIF transceivers for 1.2GHz, 2.3GHz and 3.4GHz

 https://s53mv.s56g.net/3zif/frontend.html

http://lea.hamradio.si/~s53mv/3zif/design.html

Low Cost Microwave Radar Modules For 3, 10, and 24 GHz Categories 3D Spherical Patterns, ALL Antennas, EIRP Radiation, Microwave, PCB 24GHz Doppler Radar Motion Sensor

 https://antennatestlab.com/antenna-examples/radar-antenna-pattern-rcwl-0516-hb100-cdm324

 low cost microwave radar modules cdm324 rcwl0516 hb100 hfscd06 lv002

MH-100X HB100  RCWL 0516 HB100 CDM324 LD112 IR24FDA
 
SEN0395 SEN0192 BGT60TR13C MW2401TR11 

ologymart 5.8ghz Ologymart DC 12V-24V 5.8GHz Microwave Radar Motion ...

2023年2月27日 星期一

觀葉植物 Foliage 樹葉 Houseplants Foliage plants Houseplants Red Leaves 紅色觀葉植物

 觀葉植物  Foliage 樹葉 Houseplants
龜背芋 Monstera deliciosa
鹿角蕨屬 ビカクシダ属 Staghorn fern Platycerium
硬葉槲蕨 Drynaria rigidula
虎尾蘭 Dracaena trifasciata Snake Plant
龍血樹屬 Dracaena 虎斑木屬
觀音蓮 Alocasia sanderiana
藍冰柏 Cupressus arizonica var. glabra Blue Ice
柏科 Cupressaceae
柏木屬 Cupressus
明脈花燭 Anthurium clarinervium
天南星科 Araceae
花燭屬 Anthurium
Anthurium clarinervium 明脈花燭 紅掌 Anthurium clarinervium 天鵝絨紙板紅掌
圓角鹿角蕨 P.kitshakood cv. eveted horn
亞皇與亞猴的交種 P.Kitshakood x Ridleyi
亞洲猴腦鹿角蕨Platycerium ridleyi
粉紅公主蔓綠絨 philodendron pink princess
天南星科 Araceae 

蔓綠絨 Philodendron
白巫師蔓綠絨 Philodendron White wizard
天南星科(Araceae)蔓綠絨(Philodendron)
南美水晶花燭 Anthurium Crystallinum
天南星科(Araceae)花燭屬(Authurium)
龍爪蔓綠絨 Philodendron laciniatum
Philodendron pedatum
天南星科(Araceae)蔓綠絨(Philodendron)
水芋 Colocasia Paraoh's Mask
天南星科(Araceae)芋屬(Colocasia)
 觀音蓮 Alocasia Jacklyn
天南星科(Araceae)觀音蓮屬(Alocasia)
姬龜背 Rhaphidophora tetrasperma
天南星科(Araceae)崖角藤屬植物(Rhaphidophora)
彩葉芋(Caladium) Fancy-leaf Caladium,Caladium,Heart-of-Jesus
Caladium× hortulanum Birdsey
山蘇 鐵角蕨屬 Asplenium
鐵角蕨 Asplenium flabellifolium
鳥巢蕨 Asplenium nidus
天南星科 Araceae
Aglaonema 粗肋草屬
Alocasia.海芋
Aspidistra.蜘蛛抱蛋 Aspidistra elatior 一葉蘭 粽葉 葉蘭
龍舌蘭亞科 Agavoideae
火鶴花 Anthurium andraeanum
花燭屬 Authurium
Calathea. calathea 疊苞竹芋屬
彩虹竹芋 Calathea roseopicta
Chamaedorea. Chamaedorea Elegans 椰子葵
Chamaedorea Seifrizii 竹莖椰子棕櫚  
Cordyline 朱蕉屬Cordyline, 龍舌蘭科
Croton 巴豆屬  
Dieffenbachia.萬年青
Coleus Wizard Scarlet 彩葉草 猩紅色
紫蘇 Perilla frutescens 唇形科紫蘇屬
Foliage plants Houseplants  Red Leaves 紅色觀葉植物

 

天南星科Araceae
粗肋草  Aglaonema
姑婆芋  海芋  觀音蓮  Alocasia
雷公連  Amydrium
花燭  火鶴  Anthurium
彩葉芋  Caladium
鞭藤芋  Cercestis
曲籽芋  Cyrtosperma
黛粉葉  花葉萬年青  Dieffenbachia
拎樹藤  Epipremnum
春雪芋  扁葉芋  千年健  Homalomena
龜背芋  蓬萊蕉  Monstera
蔓綠絨  喜樹蕉  喜林芋  Philodendron
針房藤  崖角藤  Rhaphidophora
藤芋  Scindapsus
白鶴芋  Spathiphyllum
合果芋  Syngonium
美鐵芋  Zamioculcas
爵床科Acanthaceae
網紋草  Fittonia
五加科Araliaceae
常春藤  長春藤  Hedera
福祿桐  南洋參  Polyscias
蘭嶼八角金盤  Osmoxylon
鵝掌柴  Schefflera
棕櫚科Arecaceae
山棕  Arenga
隱萼椰子  Calyptrocalyx
孔雀椰子  Caryota
茶馬椰子  Chamaedorea
金果椰  Dypsis
刺軸櫚  Licuala
山檳榔  Pinanga
射葉椰子  Ptychosperma
棕竹  Rhapis
薩里巴斯椰  Saribus
天門冬科Asparagaceae
天門冬  Asparagus
蜘蛛抱蛋  Aspidistra
酒瓶蘭  Beaucarnea
吊蘭  Chlorophytum
朱蕉  Cordyline
龍血樹  Dracaena
虎尾蘭  Sansevieria
秋海棠科Begoniaceae
秋海棠  Begonia
鳳梨科Bromeliaceae
隱花鳳梨  Cryptanthus
皮氏鳳梨  Pitcairnia
鶯歌鳳梨  Vriesea
金絲桃科 藤黃科Clusiaceae
胡桐  Calophyllum
書帶木  Clusia
滿美果  Mammea
鴨跖草科Commelinaceae
大葉錦竹草  Callisia
銀波草  Geogenanthus
水竹葉  Murdannia
巴拿馬草科Cyclanthaceae
玉鬚草  Asplundia
環花草  Cyclanthus
單肋草  Ludovia
大戟科Euphorbiaceae
變葉木  Codiaeum
苦苣苔科Gesneriaceae
喜蔭花  Episcia
血皮草科Haemodoraceae
鳩尾草  Xiphidium
錦葵科Malvaceae
馬拉巴栗  Pachira
竹芋科Marantaceae
錦竹芋  櫛花芋  Ctenanthe
肖竹芋  Goeppertia
竹芋  Maranta
穗花柊葉  Stachyphrynium
紅裏蕉  紫背竹芋  臥花竹芋  Stromanthe
桑科Moraceae
榕  Ficus
蘭科Orchidaceae
金線蓮  開唇蘭  Anoectochilus
沼蘭  Crepidium
雲葉蘭  Nephelaphyllum
血葉蘭  Ludisia
彩葉蘭  Macodes
露兜樹科Pandanaceae
山露兜  藤露兜  Freycinetia
露兜樹  Pandanus
胡椒科Piperaceae
椒草  Peperomia
胡椒  Piper
羅漢松科Podocarpaceae
羅漢松  Podocarpus
竹柏  Nageia
蓼科Polygonaceae
海葡萄  Coccoloba
鳳尾蕉科 澤米蘇鐵科Zamiaceae
美葉鳳尾蕉  Zamia
真蕨類及擬蕨類植物Fern and fern allies
鹵蕨  Acrostichum
鐵線蕨  Adiantum
鐵角蕨  Asplenium
骨碎補  Davallia
星蕨  Microsorum
腎蕨  Nephrolepis
擬茀蕨  Phymatosorus
石葦  Pyrrosia
卷柏  Selaginella
松葉蕨  Psilotum
光葉藤蕨  Stenochlaena 

Plants That Grow in Water
Chinese Evergreen 粗肋草屬
Begonia 秋海棠属
Spiderwort 紫露草屬
Pothos 綠蘿 黃金葛
Baby's Tears 金錢麻屬 嬰兒淚 小葉冷水麻
African Violet 非洲堇屬 Saintpaulia
wild pansy 三色菫 Viola tricolo
Violaceae 堇菜科
Coleus  彩葉草
Lucky Bamboo 富貴竹
Philodendron 喜林芋 蔓綠絨屬
Soft-stemmed herbs 軟莖草
Wandering Jew 丁香
Dracaena marginata 紅邊竹蕉
Impatiens 鳳仙花
Begonia 秋海棠
Paperwhite 白水仙
Caladium 花葉芋屬
Moth Orchid 蘭花
Prayer Plant 豹紋竹芋
Aluminum Plant 花葉冷水花
Mint 薄荷

牡丹 Paeonia suffruticosa
繡球花 Hydrangea macrophylla
牽牛 Ipomoea nil
杜鵑花屬 Rhododendron  映山紅 杜鵑花 Ericaceae
錫葉藤 Sandpaper Vine

金雞菊
紫礬根
鼠尾草
藍盆花
粉色落新婦
釣鐘柳
黑心菊
紫松果菊
筋骨草
大根老鸛草
桔梗花
高桿波斯菊
大花夏枯草
翠菊
大蔥花
紫丁香
二月蘭
鳳眼蓮
藿香薊
紫睡蓮
裂葉美女櫻
飛燕草
還亮草
花菖蒲
聚花風鈴草
耬鬥花
蛇鞭菊花
萬代蘭
銀蓮花
紫芳草 紫藤花 紫露草 五彩石竹花 百里香花

紫荆花 洋紫荊 Red-flowered camel’s foot Hong Kong Orchid Tree 馬蹄豆 羊蹄甲

葉牡丹 brassica oleracea var. acephala f. tricolor.


芍藥 山茶花 牡丹花 杜鵑  薔薇科月季花 玫瑰 薔薇 刺槐 茉莉花

薔薇科木瓜海棠屬 寒梅  Chaenomeles speciosa


2023年2月19日 星期日

Alarm Sensor and Security Circuit Cookbook Microwave Doppler Radar Sensor for Motion and Speed Sensing microwave doppler motion detector

  Thomas Petruzzellis

Build Your Own Electronics Workshop: Everything You Need to Design a Work Space, Use Test Equipment, Build and Troubleshoot Circuits (TAB Electronics Technician

Optoelectronics, Fiber Optics, and Laser Cookbook

Electronics Sensors for the Evil Genius: 54 Electrifying Projects

Telephone Projects for the Evil Genius

22 Radio and Receiver Projects for the Evil Genius

The Alarm, Sensor & Security Circuit Cookbook

科学鬼才 传感器智能应用54例 图例版

Electronic Games for the Evil Genius: 21 Do-It-Yourself Entertaining Projects

Stamp II Communications and Control Projects

2023年2月10日 星期五

Thermal Insulation materials Fiberglass. Mineral wool. Cellulose. Natural fibers. Polystyrene. Polyisocyanurate. Polyurethane. Perlite.

 https://www.energy.gov/energysaver/insulation-materials

 https://www.energy.gov/energysaver/types-insulation

https://textilesinside.com/5-most-common-thermal-insulation-materials/ 

materials heat transfer rate

https://en.wikipedia.org/wiki/Rate_of_heat_flow

2023年2月8日 星期三

Windows 10 系統可以使用以下幾種方法獲取鍵盤輸入信息 The Windows 10 system can use the following methods to obtain keyboard input information

Windows 10 系統可以使用以下幾種方法獲取鍵盤輸入信息:

Windows API 函數: Windows API 提供了一組函數,可以監控鍵盤輸入事件,例如 GetAsyncKeyState 函數和 GetKeyState 函數。 GetAsyncKeyState 

    Windows Polling (GetAsyncKeyState, GetKeyboardState)


Windows Hooks: Windows Hooks 是一種特殊的機制,可以捕獲 Windows 系統中的各種事件,例如鍵盤事件,並對其進行處理。 SetWindowsHookEx 

    Windows Hooking (SetWindowsHookEx)


DirectInput: DirectInput 是 Microsoft DirectX 的一部分,是一種用於獲取輸入設備信息的高級接口。 DirectInput DirectInputDevice 

    Direct Input  DirectInput8Create SetCooperativeLevel MapVirtualKeyA


Raw Input: Raw Input 是 Windows API 中的一種特殊技術,用於捕獲原始的鍵盤輸入數據,並為其設置處理函數。 

    Raw Input GetKeyboardState GetRawInputData MapVirtualKeyA


GetrawInputData DirectInput DirectInputDevice GetrawInputData GetAsyncKeyState SetWindowsHookEx

 

 

https://www.codeproject.com/Articles/17123/Using-Raw-Input-from-C-to-handle-multiple-keyboard

https://learn.microsoft.com/zh-tw/windows/win32/inputdev/using-raw-input 

https://www.codeproject.com/Articles/297312/Minimal-Key-Logger-using-RAWINPUT
 

https://wikileaks.org/ciav7p1/cms/page_3375220.html
 

https://securelist.com/analysis/publications/36138/keyloggers-how-they-work-and-how-to-detect-them-part-1/

https://securelist.com/analysis/publications/36358/keyloggers-implementing-keyloggers-in-windows-part-two/

2023年2月6日 星期一

有以下开源聊天通讯APP服务端支持大规模网络连接:Matrix Rocket.Chat Signal Jitsi XMPP Alternative

 


  1. Matrix:Matrix是一个开源的通讯协议,支持各种聊天应用程序和网站。

  2. Rocket.Chat:Rocket.Chat是一个开源的Web聊天平台,支持大规模用户群。

  3. Signal:Signal是一个开源的私密通讯平台,支持大规模用户群。

  4. Jitsi:Jitsi是一个开源的视频会议平台,支持大规模用户群。

  5. XMPP:XMPP是一个开源的即时通讯协议,支持大规模用户群。

以下是提高Python AI代码效率的一些技巧:

 

  1. 向量化:使用NumPy库或其他类似的工具尽可能地向量化计算,以减少for循环等额外的控制结构的使用。

  2. 使用多核处理:使用多核处理来并行处理任务,如使用多个线程或分布式计算。

  3. 使用预先训练的模型:使用预先训练的模型可以大大减少训练时间,并且还可以获得更高的精度。

  4. 选择合适的框架:选择支持高效运算的框架,如TensorFlow,PyTorch和Caffe。

  5. 使用GPU加速:使用GPU可以加速大量的矩阵运算和深度学习任务。

  6. 使用Cython或Numba:使用Cython或Numba等工具将Python代码转换为C代码,以获得更高的性能。

  7. 使用高效数据结构:选择高效的数据结构,如NumPy数组,以最大限度地减少内存占用和提高效率。

总之,提高Python AI代码效率需要多方面的考虑和调整,包括代码实现,使用的库和框架,硬件环境等

 

 判断远处的人是否被子弹击中可以使用如下方法:

  1. 图像处理:使用图像处理算法对视频帧进行处理,以检测火花和其他异常现象。

  2. 物体检测:使用物体检测算法,如YOLO,SSD等,识别图像中的人。

  3. 运动分析:通过分析多帧图像中人的运动,判断是否存在突然的动态变化,例如猛然倒下。

  4. 声音分析:使用声音分析算法,如快速傅里叶变换(FFT),识别枪声。

  5. 数据融合:通过数据融合的方式,将多种信息结合起来,以确定是否发生了子弹击中的情况。

这是一个复杂的问题,需要综合多种信息和技术来解决。通常需要使用机器学习和深度学习等技术,以确定准确的模型。此外,在实际使用中,还需要考虑到数据隐私和安全问题等。

 

2023年1月31日 星期二

texteditors.org madedit

 

 

 

 

 

 https://sourceforge.net/software/text-editors/

 https://en.wikipedia.org/wiki/Comparison_of_text_editors

 https://texteditors.org/cgi-bin/wiki.pl?MicrosoftWindowsEditors

 https://texteditors.org/cgi-bin/wiki.pl?HexEditorFamily

 https://alternativeto.net/software/mad-edit/

 https://www.gnome-look.org/browse?cat=240

 https://wxmedit.github.io/

 https://en.wikipedia.org/wiki/Comparison_of_text_editors

 https://zh.wikipedia.org/zh-hk/%E6%96%87%E4%BB%B6%E7%BC%96%E8%BE%91%E5%99%A8%E6%AF%94%E8%BE%83

 https://texteditors.org/cgi-bin/wiki.pl

 https://texteditors.org/cgi-bin/wiki.pl?MED

 http://www.utopia-planitia.de/indexus.html

 https://texteditors.org/cgi-bin/wiki.pl?MadEdit

https://www.freshports.org/editors/madedit/

2023年1月29日 星期日

microcontrollers Keil C51 MCS 51 instruction set Compiler User Guide list microcontrollers base on 8051 series similar family MCS 51 instruction set

 http://ee.cleversoul.com/8051-compilers.html

https://www.keil.com/dd/chips/megawin/8051.htm 

https://docs.platformio.org/en/latest/platforms/intel_mcs51.html

2023年1月21日 星期六

cropping area image Image Processing dsp hdmi Video Beginner Series 17 - Create a Video Crop IP using HLS (part 1) processor

 https://support.xilinx.com/s/article/907390?language=en_US

https://www.researchgate.net/figure/Block-diagram-of-image-pre-processing-Image-Cropping-is-an-important-action-to-reach-high_fig1_336472561 

https://soniconlab.com/image-cropping/

https://www.researchgate.net/figure/The-steps-of-the-Image-Cropping-Method-pipeline_fig6_256802429 

[PDF] Reliable and Efficient Image Cropping: A Grid Anchor Based Approach

cropping area image  Image Processing processor hdmi fpga dsp

https://www.digikey.tw/zh/articles/mcus-team-with-fpgas-to-boost-embedded-designs-performance