Skip to content

Instantly share code, notes, and snippets.

@shoeper
shoeper / gist:fe89477f52a32da0a46af8f90033569e
Last active December 16, 2022 19:57
How "Key is already in use" weakens security
Github and Gitlab limit SSH keys to being used just once blocking secure usage of their platforms.
You may have many repositories and want to give access to a few repositories e.g. to your work computer. The simplest
solution would be to add the SSH key as deploy key with read write allowing you to use the repository with no further
configuration, but here is where "Key is already in use" comes into play which blocks this behavior. Additionally, from
a usability point of view it is also very annoying, that you don't get told where the key is already being used. So
once you entered it anywhere as a deploy key for simple access it is fully blocked and you have to manually identify
the location where it is being used.
I'd propose to warn the user clearly, especially if the key is being used by other accounts, but don't block using it.
@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 / RTX-A2000-hashcat-benchmark.txt
Created July 14, 2022 11:04
NVIDIA RTX A2000 Laptop GPU, 3312/3913 MB, 20MCU hashcat benchmark
hashcat (v6.2.5) starting in benchmark mode
Benchmarking uses hand-optimized kernel code by default.
You can use it in your cracking session by setting the -O option.
Note: Using optimized kernel code limits the maximum supported password length.
To disable the optimized kernel code in benchmark mode, use the -w option.
* Device #1: WARNING! Kernel exec timeout is not disabled.
This may cause "CL_OUT_OF_RESOURCES" or related errors.
To disable the timeout, see: https://hashcat.net/q/timeoutpatch
@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