From b8101babadb2cb19aa09a41bb235a205e1ce57a7 Mon Sep 17 00:00:00 2001 From: NYAN CAT <32758426+NYAN-x-CAT@users.noreply.github.com> Date: Mon, 16 Oct 2023 17:20:41 +0300 Subject: [PATCH] Create NativeMethods.cs --- .../Server/StreamLibrary/NativeMethods.cs | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 AsyncRAT-C#/Server/StreamLibrary/NativeMethods.cs diff --git a/AsyncRAT-C#/Server/StreamLibrary/NativeMethods.cs b/AsyncRAT-C#/Server/StreamLibrary/NativeMethods.cs new file mode 100644 index 0000000..f77a55a --- /dev/null +++ b/AsyncRAT-C#/Server/StreamLibrary/NativeMethods.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; + +namespace Server.StreamLibrary +{ + public static class NativeMethods + { + [DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl)] + public static extern unsafe int memcmp(byte* ptr1, byte* ptr2, uint count); + + [DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl)] + public static extern int memcpy(IntPtr dst, IntPtr src, uint count); + + [DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl)] + public static extern unsafe int memcpy(void* dst, void* src, uint count); + } +}