First, create a GPT partition table.
- boot partition, label: EFI, flags: boot + ESP; size: 1GB, format to FAT32;
- root partition (label: root), must same size on all devices!
- swap partition.
;; | |
;; Token stealing shellcode for Windows 8.1 x64 | |
;; | |
;; Save the current context on the stack | |
push rax | |
push rbx | |
push rcx | |
;; Get the current process |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 4x mutex op, 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns | |
Send 2K bytes over 1 Gbps network 20,000 ns | |
Read 1 MB sequentially from memory 250,000 ns |
# Fuzzy Logic experiment (WIP) | |
# By the Tutorial Doctor | |
# Objects are not always in one of two states (true or false), but rather in several states at one time. | |
#(val-min)/(max-min) | |
#--------------------------------------------------------------------------- | |
#VARIABLES | |
#------------------------------------------------------------------------------ | |
cold =(1,213) |
The talk never happened, but I wrote an article on this topic: http://amitsaha.github.io/site/notes/articles/python_linux/article.html
Most of the information that a power user or a sysadmin may need to know about a running Linux system is available in the form of plain text files. Utilities such as 'cat',' head', 'less' and 'grep' are sufficient to mine information that one may need from these files. Things however can get unwieldy when the task at hand demands writing shell scripts to couple these utilities. As much as power Linux users (including yours truly) would absolutely love to master shell scripting, the learning curve is quite steep and can be cryptic. This is certainly an opportunity to explore other ubiquitous alternatives for stitching together utility scripts. Bring in Python.
''' Demo script experimenting with various features of the | |
inspect module | |
''' | |
# To be run with Python3.3 | |
from inspect_test import MyClass | |
from inspect_test import myfunc | |
from inspect_test import mygen |
#!/bin/bash | |
# compiles WMIC for linux | |
apt-get install autoconf | |
cd /usr/src | |
wget http://www.openvas.org/download/wmi/wmi-1.3.14.tar.bz2 | |
bzip2 -cd wmi-1.3.14.tar.bz2 | tar xf - | |
cd wmi-1.3.14/ |
# Setup Ubuntu | |
sudo apt update --yes | |
sudo apt upgrade --yes | |
# Get Miniconda and make it the main Python interpreter | |
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh | |
bash ~/miniconda.sh -b -p ~/miniconda | |
rm ~/miniconda.sh |
#!/bin/bash | |
#################################### | |
# Setup | |
#################################### | |
tmpfile="/vagrant/.capacitor/runonce" | |
if [ -e ${tmpfile} ]; then | |
echo "Provisioning already completed. Remove ${tmpfile} to run it again." |
#!/bin/bash | |
TEXT_RESET='\e[0m' | |
TEXT_YELLOW='\e[0;33m' | |
TEXT_RED_B='\e[1;31m' | |
sudo apt-get update | |
echo -e $TEXT_YELLOW | |
echo 'APT update finished...' | |
echo -e $TEXT_RESET |