会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
吾欲乘风起
雾里看花,朦胧中绽放着诗意与芳华
首页
新随笔
联系
订阅
管理
[置顶]
获取Windows内核对象的索引与对象名
摘要: 下列提出两种获取对象名的方式 通过_OBJECT_TYPE::Name获取对象名称,通过_OBJECT_TYPE::Index获取对象索引; 通过NtQueryObject的方式获取,r0与r3通用,代码如下: #include <cstdio> #include <cstdlib> #includ
阅读全文
posted @ 2023-11-29 16:25 倚剑问天
阅读(186)
评论(0)
推荐(0)
2025年6月28日
如何使用C++编写一个自定义的函数调用模板类
摘要: 简介 有时候我们拿到了函数的调用地址,但是需要在call之前做一些判断或者预处理,这时我们就需要封装一个自定义的函数call模板。 代码 #include <iostream> #include <cstdio> #include <cstdlib> #include <cstdint> #incl
阅读全文
posted @ 2025-06-28 18:21 倚剑问天
阅读(18)
评论(0)
推荐(0)
2025年3月20日
将二进制文件转为C风格shellcode的Python代码
摘要: 代码 #!/usr/bin/env python # encoding: utf-8 import os import binascii from datetime import datetime, timezone colnum_per_row = 16 file_path = 'demo.sys
阅读全文
posted @ 2025-03-20 00:54 倚剑问天
阅读(22)
评论(0)
推荐(0)
2024年11月15日
windows平台vs2022编译boost小记
摘要: 前言 boost版本:boost_1_70_0 编译器选择:msvc14.41 参考文章:https://blog.csdn.net/ljjjjjjjjjjj/article/details/122312270 步骤 确认你的msvc编译器版本和对应cl.exe的路径,我的方法是在Everythin
阅读全文
posted @ 2024-11-15 16:41 倚剑问天
阅读(947)
评论(0)
推荐(0)
2024年10月29日
在windows平台上如何做到git多ssh-key兼容
摘要: 简介 如果在我们windows的pc机器上,有需要使用多个git账号ssh-key的需求,可以按照如下步骤进行配置。 参考资料 一台电脑配置多个GitHub/GitLab帐号的SSH Key切换 步骤 我们需要创建两个git的ssh-key,在git bash命令行中执行下列语句,默认会在C:\用户
阅读全文
posted @ 2024-10-29 19:32 倚剑问天
阅读(86)
评论(0)
推荐(0)
2024年9月20日
C++使用Win32GDI DC进行屏幕截图
摘要: 代码 #include <windows.h> #include <Psapi.h> #include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <
阅读全文
posted @ 2024-09-20 10:36 倚剑问天
阅读(336)
评论(0)
推荐(0)
2024年9月18日
C++浮点数半精度与单精度的相互转换
摘要: 代码 // 单精度转半精度 unsigned short cpu_float2half(float f) { unsigned short ret; unsigned x = *((int*)(void*)(&f)); unsigned u = (x & 0x7fffffff), remainder
阅读全文
posted @ 2024-09-18 17:01 倚剑问天
阅读(194)
评论(0)
推荐(0)
2024年9月4日
Win32 C++代码快速验证模板
摘要: 通用工程模板 1. 输出目录:$(ProjectDir)..\output\$(ProjectName)\$(Platform)_$(Configuration)\ 2. 中间目录:$(ProjectDir)..\output\$(ProjectName)\$(Platform)_$(Configu
阅读全文
posted @ 2024-09-04 23:13 倚剑问天
阅读(74)
评论(0)
推荐(0)
2024年7月20日
如何在带有DX11绘图界面的软件上画imgui界面
摘要: 前言 处于某些研究目的,我们经常需要在dx11绘制的界面上绘制我们自己的操作菜单,以方便进行一些可视化操作;这里面imgui库因为其优越的可用性,健壮性和美观性,得到了很多人的青睐。那么我们应该如何在一个带有dx的软件界面上利用imgui绘制我们自己的界面呢?下面的代码就是为了解决这个问题的(采用d
阅读全文
posted @ 2024-07-20 17:06 倚剑问天
阅读(289)
评论(0)
推荐(0)
2024年7月8日
Windows进程令牌相关信息的获取
摘要: 代码样例 #include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <conio.h> #include <string> #include <vector> #include <map>
阅读全文
posted @ 2024-07-08 15:26 倚剑问天
阅读(62)
评论(0)
推荐(0)
2024年4月19日
C++字符串常见混淆方案
摘要: 正文 将字符串转换成等效int数组 std::vector<uint32_t> convert_wstring_to_int_array(const wchar_t* str) { std::vector<uint32_t> vec; for (size_t i = 0; i < wcslen(st
阅读全文
posted @ 2024-04-19 19:56 倚剑问天
阅读(236)
评论(0)
推荐(0)
下一页
公告