Skip to content

Instantly share code, notes, and snippets.

View CyberFlameGO's full-sized avatar
💠
Hey, I’m Cyber/Aaron.

CyberFlame CyberFlameGO

💠
Hey, I’m Cyber/Aaron.
View GitHub Profile
@CyberFlameGO
CyberFlameGO / repl
Created December 8, 2021 07:46 — forked from melmsie/repl
const { inspect } = require('util')
const ProgrammaticREPL = require('programmatic-repl')
module.exports = {
help: 'repl',
fn: async ({ Memer, msg }) => {
const REPL = new ProgrammaticREPL({
includeNative: true,
includeBuiltinLibs: true,
stringifyResults: true,
@CyberFlameGO
CyberFlameGO / update_lwjgl.sh
Created December 14, 2021 03:41 — forked from aperson/update_lwjgl.sh
Updates the lwjgl that minecraft uses.
#!/usr/bin/env bash
echo "Determining OS..."
if [[ "$(uname -s)" == "Linux" ]]; then
mcdir="$HOME/.minecraft/"
downloader="wget --no-check-certificate -q -O"
os="linux"
natives="libjinput-linux libjinput-linux64 liblwjgl liblwjgl64 libopenal libopenal64"
elif [[ "$(uname -s)" == "Darwin" ]]; then
@CyberFlameGO
CyberFlameGO / log4j_rce_detection.md
Created December 19, 2021 05:30 — forked from Neo23x0/log4j_rce_detection.md
Log4j RCE CVE-2021-44228 Exploitation Detection

log4j RCE Exploitation Detection

You can use these commands and rules to search for exploitation attempts against log4j RCE vulnerability CVE-2021-44228

Grep / Zgrep

This command searches for exploitation attempts in uncompressed files in folder /var/log and all sub folders

sudo egrep -I -i -r '\$(\{|%7B)jndi:(ldap[s]?|rmi|dns|nis|iiop|corba|nds|http):/[^\n]+' /var/log
@CyberFlameGO
CyberFlameGO / webhook_deleter.py
Created January 6, 2022 13:18
Quick way of deleting webhooks, useful for disabling token-grabbers which rely on Discord webhooks
import requests
url = input("Put your URL here: ")
result = requests.request(method="DELETE", url=url)
try:
result.raise_for_status()
except requests.exceptions.HTTPError as err:
print("Error: " + str(err))
import pygame
from random import randint
FOOD_SIZE = 10
DISPLAY_WIDTH = 640
DISPLAY_HEIGHT = 480
BG_COLOUR = (44, 62, 80)
SNAKE_COLOUR = (236, 240, 241)
FOOD_COLOUR = (241, 196, 15)
@CyberFlameGO
CyberFlameGO / mfck.js
Created February 27, 2022 07:31 — forked from razetime/mfck.js
Moanfuck implementation in js
// moanfuck implementation in JavaScript
// Use as: interpret(<mf code>)
// or: interpret(convert(<bf code>)) if you want to try using bf code.
// logs to the console.
// borrowed from https://github.com/trekhleb/javascript-algorithms/blob/master/src/algorithms/string/levenshtein-distance/levenshteinDistance.js
function levenshteinDistance(a, b) {
// Create empty edit distance matrix for all possible modifications of
// substrings of a to substrings of b.
const distanceMatrix = Array(b.length + 1).fill(null).map(() => Array(a.length + 1).fill(null));
import java.io.*;
class shortbf {
static String repeat(String s, int n) {
StringBuilder b = new StringBuilder();
for (int i = 0; i < n; i++) b.append(s);
return b.toString();
}
// G[x][y]: BF code that transforms x to y.
@CyberFlameGO
CyberFlameGO / merge.sh
Created April 8, 2022 05:21 — forked from Kas-tle/merge.sh
Merge GeyserOptionalPack With Existing Resource Pack
: ${1?'Please specify an input resource pack in the same directory as the script (e.g. ./merge.sh MyResourcePack.zip)'}
# ensure jq is installed
if command jq --version 2>/dev/null | grep -q "1.6"; then
printf "\e[32m[+]\e[m \e[37mDependency jq satisfied\e[m\n"
echo
else
echo "Dependency jq-1.6 is not satisfied"
echo "You must install jq-1.6 before proceeding"
echo "See https://stedolan.github.io/jq/download/"
@CyberFlameGO
CyberFlameGO / random_statement_looper.js
Last active April 29, 2022 14:59
random_statement_looper.js
var every = 1000 * 3
var statements = [
"hi",
"cool"
]
var used = {}
var element
document.addEventListener("DOMContentLoaded", function () {
@CyberFlameGO
CyberFlameGO / Micro-optimizations.md
Created May 6, 2022 12:27 — forked from WalshyDev/Micro-optimizations.md
Java Micro-optimization Tests

Some micro-optimizations I tested. These were all ran on the same hardware, your timings may differ but the result should always be the same.

Checking if string has a char

Test

final String s = "This is some string because I'm crazy and need to micro-optimise ok? STOP JUDGING ME!";

TestTimer.testSnippet(1_000_000,
    () -> { boolean found = s.indexOf('-') != -1; },
    () -> { boolean found = s.contains("-"); }