Skip to content

Instantly share code, notes, and snippets.

@whi-tw
whi-tw / README.MD
Last active April 14, 2024 14:54
UTM dynamic resolution fix (workaround)

Steps

  1. mkdir /opt/utm-resolution-fix/
  2. cp watch-and-fix.sh /opt/utm-resolution-fix/watch-and-fix.sh
  3. chmod +x /opt/utm-resolution-fix/watch-and-fix.sh
  4. cp utm-resolution-fix.service /etc/systemd/user/utm-resolution-fix.service
  5. systemctl --user daemon-reload
  6. systemctl --user enable --now utm-resolution-fix.service

Now, resizing the UTM window should actually resize the guest automatically.

@todbot
todbot / lilygo_t_display_rp2040_demo.py
Last active November 10, 2023 16:31
show how to use LILYGO T display RP2040 board in CircuitPython w/o explicit board support
# lilygo_t_display_rp2040_demo.py - show how to use LILYGO T display RP2040 board
# 23 Jun 2022 - @todbot / Tod Kurt
# https://github.com/Xinyuan-LilyGO/LILYGO-T-display-RP2040
# https://github.com/adafruit/circuitpython/pull/6037
# Install standard Raspberry Pi Pico UF2 firmware on the board
import time, random
import board
import busio, digitalio
import displayio
@ekager
ekager / bad_place_notify.py
Last active October 28, 2022 08:18
Searches for specified search terms and sends emails if found
"""
This script will search 4chan (need to specify a board unfortunately) and then
search all comments on Reddit for specific keywords. If found, it will then send
an email with the links to any matching posts.
Because 4chan posts are archived after ~48 hours I would recommend setting this up
to run on that cadence as well.
Sender email will need "Allow less secure apps" to ON or similar setting.
I followed these instructions for setting that up:
#!/bin/bash
set -e
CONTENTS=$(tesseract -c language_model_penalty_non_dict_word=0.8 --tessdata-dir /usr/local/share/tessdata/ "$1" stdout -l eng | xml esc)
hex=$((cat <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
@Rurik
Rurik / parse_procmon_filters.py
Last active December 5, 2021 16:55
Quick tool to find and extract filters from Procmon configuration files
# Procmon Rule Parser v0.02
# Brian Baskin - @bbaskin
# Reads default rules from an exported Procmon Configuration (.PMC) or Procmon Filter (.PMF) file
# Example output:
"""
12:09:59-bbaskin@~/Development/Noriben$ python parse_procmon_filters.py -f ProcmonConfiguration.pmc
[Exclude] Process Name is Procmon64.exe
[Exclude] Operation is QueryStandardInformationFile
[Exclude] Operation is RegOpenKey
[Exclude] Operation is NotifyChangeDirectory

Got Retweets?

Even though Twitter's statuses/retweets API endpoint is limited to the last 100 retweets it is possible to use the search/tweets endpoint to search for the retweets using the text of the tweet. Caveat: This is only possible for tweets that have happened in the last 7 days, which is furthest back Twitter allow you to search for tweets in.

For example here is how you can get the retweets for this tweet and analyze the users in a spreadsheet.

@mubix
mubix / infosec_newbie.md
Last active April 7, 2024 22:35
How to start in Infosec
@tomekr
tomekr / pocorgtfo_index.tsv
Last active April 6, 2021 08:34
An index of International Journal of Proof-of-Concept or Get The Fuck Out
Issue Title Alternate Title Author
0x00 2 iPod Antiforensics Travis Goodspeed
0x00 3 ELFs are dorky, Elves are cool Sergey Bratus, Julian Bangert
0x00 4 The Pastor Manul Laphroaig's First Epistle to Hacker Preachers of All Hats, in the sincerest hope that we might shut up about hats, and get back to hacking. Manul Laphroaig
0x00 5 Returning from ELF to Libc Rebecca "Bx" Shapiro
0x00 6 GTFO or #FAIL FX of Phenoelit
0x01 2 Four Lines of Javascript that Can’t Possibly Work So why do they? Dan Kaminsky
0x01 3 Weird Machines from Serena Butler’s TV Typewriter Travis Goodspeed
0x01 4 Making a Multi-Windows PE Ange Albertini
0x01 5 This ZIP is also a PDF Julia Wolf
@mattifestation
mattifestation / DFSPoC.ps1
Created December 2, 2015 23:59
Perform unauthenticated WMI queries on a Dell Foundation Services server
function Get-DellFoundationServicesWmiObject {
<#
.SYNOPSIS
Performs a WMI query on a Dell Foundation Services server.
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
.DESCRIPTION
@joepie91
joepie91 / vpn.md
Last active May 5, 2024 17:55
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.