- 博客(1)
- 资源 (4)
- 收藏
- 关注
原创 vue3 中使用 element-ui 时出现的 Property ‘$notify‘ does not exist on type ‘App‘.
欢迎使用Markdown编辑器 上手研究了下 vue + typescript 开发 发现使用 element-ui之后 element库里的一些对vue的扩展方法无法使用 比如调用 this.$notify 方法显示通知会报以下错误 百度找了半天 找到几种方案 强转 any (<any>this).$notify as (this as any).$notify 在类中增加声明 private $notify: any; 这几种办法异曲同工,但是我用的是typ
2020-11-08 13:42:08 3605 3
C# 优雅的 APIHOOK 支持X86+X64源码
using System;
using System.Runtime.InteropServices;
namespace NativeHook.Test
{
public delegate Int32 MessageBoxW(IntPtr hWnd, [MarshalAs(UnmanagedType.LPWStr)] string lpText,
[MarshalAs(UnmanagedType.LPWStr)] string lpCaption, UInt32 uType);
public class MessageBoxHook : NtAPIHook
{
[DllHook("user32", EntryPoint = "MessageBoxW")]
public Int32 MessageBox(IntPtr owner, string text, string caption, UInt32 options)
{
//拦截信息
Console.Title = caption;
Console.WriteLine(text);
//调用源函数
return Origin.Invoke(owner, text, caption, options);
}
}
}
[STAThread]
static void Main(string[] args)
{
using (var hook = new MessageBoxHook())
{
//绕过Hook直接调用源函数
hook.Origin(IntPtr.Zero, "111", "222", 0);
//调用Api 被Hook
MessageBox.Show("Hello world", "666", MessageBoxButtons.YesNoCancel);
}
//Hook解除拦截不到
MessageBox.Show("Hello world", "666", MessageBoxButtons.YesNoCancel);
}
2018-09-21
C# 从内存加载动态链接库
纯C# 实现的 从内存加载动态链接库,支持加壳的DLL,使用方便
class Program
{
public delegate Int32 CompressHandle(ref Byte dest,ref Int32 len, Byte [] source,Int32 sourcelen);
static void Main(string[] args)
{
Byte[] source = new byte[10000];
Byte[] dest = new byte[10000];
Int32 len = source.Length;
Byte[] dllBin = File.ReadAllBytes("zlib1.dll");
using (var dll = new DllLoader())
{
if (dll.LoadLibrary(dllBin))
{
var Compress = dll.GetProcDelegate("compress");
if (Compress != null)
{
var result = Compress.Invoke(ref dest[0], ref len, source, len);
Console.WriteLine(result);
}
}
}
}
}
2018-09-08
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人