Skip to content

Instantly share code, notes, and snippets.

💭
🌞

Rory M roddux

💭
🌞
Block or report user

Report or block roddux

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@roddux
roddux / no-multicall.patch
Created Dec 17, 2019
WordPress patch to disable system.multicall
View no-multicall.patch
diff --git a/wp-includes/IXR/class-IXR-server.php b/wp-includes/IXR/class-IXR-server.php
index 9702ba2..5437ce8 100644
--- a/wp-includes/IXR/class-IXR-server.php
+++ b/wp-includes/IXR/class-IXR-server.php
@@ -92,6 +92,7 @@ EOD;
function call($methodname, $args)
{
+ unset($this->callbacks["system.multicall"]);
if (!$this->hasMethod($methodname)) {
@roddux
roddux / Concrete5 8.5.1 printf-debugging patch
Created Nov 6, 2019
beware: advanced secret techniques
View Concrete5 8.5.1 printf-debugging patch
diff -r concrete5-8.5.1/concrete/controllers/backend/file/folder.php html/concrete/controllers/backend/file/folder.php
18a19
> echo "<!-- add folder woo -->\n";
diff -r concrete5-8.5.1/concrete/src/Http/DefaultDispatcher.php html/concrete/src/Http/DefaultDispatcher.php
106a107
> echo "<!-- handleDispatch: " . $request->getRequestUri() . "-->\n";
109c110,111
< $route = $this->router->matchRoute($request)->getRoute();
---
> $route = $this->router->matchRoute($request)->getRoute();
@roddux
roddux / freezer.js
Created Apr 4, 2019
Another JS shell fuzzer, exploring some ideas from TODOs in the last
View freezer.js
var _variables = {};
var _varCount = 1;
var _functions = [];
var _funcCount = 1;
var _dvarCount = 0;
var rc = (x)=>x[Math.floor(Math.random() * x.length)];
function pick(X, recurseLevel) {
if (recurseLevel >= 5) return "'ZZ'"
@roddux
roddux / fuck^H^Hzz.js
Created Mar 27, 2019
In-process JS builtin fuzzing idea
View fuck^H^Hzz.js
// Inspiration: @5aelo, @_tsuro, @ifsecure, @bkth_
// $ ./spidermonkey/js ./fuck^H^Hzz.js
// A quick thought experiment. A simple in-process template fuzzer using eval.
// Next idea is to generate the template, too. This one was hardcoded to try and find JIT bugs. Perhaps it will, I only ran it for a few hours.
// Can code even be JIT'd if it's being run via eval, though? Idk. Baby steps.
var rc = (x)=>x[Math.floor(Math.random() * x.length)];
var _object = [
@roddux
roddux / temperatures_100.py
Created Jan 12, 2016
CodingGame / Easy / Temperatures : 100%
View temperatures_100.py
# Number of temperatures
n = int(input())
# If no temps are supplied, return 0
if n == 0:
print("0")
exit()
temps = [int(j) for j in input().split(" ")]
@roddux
roddux / skynet_theChasm_100.py
Created Jan 12, 2016
CodingGame / Easy / Skynet: The Chasm : 100%
View skynet_theChasm_100.py
road = int(input()) # the length of the road before the gap.
gap = int(input()) # the length of the gap.
platform = int(input()) # the length of the landing platform.
platpos = road+gap # platform start position
while True:
speed = int(input()) # the motorbike's speed.
coord_x = int(input()) # the position on the road of the motorbike.
jumped = True if coord_x >= platpos else False # If we're on the platform, we've jumped already
@roddux
roddux / theDescent_100.py
Created Jan 12, 2016
CodingGame / Easy / The Descent : 100%
View theDescent_100.py
while True:
# Spaceship position
space_x, space_y = [int(i) for i in input().split()]
# Remaining mountains are given to us each iteration
mountains = [int(input()) for i in range(8)]
# Simply kill the highest mountain from the list
if space_x == mountains.index(max(mountains)):
print("FIRE")
@roddux
roddux / powerOfThor_100.py
Last active Jan 12, 2016
CodingGame / Easy / Power of Thor : 100%
View powerOfThor_100.py
light_x, light_y, initial_tx, initial_ty = [int(i) for i in input().split()]
class Thor():
# Initialise with start position
def __init__(self, mx, my):
self.x = mx
self.y = my
# Check the proposed movement is within constriaints
def inBounds(self, x=0, y=0):
@roddux
roddux / HexColourGen.py
Last active Jan 10, 2016
Python hex colour generator
View HexColourGen.py
#!/usr/bin/env python3
from random import choice as rc
# We can use a lambda, seeing as all we need to do is return a variable
hexcol = lambda n=6: "#" + "".join(rc("ABCDEF") for j in range(0,n))
print(hexcol(3))
print(hexcol(6))
# However, some prefer the clarity of function definitions
def hexcol(n=6): return "#" + "".join(rc("ABCDEF") for j in range(0,n))
You can’t perform that action at this time.