This file contains 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 | |
add_action( 'add_meta_boxes', 'add_getpaid_item_invoices_meta_box', 50 ); | |
function add_getpaid_item_invoices_meta_box() { | |
add_meta_box( 'wpinv_item_invoices', __( 'Item Purchases', 'invoicing' ), 'show_getpaid_item_purchases', 'wpi_item', 'normal' ); | |
} | |
function show_getpaid_item_purchases( $post ) { | |
// get this post and all children | |
$posts = get_children( array( |
This file contains 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 | |
function subscription_user_role_dbg_log( $data ) { | |
// error_log( print_r( $data, true ) ); | |
} | |
function edit_member_role( $method, $subscription ) { | |
$roles = array( | |
// <name of item> => <slug of wordpress user role> | |
"Class Membership" => "class_member", | |
"Centre Membership" => "centre_member", |
This file contains 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 python3 | |
import json | |
from urllib.parse import quote, quote_plus | |
import sys | |
import os | |
import argparse | |
parser = argparse.ArgumentParser( |
This file contains 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
# Tested with GNU awk v4.2.1 and above | |
# Copyright 2021 aayla-secura | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CO |
This file contains 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 python3 | |
# NO LONGER MAINTAINED, CURRENT CODE NOW LIVES HERE | |
# https://github.com/aurainfosec/time_http_response | |
# | |
# Measure the average delay between sending an HTTP request and receiving the response. | |
# Use for time-based attacks or just to check the server load. | |
# | |
# Features | |
# - GET with URL parameters and no body | |
# - POST with application/x-www-form-urlencoded body and no URL parameters |
This file contains 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
# EXAMPLE USAGE | |
# import json | |
# | |
# mdorder = MagicDict() | |
# mdorder.configure( | |
# defaults={'^price$': 0, '_address$': 'No such street, PO 000'}) | |
# create a default order | |
# mdorder['price'] | |
# mdorder['shipping_address'] | |
# mdorder['billing_address'] |
This file contains 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 python2 | |
############################################################# | |
# @AaylaSecura1138, github.com/aayla-secura | |
# Modify and distribute as you wish | |
############################################################# | |
# NO LONGER MAINTAINED: CURRENT CODE LIVES HERE: | |
# https://github.com/aurainfosec/jwt_resign_asym_to_sym | |
############################################################# | |
# Some JWT libraries are vulnerable to a known attack which changes | |
# the type of a JWT from an asymmetric (e.g. RS256) to a symmetric |
This file contains 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 python3 | |
import logging | |
import math | |
import string | |
import sys | |
import argparse | |
from collections.abc import Mapping, MutableMapping | |
from collections import Counter | |
import re |
This file contains 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 | |
# Uses only bash built-ins allowed in restricted mode | |
# Also includes a few functions that require some external commands, see | |
# FUNCTIONS THAT REQUIRE SOME EXTERNAL COMMANDS at the end | |
# TODO check for # of arguments; or an argument parser | |
function _echoarray { | |
# print array elements one per line | |
local IFS=$'\n' | |
echo "$*" |
NewerOlder