Remember to log all the things!
- Metasploit - spool /home//.msf3/logs/console.log
- Save contents from each terminal!
- Linux - script myoutput.txt # Type exit to stop
| package main | |
| import ( | |
| "fmt" | |
| "sort" | |
| "github.com/aws/aws-sdk-go/aws" | |
| "github.com/aws/aws-sdk-go/aws/session" | |
| "github.com/aws/aws-sdk-go/service/ec2" | |
| "github.com/aws/aws-sdk-go/service/ec2/ec2iface" |
| Notes to make IR shield (made by LinkSprite) work in Raspberry Pi 3 (bought from Amazon [1]). | |
| The vendor has some documentation [2] but that is not complete and sufficient for Raspbian Stretch. | |
| Following are the changes that I made to make it work. | |
| $ sudo apt-get update | |
| $ sudo apt-get install lirc | |
| # Add the following lines to /etc/modules file | |
| lirc_dev | |
| lirc_rpi gpio_in_pin=18 gpio_out_pin=17 |
The plan is to create a pair of executables (ngrok and ngrokd) that are connected with a self-signed SSL cert. Since the client and server executables are paired, you won't be able to use any other ngrok to connect to this ngrokd, and vice versa.
Add two DNS records: one for the base domain and one for the wildcard domain. For example, if your base domain is domain.com, you'll need a record for that and for *.domain.com.
| #include <iostream> | |
| #include <concurrent_vector.h> | |
| #include <thread> | |
| #include <algorithm> | |
| #include <cstdlib> | |
| #include <atomic> | |
| #include <vector> | |
| #include <mutex> | |
| int counter = 0; |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| [req] | |
| default_bits = 2048 | |
| default_md = sha256 | |
| string_mask = utf8only | |
| prompt = no | |
| encrypt_key = no | |
| distinguished_name = @req_dn | |
| x509_extensions = @req_ext | |
| [req_dn] |
| # using such a setup requires `apt-get install lua-nginx-redis` under Ubuntu Trusty | |
| # more info @ http://wiki.nginx.org/HttpLuaModule#access_by_lua | |
| http { | |
| lua_package_path "/etc/nginx/include.d/?.lua;;"; | |
| lua_socket_pool_size 100; | |
| lua_socket_connect_timeout 10ms; | |
| lua_socket_read_timeout 10ms; | |
| server { |
| .PHONY: clean distclean install run | |
| ENV ?= env | |
| VENV = $(shell python -c "import sys; print(int(hasattr(sys, 'real_prefix')));") | |
| ifeq ($(VENV),1) | |
| GUNICORN = gunicorn | |
| else | |
| GUNICORN = $(ENV)/bin/gunicorn | |
| endif |
| #!/bin/bash | |
| echo "Generating an SSL private key to sign your certificate..." | |
| openssl genrsa -des3 -out myssl.key 1024 | |
| echo "Generating a Certificate Signing Request..." | |
| openssl req -new -key myssl.key -out myssl.csr | |
| echo "Removing passphrase from key (for nginx)..." | |
| cp myssl.key myssl.key.org | |
| openssl rsa -in myssl.key.org -out myssl.key |