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;| #include <stdio.h> | |
| #include <string.h> | |
| #include <sys/types.h> | |
| #include <sys/socket.h> | |
| #include <net/if.h> | |
| #include <net/ethernet.h> | |
| #include <netinet/in.h> | |
| #include <netinet/ip.h> | |
| #include <arpa/inet.h> | |
| #include <netpacket/packet.h> |
| # How to sign your custom RPM package with GPG key | |
| # Step: 1 | |
| # Generate gpg key pair (public key and private key) | |
| # | |
| # You will be prompted with a series of questions about encryption. | |
| # Simply select the default values presented. You will also be asked | |
| # to create a Real Name, Email Address and Comment (comment optional). | |
| # | |
| # If you get the following response: |
| #!/bin/bash | |
| REPOSYNC_SCRIPTS_LIST=$(find -name reposync.sh) | |
| for script in $REPOSYNC_SCRIPTS_LIST | |
| do | |
| cd $(dirname $script) | |
| sh $(basename $script) | |
| cd - | |
| done |
| %{ | |
| #include <stdio.h> | |
| #include "parser.h" | |
| %} | |
| %% | |
| [ \r\n\t]* { continue; /* Skip blanks. */ } | |
| [0-9]+ { sscanf(yytext, "%d", &yylval->value); | |
| return TOKEN_NUMBER; } |
| # Create a folder for our new root structure | |
| $ export centos_root='/centos_image/rootfs' | |
| $ mkdir -p $centos_root | |
| # initialize rpm database | |
| $ rpm --root $centos_root --initdb | |
| # download and install the centos-release package, it contains our repository sources | |
| $ yum reinstall --downloadonly --downloaddir . centos-release | |
| $ rpm --root $centos_root -ivh centos-release*.rpm | |
| $ rpm --root $centos_root --import $centos_root/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 | |
| # install yum without docs and install only the english language files during the process |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <sys/types.h> | |
| #include <sys/socket.h> | |
| #include <net/if.h> | |
| #include <net/ethernet.h> | |
| #include <netinet/in.h> | |
| #include <netinet/ip.h> | |
| #include <arpa/inet.h> | |
| #include <netpacket/packet.h> |
| #include <errno.h> | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <sys/ptrace.h> | |
| #include <sys/types.h> | |
| #include <unistd.h> | |
| struct elf { |