This file contains hidden or 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
| ;(function() { | |
| var images = [].slice.call(document.querySelectorAll('img')) | |
| try { | |
| images.forEach(function(img) { | |
| downloadImage(img) | |
| }) | |
| } catch (e) { | |
| alert("Download failed."); | |
| console.log('Download failed.', e); | |
| } |
This file contains hidden or 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
| // Usage example... | |
| HttpsURLConnection connection = (HttpsURLConnection) new URL("https://someurl.com").openConnection(); | |
| connection.setSSLSocketFactory(buildSslSocketFactory()); | |
| private static SSLSocketFactory buildSslSocketFactory(Context context) { | |
| // Add support for self-signed (local) SSL certificates | |
| // Based on http://developer.android.com/training/articles/security-ssl.html#UnknownCa | |
| try { | |
This file contains hidden or 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
| /** | |
| * Check if a given ip is in a network | |
| * @param string $ip IP to check in IPV4 format eg. 127.0.0.1 | |
| * @param string $range IP/CIDR netmask eg. 127.0.0.0/24, also 127.0.0.1 is accepted and /32 assumed | |
| * @return boolean true if the ip is in this range / false if not. | |
| */ | |
| function ip_in_range( $ip, $range ) { | |
| if ( strpos( $range, '/' ) == false ) { | |
| $range .= '/32'; | |
| } |
This file contains hidden or 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
| RewriteEngine on | |
| RewriteCond %{HTTP_HOST} !^www\.housebuyersusa\.com | |
| RewriteRule (.*) http://www.housebuyersusa.com/$1 [R=301,L] | |
| #ErrorDocument 404 http://www.housebuyersusa.com/error/error | |
| AddType text/css .css | |
| RewriteRule !\.(css|rtf|RTF|pdf|PDF|log|xml|js|ico|gif|htc|jpg|png|htm|swf|flv|mp3|zip|rar|doc)$ index.php | |
| -------------------------------------------------------------------------------------- | |
| rewriteengine on |
This file contains hidden or 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 | |
| AUTH_ID="Replace with your auth_id" | |
| AUTH_TOKEN="Replace with your auth_token" | |
| # Use a phone number in E164 format | |
| SPOOF_CALLER_ID="Set a CLID here" | |
| YOUR_PHONE_NUMBER="Set your phone number" | |
| NUMBER_TO_CALL="Set the phone number to call" |
This file contains hidden or 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
| admin account info" filetype:log | |
| !Host=*.* intext:enc_UserPassword=* ext:pcf | |
| "# -FrontPage-" ext:pwd inurl:(service | authors | administrators | users) "# -FrontPage-" inurl:service.pwd | |
| "AutoCreate=TRUE password=*" | |
| "http://*:*@www” domainname | |
| "index of/" "ws_ftp.ini" "parent directory" | |
| "liveice configuration file" ext:cfg -site:sourceforge.net | |
| "parent directory" +proftpdpasswd | |
| Duclassified" -site:duware.com "DUware All Rights reserved" | |
| duclassmate" -site:duware.com |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000rsync (Everyone seems to like -z, but it is much slower for me)
- a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
- H: preserves hard-links
- A: preserves ACLs
Cross-site Scripting (XSS) is the most prevalent web application security flaw and occurs when user supplied data is sent to the browser without properly validating or escaping that content. XSS flaws can allow the attacker to:
- Deface web page (examples http://xssed.com, http://www.alpacahack.com/)
- Steal session cookies so attackers can impersonate victims without having to steal passwords