时时彩黑彩娱乐平台 https://xjnmi.com/ zh-CN The way to be safe is never to be secure ! Wed, 12 Sep 2018 09:15:40 +0000 Wed, 12 Sep 2018 09:15:40 +0000 匿名管道读取CMD回显信息 https://xjnmi.com/archives/Get_cmd.html https://xjnmi.com/archives/Get_cmd.html Wed, 12 Sep 2018 09:15:40 +0000 Evi1cg 最近改exp的时候用到的,加到exp里面回显执行信息,保存一份~

#include <windows.h>
#include <stdio.h>
#define EXE_NAME    NULL//TEXT("Cmd.exe")
#define EXE_CMD     TEXT("Cmd.exe /C ipconfig/all")
int main()
{

        char Buffer[4096];
        STARTUPINFO sInfo;//新进程的主窗口特性
        PROCESS_INFORMATION pInfo;
        SECURITY_ATTRIBUTES sa;
        HANDLE hRead, hWrite;
        DWORD bytesRead;    //读取代码的长度
        sa.nLength = sizeof(SECURITY_ATTRIBUTES);/ /结构体的大小,可用SIZEOF取得
        sa.lpSecurityDescriptor = NULL;//安全描述符
        sa.bInheritHandle = TRUE;;/ /安全描述的对象能否被新创建