avatar
Articles
210
Tags
95
Categories
22

Theqiqi_blog
Search

Theqiqi_blog

5.使用C语言在windows中修改内存权限
Created2024-08-04|c+windows+hacking|C•Windows•Hacking
[toc] C语言修改x86内存权限使程序可以读写全局常量的值1.在C语言中全局变量的可读不可写 读取全局常量的值,成功执行 1234567891011121314#include <stdio.h>int c_Var = 0x400000;int main(int argc, char* argv[]){ printf("%d\n", c_Var); __asm { mov dword ptr[c_Var], 634 } printf("%d\n", c_Var); return 0;} 写入全局只读变量的值,程序崩溃。 12345678910111213141516#include <windows.h>#include <stdio.h>const int c_Var = 0x400000;int main(int argc, char* argv[]){ printf("%d\n", c_Var); __asm & ...
4.使用C语言在windows分配其他程序的内存空间
Created2024-08-04|c+windows+hacking|C•Windows•Hacking
[toc] 使用C语言在windows分配其他程序的内存空间1. C语言程序中使用malloc分配内存空间123456789#include <windows.h>#include <stdio.h>int main(int argc, char* argv[]){ DWORD* lpBaseAddr = malloc(sizeof(DWORD)); return 0;} 2.Windows使用VirtualAllocEx给其他进程分配空间123456789101112131415#include <windows.h>#include <stdio.h>int main(int argc, char* argv[]){ DWORD dwProcessId = 85064; DWORD size=0xFFF; HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwProcessId); LPVOID lpAddress = Vi ...
3.使用c语言在windows中写入数据到程序中
Created2024-08-04|c+windows+hacking|C•Windows•Hacking
[toc] 使用c语言在windows中写入数据到程序中1. C语言中写数据使用赋值符号=代码演示: 12345678910111213141516171819//Messageb.c#include <stdio.h>#include <windows.h>int main(int argc, char** argv){ int i = 666; label: printf("var i vulue is %d\n", i); printf("var i address is 0x%p\n", &i); int* p = &i; printf("var i vulue is %d\n", *p); printf("var i address is 0x%p\n", p); printf("point p address is 0x%p\n", &p); ...
2.使用c语言在windows中读取程序的数据
Created2024-08-03|c+windows+hacking|C•Windows•Hacking
[toc] 使用c语言在windows中读取程序的数据1. C语言通过指针来获取地址的数据 完整代码: 123456789101112131415//Message.c#include <stdio.h>int main(int argc, char** argv){ int i = 666; printf("var i vulue is %d\n", i); printf("var i address is 0x%p\n", &i); int *p = &i; printf("var i vulue is %d\n", *p); printf("var i address is 0x%p\n", p); printf("point p address is 0x%p\n", &p); getchar(); return 0;} 为了方便测试,在 ...
1.使用c语言开发第一个windows程序
Created2024-08-02|c+windows+hacking|C•Windows•Hacking
[toc] 使用c语言开发第一个windows程序1. C语言使用标准库函数c语言中使用标准库只需在源文件中包含对应的头文件,以下是一个代码示例 1234567#include <stdio.h> int main(int argc,char** argv) { printf("print function from <stdio.h>\n"); return 0; } 2.C语言使用Windows函数调用Windows平台的相关函数需要包含相关头文件,windows.h里有一些基本的函数,以下为完整代码,功能为弹出一个消息框 12345678#include <stdio.h>#include <windows.h> int main(int argc,char** argv) { printf("print function from <stdio.h>\n"); MessageBoxA(0,"Messag ...
C语言将驱动打包到exe程序中
Created2024-06-06|C语言的万种用法|C•Windows
[toc] C语言将驱动文件打包到exe程序中1.使用WinHex将二进制文件复制在WinHex选中编辑->复制选快->c源码 2.将二进制代码粘贴到c语言源码中3.编写c语言代码写入文件源码 123456789101112131415161718192021222324252627282930//main.c#include <windows.h>#include <stdio.h>#include "DriverBuffer.h"#define DRIVER_FILE_NAME L"DEMO.sys"#define DRIVER_FILE_PATH L"D:\\Users\\3\\Desktop\\DEMO.sys"DWORD WriteDriverFile(WCHAR* DriverFilePath){ HANDLE hFile = CreateFileW(DriverFilePath, GENERIC_ALL,FILE_SHARE_READ | FILE_SHARE_ ...
win32程序中使用Dialog作为主窗口
Created2024-06-06|C语言的万种用法|C•Windows•Desktop
[toc] 1.在main函数中创建Button1234567891011121314151617181920212223242526#include <windows.h>int main(int argc, char* argv[]) { HWND hwnd = GetConsoleWindow(); //Create a Button HWND hwndButton = CreateWindowW( L"BUTTON", // Predefined class; Unicode assumed L"OK", // Button text WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, // Styles 10, // x position 10, // y position 100, ...
4.CMake设置Windows驱动程序配置
Created2024-03-04|cmake|c++•cmake•windows driver
1. CMake设置windows驱动开发配置(MSVC) 编写CMakelists.txt文件 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139cmake_minimum_required(VERSION 3.15)# 设置项目名称project(MyWindowsDriver)# 设置驱动项目类型set(CMAKE_SYSTEM_NAME Windows)set(CMAKE_SYSTEM_VERSION 10.0)# 设置 ...
3.在vscode中使用Cmake构建Qt项目
Created2024-03-04|cmake|c++•cmake•Qt6
Vscode中使用Cmake构建项目1. 在QtCreate中创建新的项目,使用Cmake构建,编译链使用MSVC,使用静态版本的Qt库,多线程编译64位 使用Cmake生成配置文件 1cmake .. -A x64 生成失败,提示 1234567Could not find a package configuration file provided by "QT" with any of the following names: Qt6Config.cmake qt6-config.cmake Qt5Config.cmake qt5-config.cmake 原因是Cmake工具找不到Qt库,修复办法有两种 第一种:将Qt库中的bin目录添加到系统变量后就能解决。 第二种:在Cmake配置中添加Qt库路径,就能修复。在CmakeLists.txt中添加一行内容。 1set(CMAKE_PREFIX_PATH "D:\\development\\Qt\\6.2.4\\MSVC2022_x64_static_624_Rele ...
2.windows下配置cmake第一个工程
Created2024-03-04|cmake|c++•cmake
windows下创建cmake项目1.windows下第一个cmake项目 安装相关软件。 下载CMake 下载zip版本“cmake-3.xx-win64-x64.zip”, 下载完成解压到指定目录并添加bin所在目录到环境变量。 在终端输入“cmake –help”或 “cmake –version”查看是否配置成功。 下载MinGW-w64 推荐下载 离线版本“x86_64-posix-seh” 将下载文件解压到指定目录并将bin目录加入到环境变量, 例如c:\mingw64\bin 将mingw64\bin目录下的“mingw32-make.exe”复制一份并改名为 “make.exe”,就可以在终端直接使用 “make”指令而不必使用“mingw32-make”指令。 在终端输入 gcc --version(或输入make --version查看版本信息),看到输出含以下信息,表示MinGW配置成功: 12345$ gcc --versiongcc.exe (MinGW-W64 x86_64-msvcrt-posix-seh, built by Brech ...
1…151617…21
avatar
Theqiqi
Articles
210
Tags
95
Categories
22
Follow Me
Announcement
This is my Blog
Recent Post
101.使用Grop网站提供的api2026-01-03
9.压测2025-03-27
8.Linux Socket并发模型http服务器2025-03-27
7.web服务器中收发REST接口2025-03-27
6使用c语言与linux系统写一个web服务器,解析并响应get与post请求2025-03-27
Categories
  • C with Socks16
  • C_Sound10
  • C_Windows_Graphi9
  • Cpp5
  • Cpp_Socket4
  • C语言在Windows中实现抓包4
  • C语言的万种用法9
  • Debian1
Tags
C++ Websocket Socks5 REST API rufus ISO cmake c_windows_driver OpenGl Debian MySql mysql Drvier x86汇编程序 System qemu Http http AI first pragram Direct2D TCP 64位汇编程序 Linux Desktop make WindowsDriver link nasm Socks html ipv6 Cmake Python windows driver Ipv6 sql UltraISO Capture Socket
Archives
  • January 20261
  • March 202558
  • February 202523
  • September 20242
  • August 202471
  • June 20242
  • March 20245
  • February 20248
Info
Article :
210
UV :
PV :
Last Update :
©2020 - 2026 By Theqiqi
Framework Hexo|Theme Butterfly
Search
Loading the Database