首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴gougoudan的代码贴全部
#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<string>
using namespace std;

//创建一个抽象类
class Worker
{
public:
    Worker()
    {
        inum++;                 //静态变量的变化值
......................
阅读全部 | 2020年6月13日 17:59
#include <iostream>
#include <cstring>
using namespace std;

class Employee
{
public:
    virtual void pay(){ }
    string name;
    float  salary;
};

......................
阅读全部 | 2020年6月12日 22:48
.text
.global _start
.type _start, @function

_start:
  pushq %rax
  pushq %rdi
  pushq %rsi
  pushq %rdx

  movq $1, %rax
  movq $1, %rdi
......................
阅读全部 | 2020年6月11日 15:22
#include<stdio.h>
#include<unistd.h>
#include<elf.h>
#include<fcntl.h>
#include<stdlib.h>
//暂定为4096,即默认被插入的代码大小 < 4096
#define pageSize 4096

Elf64_Addr program_head_vaddr;
Elf64_Xword program_head_size;
Elf64_Off entry_section_offset;
Elf64_Xword entry_section_size;
......................
阅读全部 | 2020年6月11日 15:05
0x50,  //
    0x57,  //
    0x56,  //
    0x52,  //
    0x48, 0xc7, 0xc0, 0x01, 0x00, 0x00, 0x00,
    0x48, 0xc7, 0xc6, data_arr[0], data_arr[1], data_arr[2], 0x00,
    0x48, 0xc7, 0xc7, 0x01, 0x00, 0x00, 0x00,
    0x48, 0xc7, 0xc2, 0x0b, 0x00, 0x00, 0x00,
    0xcd, 0x80,
    0x5a,
    0x5e,
    0x5f,
......................
阅读全部 | 2020年6月11日 14:35
section .text
  global _start

_start:
  ;; save cpu state
  push rax
  push rdi
  push rsi
  push rdx

  ;; write msg to stdout
  mov rax,1                     ; [1] - sys_write
......................
阅读全部 | 2020年6月11日 13:51
.text
.global main
.type main, @function

main:
  pushq %rax
  pushq %rbx
  pushq %rcx
  pushq %rdx

  movq $8, %rax
  movq $.L, %rbx
......................
阅读全部 | 2020年6月11日 12:30
#include <stdio.h>

int main()
{
    printf("This is the program, which will be injected.");
    return 0;
}
阅读全部 | 2020年6月11日 11:15
#include<stdio.h>
#include<unistd.h>
#include<elf.h>
#include<fcntl.h>
#include<stdlib.h>
//暂定为4096,即默认被插入的代码大小 < 4096
#define pageSize 4096

Elf64_Addr program_head_vaddr;
Elf64_Xword program_head_size;
Elf64_Off entry_section_offset;
Elf64_Xword entry_section_size;
......................
阅读全部 | 2020年6月11日 11:06
// 功能:统计输入字符串长度
// ih: 输入字符串
// 返回字符个数
unsigned int _strlen(const char* s)
{
    if (!s) return 0u;

    const char *sc = s;
    for (; *sc; ++sc);

    return unsigned int(sc - s);
}
......................
阅读全部 | 2020年6月11日 10:18
上一页 3 4 5 6 7 8 9 10 11 12 下一页
gougoudan