(from Understanding Nginx Server and Location Block Selection Algorithms - https://goo.gl/YyzshP)
server {
| #!/bin/bash | |
| ## | |
| ## Authenticate with Google Voice | |
| ## | |
| USAGE="`basename $0` {auth|refresh|token} ctx" | |
| CTX_DIR=$HOME/.gvauth | |
| CLIENT_ID="YOUR_CLIENTID_FROM_GOOGLE_DEVELOPER_CONSOLE" | |
| CLIENT_SECRET="YOUR_CLIENTSECRET_FROM_GOOGLE_DEVELOPER_CONSOLE" | |
| SCOPE="https://www.googleapis.com/auth/googletalk%20https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile" |
| /** Reinflates a compressed signature string: | |
| resolution = a representation of the resolution in | |
| pixels of the canvas which this signature will be drawn | |
| e.g. {x:800,y:200} | |
| */ | |
| var inflateToJsonSignature = function (deflatedSig, resolution) { | |
| var components = [], | |
| modifier = 1, | |
| compressWithResolution = /^(?:\[(\d+)x(\d+)\])?([\w\W]*)/, | |
| parsedSigString = deflatedSig.match(compressWithResolution), |
| #!/usr/bin/env bash | |
| # this can be useful when developing against a custom DNS server, or | |
| # for example, if you made a change to the DNS settings of a domain, and you | |
| # know the authoritative nameserver IP address for a domain, you could use this | |
| # to bypass the intermediate DNS cache, and apply an HTTP request using the new | |
| # DNS settings supplied by your specified (authoritative) nameserver | |
| curl --dns-servers <DNSIP,DNSIP> url.com |
(from Understanding Nginx Server and Location Block Selection Algorithms - https://goo.gl/YyzshP)
server {
Original source: https://github.com/0xced/iOS-Artwork-Extractor/wiki/Extracting-more-artwork
You can extract even more artwork if you decrypt and mount an iOS firmware (.ipsw file).
| <?php | |
| /** | |
| * Make a remote GET using DIGEST authentication. | |
| * | |
| * DIGEST authenticated requests require two GET requests: | |
| * 1. GET the www-authenticate header for nonce, realm, opaque, and other values | |
| * 2. GET the expected response body by constructing an 'Authorization' header | |
| * with nonce, realm, and other values provided by the server. | |
| * |
| import hashlib | |
| import base64 | |
| import argparse | |
| import sys | |
| from Crypto.PublicKey import RSA | |
| def calculate_onion(pem_key): | |
| key = RSA.importKey(pem_key) |
| #!/bin/bash | |
| # This script builds the iOS and Mac openSSL libraries with Bitcode enabled | |
| # Download openssl http://www.openssl.org/source/ and place the tarball next to this script | |
| # Credits: | |
| # https://github.com/st3fan/ios-openssl | |
| # https://github.com/x2on/OpenSSL-for-iPhone/blob/master/build-libssl.sh | |
| # Peter Steinberger, PSPDFKit GmbH, @steipete. | |
| # Doron Adler, GlideTalk, @Norod78 |
| <?php | |
| /** | |
| * I was having trouble with socket connections timing out reliably. Sometimes, | |
| * my timeout would be reached. Other times, the connect would fail after three | |
| * to six seconds. I finally figured out it had to do with trying to connect to | |
| * a routable, non-localhost address. It seems the socket_connect call would | |
| * not fail immediately for those connections. This function is what I finally | |
| * ended up with that reliably connects to a working server, fails quickly for | |
| * a server that has an address/port that is not reachable and will reach the |
| #!/bin/bash | |
| # | |
| # A slightly more secure variant of this script. | |
| # It should be secure against primitive attacks like: | |
| json2bash <<<'{" ":{"; rm -rf /; ":1}}' | |
| # | |
| # However processing JSON from untrustworthy sources still can confuse your script! | |
| # YOU HAVE BEEN WARNED! | |
| # Following needs bash. Use like in: |