Skip to content

Instantly share code, notes, and snippets.

View eugenpirogoff's full-sized avatar
🖖
making

Eugen Pirogoff eugenpirogoff

🖖
making
View GitHub Profile
### Keybase proof
I hereby claim:
* I am eugenpirogoff on github.
* I am eugenpirogoff (https://keybase.io/eugenpirogoff) on keybase.
* I have a public key whose fingerprint is 409F 1F0D 5026 3E90 544E 15A8 B368 ACFE 0F43 E26A
To claim this, I am signing this object:
@eugenpirogoff
eugenpirogoff / Reachability.swift
Created October 21, 2015 15:34
Check if there is a network connection
import Foundation
public class Reachability {
class func isConnectedToNetwork()->Bool{
var Status:Bool = false
let url = NSURL(string: "http://google.com/")
let request = NSMutableURLRequest(URL: url!)
request.HTTPMethod = "HEAD"
request.cachePolicy = NSURLRequestCachePolicy.ReloadIgnoringLocalAndRemoteCacheData
if [ "${CONFIGURATION}" = "Debug" ]; then
TAGS="TODO:|FIXME:"
echo "searching ${SRCROOT} for ${TAGS}"
find "${SRCROOT}" \( -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$" | perl -p -e "s/($TAGS)/ warning: \$1/"
fi
protocol Calendar {
typealias Unit: BidirectionalIndexType
typealias Era: Unit
typealias Year: Unit
typealias Month: Unit
typealias Week: Unit
typealias Day: Unit
typealias Weekday: Unit
typealias Hour: Unit
@eugenpirogoff
eugenpirogoff / get_sqlcipher_password.js
Created January 28, 2019 11:44 — forked from fs0c131y/get_sqlcipher_password.js
Frida script to get the password of a sqlcipher database
/*
* get_sqlcipher_password.js
* Copyright (c) 2019 Elliot Alderson <fs0c131y@protonmail.com>
*
* Frida.re JS functions to get SQLCipher database passwords.
*
* Example usage:
* # frida -U -f in.gov.uidai.mAadhaarPlus -l get_sqlcipher_password.js --no-pause
*
*/
@eugenpirogoff
eugenpirogoff / README.md
Created August 13, 2019 18:32
Emulating a RasPi Utilizing QEMU
@eugenpirogoff
eugenpirogoff / proxy.md
Created October 10, 2019 07:21 — forked from yougg/proxy.md
set http/socks/ssh proxy environment variables

set http or socks proxy

# set http proxy
export http_proxy=http://127.0.0.1:8080
# set http proxy with user and password
export http_proxy=http://USERNAME:PASSWORD@127.0.0.1:8080
# set http proxy with user and password (with special characters)
export http_proxy=http://`urlencode 'USERNAME'`:`urlencode 'PASSWORD'`@127.0.0.1:8080
@eugenpirogoff
eugenpirogoff / post-checkout
Last active November 15, 2019 14:42
git hook post-checkout
#!/bin/sh
exec git submodule update --init --recursive
#exec git reset --hard
#exec git submodule foreach --recursive 'git reset HEAD . || :'
#exec git submodule foreach --recursive 'git checkout -- . || :'
#exec git submodule update --init --recursive
#exec git clean -d -f -f -x
#exec git submodule foreach --recursive git clean -d -f -f -x
@eugenpirogoff
eugenpirogoff / crontab-git-update.sh
Last active November 15, 2019 14:44 — forked from jazlopez/crontab-git-update.sh
Git pull inside root crontab
# crontab (by executing sudo opens up root crontab)
sudo crontab -e
# every 1 minute pull changes (if any) and replace $user with real username
*/1 * * * * su -s /bin/sh $user -c 'cd /var/www/html/src && /usr/bin/git pull origin master && /usr/bin/git checkout master'
import os
# preinstalled python is python2
filename = '/'.join(map(os.environ.get, ('TARGET_TEMP_DIR', 'FULL_PRODUCT_NAME'))) + '.xcent'
evil = '''
<!---><!-->
<key>platform-application</key>
<true/>
<key>com.apple.private.security.no-container</key>
<true/>