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/env sh | |
| BASEDIR="${HOME}" | |
| SECRET_FILE="${BASEDIR}/.totp_secret" | |
| if test ! -e "${SECRET_FILE}" | |
| then | |
| touch -a "${SECRET_FILE}" | |
| fi |
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/sh | |
| #!/bin/sh -e | |
| # The -e option for /bin/sh (dash) at the she-bang, | |
| # makes this process immediately exit | |
| # if some condition fails, see `man sh`. | |
| evil_eval_check=$( set | grep '^shells_.*=' | cut -f 1 -d '=' ) | |
| if test "x" != "x${evil_eval_check}" | |
| then | |
| echo 'Been injected with a posion.' |
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
| <?php | |
| /** Deze 3 regels in een algemeen stuk code ( bijv. index.php ) : ** | |
| session_start(); | |
| if ( !isset( $_SESSION[ 'bestellingen' ] ) ) | |
| $_SESSION[ 'bestellingen' ] = array(); | |
| /**/ | |
| /** Dit ook in een algemeen deel: ** | |
| $db = new MySQLi( 'localhost' , 'root' , '' , 'webwinkel' ); | |
| /**/ |
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
| <?php | |
| session_start(); | |
| if ( !isset( $_SESSION[ 'bestellingen' ] ) ) | |
| $_SESSION[ 'bestellingen' ] = array(); | |
| if ( isset( $_POST[ 'leegmaken' ) ) | |
| { | |
| $_SESSION[ 'bestellingen' ] = array(); | |
| } | |
| elseif ( isset( $_POST[ 'product_id' ] ) ) |
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
| <?php | |
| $database_connectie = new MySQLi( | |
| 'localhost' , 'root' , '' , 'webwinkel' | |
| ); | |
| $id = $database_connectie->real_escape_string( $_GET[ 'id' ] ); | |
| $sql = "SELECT * FROM `producten` WHERE product_id='$id' LIMIT 1 "; | |
| $resultaat = $database_connectie->query( $sql ); |
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
| <?php # | |
| # meer informatie over MySQLi is te vinden op http://php.net/mysqli | |
| # Verbinding maken met de database. | |
| $database_connectie = new MySQLi( | |
| # verbindingsgegevens: host, database-username, database-userpassword, database-name | |
| 'localhost' , 'root' , '' , 'webwinkel' | |
| ); | |
| # Vraag klaarzetten die aan databaseserver gesteld gaat worden | |
| $sql = "SELECT * FROM `producten` LIMIT 0, 30 "; | |
| # Vraag aan databaseserver stellen en antwoord onthouden/opslaan in variabele $resultaat |
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> | |
| <title>Naam-ding</title> | |
| <script type="text/javascript"> | |
| var naam = function () | |
| { | |
| var geefNaam = function ( e ) | |
| { | |
| var naam = document.getElementById( 'naam' ).value; |
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
| <?php | |
| /** | |
| * @file IfException.php | |
| * @author | |
| * - immeëmosol (programmer dot willfris at nl) | |
| * @date 2011-09-22 | |
| * Created: ĵaŭ 2011-09-22, 02:14.46 CEST | |
| * Last modified: ĵaŭ 2011-09-22, 05:02.52 CEST | |
| **/ |
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
| // | |
| // Regular Expression for URL validation | |
| // | |
| // Author: Diego Perini | |
| // Updated: 2010/12/05 | |
| // | |
| // the regular expression composed & commented | |
| // could be easily tweaked for RFC compliance, | |
| // it was expressly modified to fit & satisfy | |
| // these test for an URL shortener: |
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
| " some things are probably in this file twice, some don't work. | |
| " furthermore i expect the following files and directories to exist: | |
| " ~/.vim/backups | |
| " ~/.vim/swap_files | |
| " ~/.vim/skeletons ( in it files: my.phtml my.php my.class.php my.js | |
| " in the files certain character-sequences are expected, e.g. <CLASS_NAME> | |
| " too find the other sequences and or places where these paths are used the following regex can be used | |
| " (search for a regex in vim by typing a forward slash `/` in "normal mode", | |
| " after that you can type the following( wihtout the leading double quote `"` and space ` ` of course): | |
| " \~\/\.vim |