This is a Gistified version of https://gist.github.com/hfreire/5846b7aa4ac9209699ba#gistcomment-2833377
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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 | |
* | |
*/ |
# 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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Fool'n'Lazy-Proof iOS .crash Symbolication | |
# | |
# Just run this script on a folder with your `.ipa`, the corresponding `.dSYM`, | |
# and (1+) `.crash` files. Will output symbolicated `sym-*.crash`es for you. | |
# | |
# Copyright (c) 2016 Ferran Poveda (@fbeeper) | |
# Provided under MIT License (MIT): http://choosealicense.com/licenses/mit/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put this in your configuration.yaml to get sensor data from powerfox.de | |
rest: | |
- authentication: basic | |
username: !secret ovag-user | |
password: !secret ovag-pw | |
scan_interval: 15 | |
resource: https://backend.powerfox.energy/api/2.0/my/main/current?unit=kwh | |
sensor: | |
- name: "poweropti" | |
json_attributes: |
OlderNewer