The first portion of any ELF file is the ELF header. This generally provides offsets to other headers (program headers and section headers) within an ELF.
typedef struct {
unsigned char e_ident[EI_NIDENT];
uint16_t e_type;
/* | |
* Copyright (c) 1996, 1998, Oracle and/or its affiliates. All rights reserved. | |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
* | |
* This code is free software; you can redistribute it and/or modify it | |
* under the terms of the GNU General Public License version 2 only, as | |
* published by the Free Software Foundation. Oracle designates this | |
* particular file as subject to the "Classpath" exception as provided | |
* by Oracle in the LICENSE file that accompanied this code. | |
* |
#pragma once | |
// This allows windows.h to be included first, overriding this header file, but be careful | |
// not to do this everywhere as compile-times suffer. | |
#ifndef _WINDOWS_ | |
#define _WIN32_WINNT 0x0601 // _WIN32_WINNT_WIN7 |
#include <string> | |
#include<vector> | |
#include <chaiscript/chaiscript.hpp> | |
#include<windows.h> | |
unsigned int proxy_LoadLibraryA(unsigned int libName) | |
{ | |
return (unsigned int)LoadLibraryA((char*)libName); | |
} |
// generating hardware id on windows systems, c++ 54-7-2017 | |
std::string getHDDSerial() | |
{ | |
DWORD disk_serialINT; | |
GetVolumeInformationA(NULL, NULL, NULL, &disk_serialINT, NULL, NULL, NULL, NULL); | |
return std::to_string(disk_serialINT); | |
} | |
std::string getMac() | |
{ |