- Go to chrome://net-internals/#hsts
- Under Query HSTS/PKP domain type
localhostand click query. If it says not found this is not the solution. If it lists some things, continue. - At the bottom, under Delete domain security policies enter
localhostand click delete - Done!
| def time_alphabet(): | |
| print("Time starts when you press a. Time will be printed when you finish by pressing z. If you go wrong, it won't tell you and your time won't stop. Press 0 to quit in this case.") | |
| a1 = msvcrt.getch() | |
| if a1 == b'a': | |
| t0 = time.monotonic() | |
| u = b'' | |
| while u != b'bcdefghijklmnopqrstuvwxyz': | |
| c = msvcrt.getch() | |
| u += c | |
| if c == b'0': |
| import threading | |
| import subprocess | |
| def f(x: int) -> None: | |
| try: | |
| output = subprocess.check_output(["ping", "-n", "1", f"192.168.1.{x}"]) | |
| if b"unreachable" not in output: | |
| print(f"{x} was successful") | |
| except subprocess.CalledProcessError: |
| FROM ubuntu:20.04 | |
| RUN apt-get update && apt-get install -y imagemagick | |
| RUN sed -i -E 's/name="memory" value=".+"/name="memory" value="4GB"/g' /etc/ImageMagick-6/policy.xml && \ | |
| sed -i -E 's/name="map" value=".+"/name="map" value="4GB"/g' /etc/ImageMagick-6/policy.xml && \ | |
| sed -i -E 's/name="area" value=".+"/name="area" value="4GB"/g' /etc/ImageMagick-6/policy.xml && \ | |
| sed -i -E 's/name="disk" value=".+"/name="disk" value="8GiB"/g' /etc/ImageMagick-6/policy.xml && \ | |
| sed -i -E 's/name="width" value=".+"/name="width" value="64KP"/g' /etc/ImageMagick-6/policy.xml && \ | |
| sed -i -E 's/name="height" value=".+"/name="height" value="64KP"/g' /etc/ImageMagick-6/policy.xml |
| #!/usr/bin/env python | |
| """ | |
| This provides reproducible zipping, i.e. the zip file has doesn't change every time you recreate it unless the contents of any file within it have changed | |
| See https://unix.stackexchange.com/questions/14705/the-zip-formats-external-file-attribute since files different because of file permissions | |
| """ | |
| import os | |
| import sys | |
| from subprocess import check_output | |
| from tempfile import TemporaryDirectory | |
| import shutil |
| def mps_to_mph(mps: float) -> float: | |
| return mps * 3.6 / 1.609344 |
- Start an AWS EC2 Instance from the Ubuntu 16.04 Amazon image. t3a.micro will do. Open ports 22 and 2443. Assign an elastic IP so it can't change.
- Download the private key for the EC2 instance whilst creating it
- SSH into the server
- Update to the latest
sudo apt-get updatethensudo apt-get upgrade -y - Install PiVPN
curl -L https://install.pivpn.io | bash. Make sure to selectTCPand notUDPwhen given the option. Set the port as1194. The rest can be left as defaults. If the screen does a strange flashy thing try ssh from Cygwin instead. - Install obfsproxy
sudo apt-get install obfsproxy - Put the attached systemd file at
/lib/systemd/system/obfsproxy.service - Start the service
sudo systemctl enable obfsproxythensudo systemctl start obfsproxy - Add users with
pivpn add. Then follow the steps it gives you. - Use
scpto download the.ovpnfiles and put them on relevant devices. You'll need to modify1443to2443as the port number in these client config files.
This was copied and pasted from here.
Many years ago, it was standard practice to store passwords in plaintext in databases. This was a bad idea because, when the database was compromised, the attacker got all the passwords. To combat this, we started hashing passwords in the database using one-way cryptographic hash algorithms. MD5 became popular, but weaknesses (collisions, partial preimage, etc) discovered in it mean it's no longer recommended. A lot of people moved onto SHA1, which is more secure.
The problem with this approach is that it's possible to construct a huge table of hashes and their corresponding plaintexts. These are called rainbow tables. They work on the concept that it is more efficient to compute a huge list of hashes for all possible passwords (within a certain set) and then store it, so it can be quickly queried later on. So, instead of brute-forcing indi
| import mysql.connector | |
| from contextlib import closing | |
| import logging | |
| log = logging.getLogger(__name__) | |
| class Database: | |
| """ | |
| Contains code for interfacing with a MySql database |
- Create an EC2 instance with Ubuntu 18.04 (I used t3.nano), and ssh into it
sudo apt-get updatesudo apt-get upgrade- Install PiVPN with
curl -L https://install.pivpn.io | bash - Follow the on screen instructions. Mostly use defaults but the protocol must be TCP, and I chose
1443as my port - Install obfsproxy with
pip install obfsproxy - Create a service file
/etc/systemd/system/obfsproxy.servicewith contents
[Unit]
Description=Obfsproxy server