Skip to content

Instantly share code, notes, and snippets.

View rafa-br34's full-sized avatar
🔴
Procrastinating...

rafa_br34 rafa-br34

🔴
Procrastinating...
View GitHub Profile
@rafa-br34
rafa-br34 / System32.ps1
Last active April 29, 2024 01:03
Removes useless files from System32
$CurrentUser = [Security.Principal.WindowsIdentity]::GetCurrent()
if (!(New-Object Security.Principal.WindowsPrincipal($CurrentUser)).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
Write-Host "Asking for priviledges..."
Start-Process -FilePath "powershell" -ArgumentList ('-File', $MyInvocation.MyCommand.Source, $args | %{ $_ }) -Verb RunAs
exit
}
function KillProcess($Name) {
$Process = Get-Process $Name -ErrorAction SilentlyContinue
@rafa-br34
rafa-br34 / HostChecker.py
Created March 10, 2024 08:46
A simple python script to check if hosts are responding or not
import contextlib
import threading
import socket
import struct
from colorama import Fore, Back, Style
c_TargetsFile = "Targets.txt"
c_Timeout = 10
c_Threads = 200
@rafa-br34
rafa-br34 / CircuitMaker.js
Last active February 28, 2024 02:20
NodeJS save serializer for CM2
let CircuitMaker = {}
const Components = Object.freeze({
NOR: 0,
AND: 1,
OR: 2,
XOR: 3,
Button: 4,
FlipFlop: 5,
LED: 6,
@rafa-br34
rafa-br34 / Separate.py
Created January 22, 2024 07:25
Simple script to separate images acquired from Spector.js(https://github.com/BabylonJS/Spector.js/) into files.
import base64
import json
import sys
if len(sys.argv) < 3:
print("Expected 2 arguments, capture file, and output folder\n\tpython Separate.py Capture.json Frames/")
exit()
File = open(sys.argv[1], 'r')
@rafa-br34
rafa-br34 / Insecam.py
Created December 15, 2023 16:42
Insecam web scrapper with port checker built-in.
import latest_user_agents
import contextlib
import threading
import requests
import socket
import urllib
import time
from urllib3.exceptions import InsecureRequestWarning
from urllib.parse import urlparse
@rafa-br34
rafa-br34 / ImageToMindustry.py
Last active December 15, 2023 16:43
A somewhat WIP image to Mindustry logic converter.
import pyperclip
import math
from PIL import Image, ImageOps
c_MaxColorDifference = 4 # 4, 8, 16
c_TargetResolution = 176
c_SliceOperations = 998 # 998
c_DrawsPerFlush = 70
c_MaxCubeSize = 60
@rafa-br34
rafa-br34 / RobloxStreamSniper.py
Last active October 25, 2023 12:56
A simple Roblox stream sniper that I made overnight.
#< VERSION:0.1.0, REV:10
import threading
import requests
import argparse
import json
import zlib
import gzip
import time
import os
@rafa-br34
rafa-br34 / RandomWindowsKeys.py
Created October 7, 2023 06:02
A random Windows key generator.
import threading
import random
import ctypes
import time
import sys
import os
c_Workers = 32
c_Dictionary = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
@rafa-br34
rafa-br34 / Benchmark.cpp
Last active January 9, 2024 16:51
A C++17 benchmark to test branched vs branchless performance.
// Compile with
// g++ -O3 -Ofast -m64 -lstdc++ -std=c++17 Benchmark.cpp -o Benchmark
#include <iostream>
#include <cstring>
#include <vector>
#include <thread>
#include <random>
#include <chrono>
#include <atomic>
@rafa-br34
rafa-br34 / PixiesetDownloader.js
Created September 12, 2023 02:06
Downloader for pixieset
var s = "["
for (let ImageElement of document.getElementsByTagName("img")) {
if (ImageElement.getAttribute("id")) {
let str = ImageElement.getAttribute("src")
s += `'${str.substr(2, str.length)}',`
}
}
s += "]"
c = `import shutil, requests\\ns=${s}\\ni=0\\nfor u in s:\\n\\tb = requests.get('https://'+(u.replace('-large.','-xxlarge.')), stream=True)\\n\\twith open(str(i)+'.png','wb') as f:\\n\\t\\tshutil.copyfileobj(b.raw,f)\\n\\t\\ti+=1`
console.log(`python -c "exec(\\"${c}\\")"`)