Skip to content

Instantly share code, notes, and snippets.

@moul
Created May 27, 2019 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moul/c9001e5c1bbfcc77df45aafdd62f59b3 to your computer and use it in GitHub Desktop.
Save moul/c9001e5c1bbfcc77df45aafdd62f59b3 to your computer and use it in GitHub Desktop.
otp.ipynb
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"00000000 68 65 6c 6c 6f 20 77 6f 72 6c 64 21 |hello world!|\n",
"0000000c\n"
]
}
],
"source": [
"echo -n \"hello world!\" | hexdump -C"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"00000000 40 40 40 40 40 40 40 40 40 40 40 40 |@@@@@@@@@@@@|\n",
"0000000c\n"
]
}
],
"source": [
"echo -n \"@@@@@@@@@@@@\" | hexdump -C"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"00000000 28 25 2c 2c 2f 60 37 2f 32 2c 24 61 |(%,,/`7/2,$a|\n",
"0000000c\n"
]
}
],
"source": [
"echo -n \"hello world!\" | otp \"@@@@@@@@@@@@\" | hexdump -C"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"00000000 68 65 6c 6c 6f 20 77 6f 72 6c 64 21 |hello world!|\n",
"0000000c\n"
]
}
],
"source": [
"echo -n \"hello world!\" | otp \"@@@@@@@@@@@@\" | otp \"@@@@@@@@@@@@\" | hexdump -C"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"00000000 28 25 2c 2c 2f 60 37 2f 32 2c 24 61 |(%,,/`7/2,$a|\n",
"0000000c\n"
]
}
],
"source": [
"echo -n \"@@@@@@@@@@@@\" | otp \"hello world!\" | hexdump -C"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"00000000 00 00 00 00 00 00 00 00 00 00 00 00 |............|\n",
"0000000c\n"
]
}
],
"source": [
"echo -n \"hello world!\" | otp \"hello world!\" | hexdump -C"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"00000000 68 65 6c 6c 6f 20 77 6f 72 6c 64 21 |hello world!|\n",
"0000000c\n"
]
}
],
"source": [
"printf \"\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\" | otp \"hello world!\" | hexdump -C"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Bash",
"language": "bash",
"name": "bash"
},
"language_info": {
"codemirror_mode": "shell",
"file_extension": ".sh",
"mimetype": "text/x-sh",
"name": "bash"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment