Skip to content

Instantly share code, notes, and snippets.

View xkef's full-sized avatar
:bowtie:
Working from home

xkef

:bowtie:
Working from home
  • Zürich
View GitHub Profile
@xkef
xkef / art.md
Last active May 8, 2020 12:30
ios jailbreak: detection and bypass

From /TheSwiftyCoder/JailBreak-Detection:

static func isJailbroken() -> Bool {
		
		guard let cydiaUrlScheme = NSURL(string: "cydia://package/com.example.package") else { return false }
		if UIApplication.shared.canOpenURL(cydiaUrlScheme as URL) {
			return true
		}
		

codesign

sign unsigned package yourself (carefully debug first with ghidra, virustotal etc ;)

sudo codesign –force –deep –sign – /Applications/Foobar.app

example studio one crack

this is postinstall script from .pkg package

@xkef
xkef / index.html
Created February 22, 2020 18:58
monte-carlo for π
<!DOCTYPE html>
<html>
<head>
<script src="https://d3js.org/d3.v3.min.js"></script>
<title>monte carlo</title>
</head>
<body>
<script>
var width = 800;
var height = 800;
@xkef
xkef / colab_ssh.py
Last active March 15, 2020 20:23 — forked from yashkumaratri/Google Colab SSH
SSH into google colab
#CODE
#Generate root password
import random, string
password = ''.join(random.choice(string.ascii_letters + string.digits) for i in range(20))
#Download ngrok
! wget -q -c -nc https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
! unzip -qq -n ngrok-stable-linux-amd64.zip
#Setup sshd
@xkef
xkef / sh
Created January 15, 2020 15:07
url shorteners
#!/bin/sh
# say we have a service shrtnr.io,
# this bcrypt implementation (10 salting rounds)
# gives a unique hash for the short url
# -> shrtnr.io/abcd (abcd - postfix must be choosen with constraints by user)
$ htpasswd -nbBC 10 abcd 'www.google.com'
# out: abcd:$2y$10$SkjTJYoRgELA7E1dZe11KOB4cT0DsYxbqZGIBJTwZSHbbx.TPnAZq
@xkef
xkef / html
Created January 15, 2020 14:41
xkcd
<html>
<script>
var x = document.createElement("IMG");
fetch("https://xkcd.now.sh/?comic=2254")
.then(res => res.json())
.then(({ img }) => {
x.setAttribute("src", img);
document.body.appendChild(x);
})
.catch(e => console.log(e));
@xkef
xkef / compress_encrypt_upload.sh
Last active December 13, 2019 02:15
upload utility script
#!/bin/sh
# 1. 'tar' saves many files together into a single tape or
# disk archive.
#
# 2. 'xz' is a general-purpose data compression tool,
# we use high compression rate and verbose output.
#
# 3. 'openssl is a cryptography toolkit, we use strong, symmetric
# aes256 encryption.
@xkef
xkef / shell.txt
Last active May 16, 2019 04:03
zsh vim ...
https://www.youtube.com/watch?v=gU5nFonVEh0
## 16/05/19
❯ lsof -i -n -P | grep node 0.17s [master] ~/code/curl
node 764 xkef 15u IPv4 0x2069afb6333f5135 0t0 TCP 127.0.0.1:49395 (LISTEN)
node 764 xkef 19u IPv4 0x2069afb6333f47b5 0t0 TCP 127.0.0.1:49396 (LISTEN)
❯ mtr 8.8.8.8.
@xkef
xkef / image.svg
Last active April 20, 2019 20:42
regex.md
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@xkef
xkef / README.md
Created April 11, 2019 09:13 — forked from magnetikonline/README.md
Setting Nginx FastCGI response buffer sizes.