Follow these steps before trying to run any code.
- First, generate a Certificate Authority (CA).
openssl genrsa -out rootCA.key 2048
- Second, self-sign it.
from .structure import ( | |
ContinuousReference | |
) | |
__all__ = ["ContinuousReference"] |
import hmac | |
import hashlib | |
import base64 | |
import json | |
import datetime | |
secret_key = '52d3f853c19f8b63c0918c126422aa2d99b1aef33ec63d41dea4fadf19406e54' | |
def create_jwt(payload): | |
payload = json.dumps(payload).encode() |
Sphinx is a documentation generator that is the de facto standard for Python projects. The official documentation can be a bit daunting as it includes so many options, it's hard to know where to start.
Note: This Gist was updated on 04/04/2019 to accomodate a newer version of Sphinx, as well as Python 3.7. YMMV!
This document is written with the following presuppositions:
#!/bin/bash | |
# | |
# Created by: Westley K | |
# Date: Aug 14, 2018 | |
# | |
# run this in your terminal, and | |
# you will get nice colors and effects! | |
# | |
#listens to the above run to | |
#FLASK_APP=server.py FLASK_DEBUG=1 python3.5 -m flask run -h 192.168.1.124 -p 8999: | |
#run this on the local server to listen to socket communication | |
from flask import Flask, render_template, jsonify | |
from flask import request as query | |
app = Flask(__name__) | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>Tail </title> | |
<style> | |
body {font-family: monospace;} | |
p{ margin: 0;} | |
ul{padding: 0;} |
{ | |
"builders": [{ | |
"type": "virtualbox-iso", | |
"guest_os_type": "RedHat_64", | |
"iso_url": "[YOUR ISO PATH HERE]", | |
"iso_checksum": "[YOUR ISO CHECKSUM HERE]", | |
"iso_checksum_type": "sha256", | |
"ssh_username": "vagrant", | |
"ssh_password": "vagrant", | |
"ssh_wait_timeout": "1500s", |
#To create a classic TCP listening daemon, similar to netcat -l, use a variation of the following command. | |
socat TCP-LISTEN:8080 stdout | |
#use remotly a command shell | |
socat TCP4-LISTEN:1234,reuseaddr,fork 'SYSTEM:/bin/cat /home/infos.txt' | |
#sslify a server | |
socat OPENSSL-LISTEN:443,reuse‐addr,pf=ip4,fork,cert=server.pem,cafile=client.crt TCP4-CONNECT:localhost:80 | |