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
| <!DOCTYPE html> | |
| <html> | |
| <head lang="en"> | |
| <meta charset="UTF-8"> | |
| <title>Mask A referrer in get request without iframe</title> | |
| </head> | |
| <body> | |
| <a href="http://google.com" class="masked" >Clicking to google</a> || | |
| <a href="http://yahoo.com" class="masked-differently" id="yahooLink" target="_blank">Clicking to yahoo</a> |
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
| //Follow redirects to get to the final, good url | |
| function get_final_url($url, $timeout = 5, $count = 0) | |
| { | |
| $count++; | |
| $url = clean_url($url); | |
| $ua = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0'; | |
| $cookie = tempnam("/tmp", "CURLCOOKIE"); | |
| $curl = curl_init(); | |
| curl_setopt($curl, CURLOPT_USERAGENT, $ua); |
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
| /*! | |
| * Password hashing | |
| * | |
| * In essence, passwords are hashed with a global salt (the same for every password), which is | |
| * to remain secret, and a local salt (only specific to one password). If you don't provide | |
| * local salt to `hashPassword`, it will generate one for you. | |
| * The result is a 48-byte long buffer which includes your hashed password along with the local | |
| * salt in clear, that you can store in your DB. You may call buffer.toString('hex') in case | |
| * you want to store it as hex and waste space. | |
| * |
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
| --- CREATE SELF-SIGNED ECDSA CERTIFICATE WITH PRIVATE KEY INSIDE ---- | |
| 1. Open openssl.exe. | |
| 2. If you haven't chosen a curve, you can list them with this command: | |
| ecparam -list_curves | |
| I picked sect571r1 for this example. Use this to generate an EC private key if you don't have one already: |