05 2020 档案
摘要:1.下载libcurl https://curl.haxx.se/download.html 2.使用vs命令行控制台,切换到 cd curl-7.70.0\winbuild 3.执行编译选项,两种方式均可。 nmake /f Makefile.vc mode=dll VC=13 MACHINE=x
阅读全文
摘要:npcap 是Nmap自带的一个数据包处理工具,Nmap底层就是使用这个包进行收发包的,该库,是可以进行二次开发的,不过使用C语言开发费劲,在进行渗透任务时,还是使用Python构建数据包高效,这东西没啥意义.
阅读全文
摘要:手动创建单进程: 下面通过一个实例来分别演示进程的创建函数. #include <windows.h> #include <stdio.h> BOOL WinExec(char *pszExePath, UINT uiCmdShow) { UINT uiRet = 0; uiRet = ::WinE
阅读全文
摘要:枚举注册表启动项: 通过添加注册表启动项,可以很方便地完成自启动,常用的启动位置有CurrentVersion,BootExecute,Active Setup. #include <stdio.h> #include <Windows.h> void Enum_Regedit(HKEY Reg_R
阅读全文
摘要:LyDebug 是一款使用C/C++语言开发实现的命令行应用层动态反汇编调试器,通过运用Windows系统下的调试API函数并配合Capstone反汇编引擎,完美实现了x86与x64程序的调试功能,该调试器目前功能包括寄存器查看修改,软硬件断点的设置删除以及遍历,单步步进步过操作,堆栈检查,内存检查等。
阅读全文
摘要:ELF文件格式,是一个开放的可执行文件和链接文件格式,其主要工作在Linux系统上,是一种用于二进制文件、可执行文件、目标代码、共享库和核心转储格式文件,ELF文件格式类似于PE格式,但比起PE结构来ELF结构显得更加的简单,Linux文件结构相比于Windows结构来说简单一些.
阅读全文
摘要:URL路径拆分: 例如我们传入 http://www.baidu.com/index.php 拆分为 www.baidu.com 和 /index.php #include <Windows.h> #include <iostream> int ParseUrl(char szUrl[], char
阅读全文
摘要:注册表,与服务常用来注册自启动程序,开机自动运行,多用于后门。 枚举注册表启动项: 遍历注册表 HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run #include <stdio.h> #include <Windows.
阅读全文
摘要:权限提升 #include <Windows.h> #include <stdio.h> BOOL SetPrivilege(LPCTSTR lpszPrivilege, BOOL bEnablePrivilege) { TOKEN_PRIVILEGES tp; HANDLE hToken; LUI
阅读全文
摘要:函数模板基本使用: #include <iostream> #include <typeinfo> using namespace std; // 逻辑非常相似,类型参数化,泛型编程,魔板变成 // 类型当参数穿进去。 template<class T> // 告诉编译器 下面如果出现T不要报错,T
阅读全文
摘要:继承的基本语法: 继承的目的就是用于提高代码的可用性,减少代码的重复内容,高效开发。 #include <iostream> using namespace std; class BasePage { private: int m_x; protected: int m_y; public: voi
阅读全文
摘要:加号运算符重载: 重载加号运算符,让 p3 = p1 + p2 改成 p3.mage = p1.mage + p2.mage 实现两个数据成员的相加。 告诉编译器,两个类中的数据成员应该怎么相加。 成员函数相加 +号运算符重载 成员函数 二元 #include <iostream> #include
阅读全文
摘要:简单定义类 #include <iostream> #include <string> using namespace std; class Student { public: int uid; char *name; int age; public: void set(int id, char *
阅读全文
摘要:标准命名空间 命名空间的使用 #define _CRT_SECURE_NO_WARNINGS #include <iostream> using namespace std; // 命名空间必须定义在全局的作用域下 // 命名空间可以嵌套命名空间 // 如果命名空间冲突,则会自动的合并为一个命名空间
阅读全文
摘要:C语言的字符串操作 strtok 实现字符串切割: 将字符串根据分隔符进行切割分片. #include <stdio.h> int main(int argc, char* argv[]) { char str[] = "hello,lyshark,welcome"; char *ptr; ptr
阅读全文
摘要:创建临时文件 #include <stdio.h> int main(int argc, char *argv[]) { FILE *temp; char c; if ((temp = tmpfile()) != NULL) { fputs("hello lyshark\n", temp); //
阅读全文
摘要:结构体的定义与使用: #include <stdio.h> #include <stdlib.h> struct Student { int num; char name[30]; char age; }; int main(int argc, char* argv[]) { struct Stud
阅读全文
摘要:指针数组: #include <stdio.h> #include <stdlib.h> #include <string.h> void PrintInt() { int x = 10,y = 20,z = 30; int *Array[] = { &x, &y, &z }; // 定义数组指针
阅读全文
摘要:(伪)冒泡排序算法: 相邻的两个元素之间,如果反序则交换数值,直到没有反序的记录为止. #include <stdio.h> void BubbleSort(int Array[], int ArraySize) { int x, y, temporary; for (x = 0; x < Arra
阅读全文
摘要:Qt程序编译后,需要去qt目录拷贝几个文件,与qt程序放在一起该程序才可以脱离开发环境而独立运行下去,在开发环境下编译好代码以后,还需要进行以下操作将其打包才可以在别的机器上正常运行。
阅读全文
摘要:由于内容较少,所以,不想把它放在我的本地博客中了,暂时保存在这里,代码有一部分来源于网络,比较经典的案例,同样收藏起来。 Stack 栈容器 Stack容器适配器中的数据是以LIFO的方式组织的,它是一种先进后出的数据结构,栈允许对元素进行新增,移除,获取栈顶,等操作,但栈不允许对内部元素进行遍历,
阅读全文