Skip to content

Instantly share code, notes, and snippets.

View reelsense's full-sized avatar
🇺🇸
1635 E58A 7EFB EC41 0C0F 6FCF 14C1 182B C579 36B2

Bryan Black reelsense

🇺🇸
1635 E58A 7EFB EC41 0C0F 6FCF 14C1 182B C579 36B2
View GitHub Profile
@reelsense
reelsense / brute_upnproxy.sh
Created May 29, 2018 20:27
The best way to identify if a device is vulnerable or actively being leveraged for UPnProxying is to scan the endpoint and audit your NAT table entries.
#!/bin/bash
url=$1
soap_head='<?xml version="1.0" encoding="utf-8"?><s:Envelopes:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><u:GetGenericPortMappingEntry xmlns:u="urn:upnporg:serviceId:WANIPConnection.1#GetGenericPortMappingEntry"><NewPortMappingIndex>'soap_tail='</NewPortMappingIndex></u:GetGenericPortMappingEntry></s:Body></s:Envelope>'
for i in `seq 1 1000`; do
payload=$soap_head$i$soap_tail
curl -H 'Content-Type: "text/xml;charset=UTF-8"' -H 'SOAPACTION: "urn:schemasupnp-org:service:WANIPConnection:1#GetGenericPortMappingEntry"'--data "$payload"
"$url"
echo ""
done
@reelsense
reelsense / help-unfuck-finder-error_code_-8072.md
Last active July 7, 2018 18:06
macOS 10.13.1 High Sierra - "error code -8072"

macOS 10.13.1 High Sierra "error code -8072"

I'm running macOS 10.13.1 High Sierra.

  • Q: Why can't I rename files in Finder? I receive an error code -8072. an unexpected error has occurred error code -8072
    • A: Did you run Disk Utility or Disk First Aid recently? Just reboot.
  • Q: Why do I get an error about my Home folder moving or not having access to my Home folder?
    • A: A: Did you run Disk Utility or Disk First Aid recently? Just reboot.
@reelsense
reelsense / help-unfuck-pkg.md
Last active July 7, 2018 18:06
How to remove pkg-devel and reinstall pkg to resolve conflict

How to remove pkg-devel and reinstall pkg to resolve conflict

I updated pkg on my freebsd jail 2017-05-25 and it said it needed to update to pkg-1.10.1 but pkg-devel-1.10.99.4 was installed. This completely fucked me and made pkg inoperable.

The error:

Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:11:amd64/quarterly, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
@reelsense
reelsense / help-data_processing.md
Last active January 19, 2019 21:53
Data Processing

Data Processing

Run command against each line in a file

while read in; do COMMAND "$in"; done < FILE

Run command in parallel once per line in a file

@reelsense
reelsense / help-ssh-tips.md
Last active July 17, 2019 00:08
Helpful SSH tips

Helpful SSH tips

Executing a single command:

ssh USER@HOST ls

sudo requires interactive shell, it can be enabled with -t parameter:

ssh -t USER@HOST sudo ls /root
@reelsense
reelsense / help-unfuck-virtualbox-freebsd-11-2-not-booting.md
Last active October 13, 2019 08:35
How to fix FreeBSD 11.2-RELEASE not booting because of error "Fatal trap 12: page fault while in kernel mode"

How to fix FreeBSD 11.2-RELEASE not booting because of Virtual Box driver.

I entcountered a bug with virtualbox-ose-nox11-5.2.14_1 & virtualbox-ose-kmod after upgrading to FreeBSD 11.2-RELEASE on first reboot.

The system would enter a boot loop with this crash error:

supdrvGipCreate: failed to allocate the GIP page
@reelsense
reelsense / fstab
Created November 8, 2019 00:41
mergefs fstab example
/mnt/disk*:/mnt/tank/fuse /mnt/storage fuse.mergerfs defaults,allow_other,direct_io,use_ino,hard_remove,minfreespace=250G,fsname=mergerfs 0

Cron

At 09:00 on Monday in every month.

0 9 * */1 1 /usr/sbin/service mumble-server restart

At 09:00 on Monday.

0 9 * * 1 /usr/sbin/service mumble-server restart

Bookmark Javascript

Archiving shortcuts

archive.org

javascript:void(open('https://web.archive.org/save/'+encodeURI(document.location)))