Skip to content

Instantly share code, notes, and snippets.

Avatar

Lance R. Vick lrvick

View GitHub Profile
@lrvick
lrvick / results.py
Created Jun 22, 2011 — forked from ask/get_results.py
Get async celery results from nested subtasks as they complete
View results.py
from tasks import task1
def get_results(queries):
query_procs = task1.delay(queries).get().join()
results = []
for query_proc in query_procs:
# while the following iterate() is happening, the other query_procs are ignored.
# ideas on iterating over all of them at once?
for result in query_proc.iterate():
yield result
View diff.txt
--- iso1
+++ iso2
├── isoinfo -l -i {} -R
│ @@ -1,11 +1,11 @@
│ Directory listing of /
│ dr-xr-xr-x 3 0 0 2048 Oct 16 2020 [ 29 02] .
│ -dr-xr-xr-x 2 0 0 2048 Oct 16 2020 [ 29 02] ..
│ +dr-xr-xr-x 3 0 0 2048 Oct 16 2020 [ 29 02] ..
│ dr-xr-xr-x 3 0 0 2048 Oct 16 2020 [ 30 02] boot
View gist:83782b75801c6de6d48bac856c7888ae
--- rc11-a/airgap_x86_64.iso
+++ rc11-b/airgap_x86_64.iso
├── isoinfo -l -i {} -R
│ @@ -1,11 +1,11 @@
│ Directory listing of /
│ dr-xr-xr-x 3 0 0 2048 Oct 14 2020 [ 29 02] .
│ -dr-xr-xr-x 3 0 0 2048 Oct 14 2020 [ 29 02] ..
│ +dr-xr-xr-x 2 0 0 2048 Oct 14 2020 [ 29 02] ..
│ dr-xr-xr-x 3 0 0 2048 Oct 14 2020 [ 30 02] boot
View apv-coral-proprietary-blobs.txt
product/app/QtiTelephonyService/QtiTelephonyService.apk
product/app/datastatusnotification/datastatusnotification.apk
product/app/uceShimService/uceShimService.apk
product/etc/permissions/com.qualcomm.qcrilmsgtunnel.xml
product/etc/permissions/com.qualcomm.qti.imscmservice-V2.0-java.xml
product/etc/permissions/com.qualcomm.qti.imscmservice-V2.1-java.xml
product/etc/permissions/com.qualcomm.qti.imscmservice-V2.2-java.xml
product/etc/permissions/embms.xml
product/etc/permissions/qcrilhook.xml
product/etc/permissions/telephonyservice.xml
@lrvick
lrvick / qubes_tldr.md
Last active Jun 1, 2020
QubesOS TL;DR Setup
View qubes_tldr.md

QubesOS TL;DR Setup

Requirements

  1. UI enforcing GnuPG HSM with sig subkey installed
    • Examples: Yubikey, Ledger, Trezor
  2. Public key matching device in step #1 on flash drive
  3. TOTP/HTOP capable Personal HSM
    • Examples: Nitrokey, Librem Key
  4. PC with TPM verified coreboot-heads firmware installed
@lrvick
lrvick / aws-set-creds.sh
Last active Apr 13, 2020
Decrypt and format downloaded+gpg encrypted amazon credentials file to ramfile and export to current shell.
View aws-set-creds.sh
#!/bin/bash
set -e
# Usage: source <(aws-set-creds aws-access-keys.example.asc)
in_file=${1?}
out_file=$(mktemp -p /dev/shm/)
creds=$(gpg -d ${in_file} 2>&1)
aws_access_key_id=$(printf "$creds" | tail -n1 | cut -d ',' -f1)
aws_secret_access_key=$(printf "$creds" | tail -n1 | cut -d ',' -f2 | sed -e 's/\r//g' )
@lrvick
lrvick / role.md
Last active Mar 6, 2020
My default canned response to all recruiters. Know what you want out of your career and articulate it specifically if you want to get it either at your current employer, or a different one.
View role.md

I know exactly what I want in a long term role so I can save us some time.

For me to be willing to change jobs at this point I would expect:

  • A high level of autonomy where I am allowed to work weird hours.
  • Have my obsession for auditable everything be humored/tolerated
    • I prefer to work with open platforms like RISC-V and OpenPower and open operating systems like Linux, FreeBSD, OpenBSD, Sel4, etc
    • I am never asked to rely on any software I can't audit on any of my personal or company devices.
  • No need to go find clients myself or worry about the business side of the house
  • Travel/lodging covered for the 2-3 security conferences I try to attend every year.
@lrvick
lrvick / find_duplicate_blobs.sh
Created Mar 2, 2020
Find blobs in the factory android vendor partition that duplicate blobs in AOSP by examining build errors.
View find_duplicate_blobs.sh
device="coral"
set -x
while true; do
duplicate=$( \
make DEVICE=${device} build \
| grep -A1 'FAILED:' \
| grep 'error:' \
| awk -F"', previously defined" '{print $1}' \
| awk -F"out/target/product/${device}/" '{print $2}' \
@lrvick
lrvick / physsec_shopping.md
Last active Feb 13, 2020
PhysSec Shopping List
View physsec_shopping.md

PhysSec Shopping List

Need to get into a building? Start a police car? Borrow a bulldozer? Go to a restricted elevator floor? It is pretty easy with the right tools and sometimes a bit of practice.

Knowing what those tools even are is half the battle. This guide attempts to solve that for you for for free.

Actually obtaining these tools is non-trivial but -all- of them can be obtained

@lrvick
lrvick / hashbang-todo.md
Last active Dec 18, 2019
Hashbang Todo
View hashbang-todo.md

#! Todo List

Things we want to get done for the community along with bounties for each.

Notes

A project is done when a helm chart is submitted to the infra repo, and is in a state where it can be deployed and upgraded/downgraded seamlessly with well defined health checks.