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
#!/usr/bin/env bash | |
openssl ecparam -name secp256k1 -genkey -noout | openssl ec -text -noout > Key | |
# Generate pub key | |
cat Key | grep pub -A 5 | tail -n +2 | tr -d '\n[:space:]:' | sed 's/^04//' > pub | |
# Generate priv key | |
cat Key | grep priv -A 3 | tail -n +2 | tr -d '\n[:space:]:' | sed 's/^04//' > priv |
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
box() { | |
case $1 in | |
## Turn on VM and enter an SSH terminal | |
"vm") | |
## Start the VM if it is not already running ## | |
VBoxManage startvm "Ubuntu 16.04" --type headless > /dev/null 2>&1 | |
## Get the Ip address ## | |
Ip=$(VBoxManage guestcontrol "Ubuntu 16.04" --username <user> --password <pass> run /sbin/ifconfig | grep "inet addr" | grep "Bcast" | awk -F':' '{print $2}' | awk '{print $1}') | |