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:
# Generate ed25519 privkey | |
openssl genpkey -algorithm ed25519 -out privkey.pem | |
# export its pubkey | |
openssl pkey -in privkey.pem -pubout -out pubkey.pem | |
# Generate RSA privkey | |
openssl genrsa -des3 -out private.pem 2048 | |
# export its pubkey | |
openssl rsa -in private.pem -outform PEM -pubout -out public.pem |
# 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 |
#!/bin/bash | |
# Target path to check (passed as argument) | |
target_path="$1" | |
# Check if target path is empty | |
if [ -z "$target_path" ]; then | |
echo "Usage: $0 <target path>" | |
exit 1 | |
fi |
## Common | |
```` | |
export OPT=/opt | |
export BUILDS=/some/where/mini_linux | |
mkdir -p $BUILDS | |
```` | |
## Linux kernel |
export CXXFLAGS="-g3 -O0 -pg"
make clean -j4
./configure
make -j -C erts/emulator debug
make -j4
make -j -C erts/emulator debug
make -j4 -C debug
export ERL_TOP=`pwd`
#!/bin/bash | |
# sudo bash ftrace_task_cpu_migrate.sh | |
echo 0 > /sys/kernel/debug/tracing/tracing_on | |
sleep 1 | |
echo "tracing_off" | |
echo 0 > /sys/kernel/debug/tracing/events/enable | |
sleep 1 |
#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() */ |