Skip to content

Instantly share code, notes, and snippets.

@shoeper
shoeper / split.awk
Created November 2, 2022 19:08 — forked from slawo-ch/split.awk
split mysql dump to csv's
BEGIN {
# file starts with DDL statements that go into header.sql
table = "header";
sql = 1
}
{
# -- step 1 --
# determine whether current line contains a DDL sql statement or
@shoeper
shoeper / grant_ios_permissions.sh
Created March 24, 2022 20:31 — forked from kasnder/grant_ios_permissions.sh
Accept all permissions on iOS 14.8 (except location, notification and local network permission). Location permission here: https://gist.github.com/kasnder/91a64a555e962d08cd05b52f7114b897
#!/bin/bash
# Usage:./grant_ios_permissions.sh [bundleId]
# Example: ./grant_ios_permissions.sh com.spotify.client
echo "This does not grant location, notification or local network permission. You can grant location permission with this script: https://gist.github.com/kasnder/91a64a555e962d08cd05b52f7114b897"
# Requirements:
# - iOS 14.8 device with checkra1n jailbreak
# - Installed `sqlite3` on iOS device from Cydia
#!/bin/bash
# Todo: This currently fails to replace an existing entry in the location permission database. Would be better add to the end of the clients.plist file.
# Usage:./grant_ios_location_permission.sh [bundleId]
# Example: ./grant_ios_location_permission.sh com.spotify.client
# Requirements:
# - iOS device with checkra1n jailbreak (tested on 14.8)
# - Installed `sqlite3` on iOS device from Cydia
@shoeper
shoeper / README.md
Created March 22, 2022 20:25 — forked from Nosskirneh/README.md
Logging without syslog – Tweak development

The iOS syslog was removed in iOS 13.3. Prior to that, you could still view the deprecated syslog if you compiled your tweaks using an iOS 9 or lower SDK. Apple introduced oslog in iOS 10.

  1. Clone https://github.com/theos/theos/ to $THEOS/sdks.
  2. Change $THEOS/vendor/logos/bin/lib/Logos/Generator/Base/Method.pm:73 from HBLogDebug(... or NSLog(..., depending on theos version, to log(... .
  3. Add the following to $THEOS/include/HBLog.h:
    • #define log(...) HBLogWarn(@"<NOSS>: %@", [NSString stringWithFormat:__VA_ARGS__]); on line 19, ie if you're running os_log / iOS 10+ SDK.

    • #define log(...) HBLogDebug(__VA_ARGS__); on line 41, ie when not running an iOS 10+ SDK.

  4. On your iDevice, add alias debug="oslog | awk 'f; /\)/{f=0} /:/{print; f=/\(/}'" to /etc/profile.d/profile.sh and source it afterwards. You may need to create the file if you haven't already.
@shoeper
shoeper / README.md
Last active March 21, 2022 13:08 — forked from felipemeamaral/README.md
GNUStep

Objective-C on Linux

Just run: -> doesn't work (anymore)

apt-get update && apt-get install wget vim -y && wget -O - https://gist.github.com/shoeper/8be35cf2b7c4bdf9ae423b260f43ab3d/raw/install.sh | bash -
@shoeper
shoeper / clean_pdf.sh
Created January 26, 2022 10:13 — forked from sneakers-the-rat/clean_pdf.sh
Strip PDF Metadata
# --------------------------------------------------------------------
# Recursively find pdfs from the directory given as the first argument,
# otherwise search the current directory.
# Use exiftool and qpdf (both must be installed and locatable on $PATH)
# to strip all top-level metadata from PDFs.
#
# Note - This only removes file-level metadata, not any metadata
# in embedded images, etc.
#
# Code is provided as-is, I take no responsibility for its use,
#!/bin/bash
echo -n Password:
read -s password
echo
hash="$(echo -n $password | openssl sha1)"
upperCase="$(echo $hash | tr '[a-z]' '[A-Z]')"
prefix="${upperCase:0:5}"
response=$(curl -s https://api.pwnedpasswords.com/range/$prefix)
while read -r line; do
@shoeper
shoeper / fuzzing-bgpd-afl.md
Created May 3, 2021 20:39 — forked from qlyoung/fuzzing-bgpd-afl.md
fuzzing frr bgpd with afl

You Will Need

  • A local copy of AFL with Doug Birdwell's networking patch
  • A binary dump of a BGP OPEN packet
  • Latest copy of Free Range Routing
  • Patience

Acquiring Resources

A local copy of AFL with Doug Birdwell's networking patch

@shoeper
shoeper / diceware6-openthesaurus.sh
Created November 23, 2020 19:27 — forked from buchnema/diceware6-openthesaurus.sh
Creating German diceware wordlist from Open Thesaurus for six-sided dice
#!/bin/bash
: <<'COMMENT'
This script takes the dataset from the Open Thesaurus project and
transforms it to a wordlist comparable to the original diceware list.
I thought the original list contains too much lines which just don't
make any sense and/or are hard to memorize. So my goal was to
automatically generate a list containing only memorable words, which
can then be used to add your own special characters or variations.
@shoeper
shoeper / diceware10-openthesaurus.sh
Created November 23, 2020 19:24 — forked from buchnema/diceware10-openthesaurus.sh
Creating German diceware wordlist from Open Thesaurus for ten-sided dice
#!/bin/bash
: <<'COMMENT'
This script takes the dataset from the Open Thesaurus project and
transforms it to a wordlist comparable to the original diceware list.
I thought the original list contains too much lines which just don't
make any sense and/or are hard to memorize. So my goal was to
automatically generate a list containing only memorable words, which
can then be used to add your own special characters or variations.