Skip to content

Instantly share code, notes, and snippets.

View richinseattle's full-sized avatar

richinseattle

View GitHub Profile
/*
* check.js - Spectre Check
*
* Copyright 2018 Tencent Xuanwu Lab <xlab@tencent.com>
* Copyright 2018 Tencent, Inc. and/or its affiliates. All rights reserved.
*
* This code is the copyright of all authors, please reference reservation reproduced.
*/
var is_reset = false;
import reven
def read_symbolic(point, symbolic):
if isinstance(symbolic, reven.SymbolicRegister):
return point.cpu().read_register(symbolic.name)
elif isinstance(symbolic, reven.SymbolicPhysicalMemory):
mem = point.memory().read_physical(symbolic.address, symbolic.size)
value = 0
for byte in reversed(mem):
value <<= 8
@richinseattle
richinseattle / docker-killall.sh
Last active March 10, 2018 04:23 — forked from i-e-b/killall.sh
Kill all docker containers
sudo bash
docker stop -t 0 $(docker ps -a -q)
docker rm $(docker ps -a -q)
exit
# domato canvas generator.py replacement, put meta refresh tag at top of template.html
# author: stelios
from __future__ import print_function
import os
import re
import random
import sys
import cherrypy
import time
@richinseattle
richinseattle / txt2xp.py
Created May 9, 2018 07:16 — forked from mtvee/txt2xp.py
Convert plain text to XP format used by REXPaint
#
# translate a plain text file into the REXPaint file format
#
# NOTE: seems to come out rotated -90 for some reason
# writing order is off? idk
import struct
INFILE = 'plain_text.txt'
OUTFILE = 'fancy_text.xp'
@richinseattle
richinseattle / image2xp.py
Created May 9, 2018 07:17 — forked from mtvee/image2xp.py
convert an image to REXPaint xp or ascii, with optional resize
#
# translate an image file into the REXPaint file format
# or plain ascii
#
# requires: python 3+
# requires: pip install Pillow
#
# source: https://gist.github.com/mtvee/5629a2caa34dbf3ece95
# ---------------------------------------------------------------------------------
import os
@richinseattle
richinseattle / rocketguide.md
Created May 22, 2018 02:17 — forked from belst/rocketguide.md
Deploy Rocket using Letsencrypt and nginx

Deploy Rocket using Letsencrypt and nginx

Information

This guide uses the domain your-domain.tld and its www. prefixed version. It starts the rocket application on 127.0.0.1:1337 and as the user www-data. The proxy listens on port 80 and 443 though.
If you need other values, update them accordingly in your nginx and systemd configs.

Prerequisites

You need to have nginx, certbot and rust installed.

@richinseattle
richinseattle / tarsnack.sh
Created July 10, 2018 19:57
Backup & Encrypt tar files with OpenSSL
#!/bin/sh
#1. POSIX shell
#2. tar
#3. openssl (libressl should work)
#4. srm (to clean up afterwards)
#Tested on FreeBSD 11.1 only but should work elsewhere.
# tarsnack (the taste of tarsnap in 70 lines or less).
# using a certificate to encrypt a compressed 'tar' archive file.
@richinseattle
richinseattle / private_fork.md
Created October 10, 2018 09:09 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

guest:
apt install -y open-vm-tools
sudo vmware-toolbox-cmd disk shrink /
host:
cd <vmware path>
vmware-vdiskmanager.exe -k <vmdk>
cd C:\Program Files (x86)\VMware\VMware Workstation
vmware-vdiskmanager.exe -k "C:\TRAINING\vulndev-training-hitb\cinnamint-17.3-x64-000001.vmdk"