This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <cstdlib> | |
#include <cstring> | |
#include <dlfcn.h> | |
#include <unistd.h> | |
extern "C" { | |
void *malloc(std::size_t size) { | |
using malloc_t = decltype(&std::malloc); | |
static malloc_t native_malloc = reinterpret_cast<malloc_t>(dlsym(RTLD_NEXT, "malloc")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstring> | |
#include <cstdint> | |
#include <cstdlib> | |
#include <fstream> | |
#include <iostream> | |
#include <sstream> | |
#include <sys/types.h> | |
#include <unistd.h> | |
template <typename T> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:focal | |
RUN apt-get update && \ | |
DEBIAN_FRONTEND=noninteractive apt-get install -y ca-certificates wget perl make gcc-10 g++-10 gdb | |
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10 && \ | |
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10 | |
# Install OpenSSL 1.1.1k | |
RUN wget https://www.openssl.org/source/openssl-1.1.1k.tar.gz && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:focal | |
RUN apt-get update && \ | |
DEBIAN_FRONTEND=noninteractive apt-get install -y ssh && \ | |
apt-get clean | |
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/g' /etc/ssh/sshd_config && \ | |
sed -i 's/#LogLevel INFO/LogLevel INFO/g' /etc/ssh/sshd_config && \ | |
service ssh restart |