For symmetic encryption, you can use the following:
To encrypt:
openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt
To decrypt:
# references: | |
# Learning by doing: Writing your own traceroute in 8 easy steps (Ksplice Blog) | |
# https://blogs.oracle.com/ksplice/entry/learning_by_doing_writing_your | |
# Edited by: Alejandro Almira <laboral at alejandroalmira.com> | |
import datetime | |
import socket | |
import sys |
## Common | |
```` | |
export OPT=/opt | |
export BUILDS=/some/where/mini_linux | |
mkdir -p $BUILDS | |
```` | |
## Linux kernel |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <netinet/tcp.h> | |
#include <sys/socket.h> | |
#include <sys/types.h> | |
#include <netinet/in.h> |
#include <stdio.h> /* fprintf() */ | |
#include <stdlib.h> /* exit() */ | |
#include <sys/types.h> /* socket(), wait4() */ | |
#include <sys/socket.h> /* socket() */ | |
#include <netinet/in.h> /* struct sockaddr_in */ | |
#include <sys/resource.h> /* wait4() */ | |
#include <sys/wait.h> /* wait4() */ | |
#include <pthread.h> /* pthread_create */ | |
#include <netdb.h> /* getnameinfo() */ | |
#include <string.h> /* strlen() */ |
/* Compile with: g++ -Wall –Werror -o shell shell.c */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <ctype.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/wait.h> |
import urllib | |
import shutil | |
import re | |
from pathlib import Path | |
from bs4 import BeautifulSoup | |
# target page containing links to the image files | |
target_page = 'http://example.ca/image_links.php' | |
# local path |
#include <stdio.h> | |
void DumpHex(const void* data, size_t size) { | |
char ascii[17]; | |
size_t i, j; | |
ascii[16] = '\0'; | |
for (i = 0; i < size; ++i) { | |
printf("%02X ", ((unsigned char*)data)[i]); | |
if (((unsigned char*)data)[i] >= ' ' && ((unsigned char*)data)[i] <= '~') { | |
ascii[i % 16] = ((unsigned char*)data)[i]; |
Introduced in musl v1.2.1. Design goal: "Strong hardening against memory usage errors by the caller, including detection of overflows, double-free, and use-after-free, and does not admit corruption of allocator state via these errors."
// Singleton: ctx
struct malloc_context {
uint64_t secret;
#ifndef PAGESIZE
size_t pagesize;