Skip to content

Instantly share code, notes, and snippets.

View aeharvlee's full-sized avatar
👊
KEEP GOING

Denver aeharvlee

👊
KEEP GOING
View GitHub Profile
@aeharvlee
aeharvlee / Klaytn_Fee_Delegated_Smart_Contract_Execute.js
Last active October 2, 2019 06:56
Error: Only Legacy transactions can be signed on a Klaytn node!
/**
* run fee delegated smart contract execute.
* @param {String} fromAddress
* @param {String} fromPrivateKey
* @param {Object} delegate
* @param {Object} abiOfMethod
*/
async function feeDelegatedSmartContractExecute (
fromAddress,
fromPrivateKey,
@aeharvlee
aeharvlee / low_brute_force.php
Created December 11, 2019 23:16
Low Brute Force Source
<?php
if( isset( $_GET[ 'Login' ] ) ) {
// Get username
$user = $_GET[ 'username' ];
// Get password
$pass = $_GET[ 'password' ];
$pass = md5( $pass );
@aeharvlee
aeharvlee / medium_brute_force.php
Created December 11, 2019 23:17
Medium Brute Force Source
<?php
if( isset( $_GET[ 'Login' ] ) ) {
// Sanitise username input
$user = $_GET[ 'username' ];
$user = ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $user ) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : ""));
// Sanitise password input
$pass = $_GET[ 'password' ];
$pass = ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $pass ) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : ""));
@aeharvlee
aeharvlee / high_brute_force.php
Created December 11, 2019 23:18
High Brute Force Source
<?php
if( isset( $_GET[ 'Login' ] ) ) {
// Check Anti-CSRF token
checkToken( $_REQUEST[ 'user_token' ], $_SESSION[ 'session_token' ], 'index.php' );
// Sanitise username input
$user = $_GET[ 'username' ];
$user = stripslashes( $user );
@aeharvlee
aeharvlee / impossible_brute_force.php
Created December 11, 2019 23:18
Impossible Brute Force Source
<?php
if( isset( $_POST[ 'Login' ] ) && isset ($_POST['username']) && isset ($_POST['password']) ) {
// Check Anti-CSRF token
checkToken( $_REQUEST[ 'user_token' ], $_SESSION[ 'session_token' ], 'index.php' );
// Sanitise username input
$user = $_POST[ 'username' ];
$user = stripslashes( $user );
$user = ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $user ) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : ""));
@aeharvlee
aeharvlee / low_commnad_injection.php
Created December 12, 2019 00:06
Low Command Injection Source
<?php
if( isset( $_POST[ 'Submit' ] ) ) {
// Get input
$target = $_REQUEST[ 'ip' ];
// Determine OS and execute the ping command.
if( stristr( php_uname( 's' ), 'Windows NT' ) ) {
// Windows
$cmd = shell_exec( 'ping ' . $target );
@aeharvlee
aeharvlee / medium_command_injection.php
Created December 12, 2019 00:06
Medium Command Injection Source
<?php
if( isset( $_POST[ 'Submit' ] ) ) {
// Get input
$target = $_REQUEST[ 'ip' ];
// Set blacklist
$substitutions = array(
'&&' => '',
';' => '',
@aeharvlee
aeharvlee / high_command_injection.php
Created December 12, 2019 00:07
High Command Injection Source
<?php
if( isset( $_POST[ 'Submit' ] ) ) {
// Get input
$target = trim($_REQUEST[ 'ip' ]);
// Set blacklist
$substitutions = array(
'&' => '',
';' => '',
@aeharvlee
aeharvlee / impossible_command_injection.php
Created December 12, 2019 00:07
Impossible Command Injection Source
<?php
if( isset( $_POST[ 'Submit' ] ) ) {
// Check Anti-CSRF token
checkToken( $_REQUEST[ 'user_token' ], $_SESSION[ 'session_token' ], 'index.php' );
// Get input
$target = $_REQUEST[ 'ip' ];
$target = stripslashes( $target );
# Step1: Create test_schema
use test_schema;
# Step2: Create table
CREATE TABLE calendars(
id INT AUTO_INCREMENT,
fulldate DATE NOT NULL,
day TINYINT NOT NULL,
month TINYINT NOT NULL,
quarter TINYINT NOT NULL,