Skip to content

Instantly share code, notes, and snippets.

View random-robbie's full-sized avatar
💭
Hacking!

Robbie random-robbie

💭
Hacking!
View GitHub Profile
/var/lib/jenkins/secrets/initialAdminPassword
/var/lib/jenkins/config.xml
/var/lib/jenkins/credentials.xml
/var/lib/jenkins/certificate.pfx
/usr/share/jenkins/ref/init.groovy.d/custom.groovy
/usr/share/jenkins/ref/plugins.txt
/var/lib/jenkins/.gradle
/var/lib/jenkins/gce_keys/google_compute_engine.pub
/var/lib/jenkins/gce_keys/google_compute_engine
/var/lib/jenkins/.ssh/google_compute_engine
#!/bin/bash
# Disable swap
sudo swapoff -a
sudo sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab
# Update system
sudo apt update && sudo apt upgrade -y
# Install dependencies
import os
import argparse
import requests
import base64
import re
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
http_proxy = ""
os.environ['HTTP_PROXY'] = http_proxy

Why is this not working

mkdir u22.10-autoinstall-ISO
cd u22.10-autoinstall-ISO
mkdir source-files
wget https://old-releases.ubuntu.com/releases/kinetic/ubuntu-22.10-live-server-amd64.iso
mkdir source-files
7z -y x ubuntu-22.10-live-server-amd64.iso -osource-files
cd source-files
@random-robbie
random-robbie / sort-ip.py
Created November 15, 2023 08:41
Take a file called ips.txt and sort them by their PTR records
import socket
def get_hosting_platform(ip):
try:
reverse_dns = socket.gethostbyaddr(ip)[0]
if "amazon" in reverse_dns:
return "amazon"
elif "google" in reverse_dns:
return "google"
elif "azure" in reverse_dns:
@random-robbie
random-robbie / sta.go
Created July 10, 2023 08:18
search for django static files from a list of urls and ensure it's json response.
package main
import (
"bufio"
"crypto/tls"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"os"
@random-robbie
random-robbie / convert.sh
Created May 25, 2023 16:12
Convert all MKV files in the current directory and make them mp4 compatible with Ipad
#!/bin/bash
# Iterate through all .mkv files in the current directory
for file in *.mkv; do
if [[ -f "$file" ]]; then
# Remove spaces and emoji characters from the file name
new_name=$(echo "$file" | sed -e 's/ /_/g' -e 's/[^[:alnum:]._\-]//g')
if [[ "$new_name" != "$file" ]]; then
mv "$file" "$new_name"
echo "Renamed file: $file -> $new_name"
@random-robbie
random-robbie / extract.py
Created April 14, 2023 12:04
Accepts file or stdin and grabs all TLD domains.
import sys
import tldextract
def extract_main_domain(url):
return tldextract.extract(url).registered_domain
if __name__ == '__main__':
if len(sys.argv) > 1:
# read from file
with open(sys.argv[1], 'r') as f:
#include <WiFi.h>
#include <WiFiClient.h>
#include <WebServer.h>
#include <RCSwitch.h>
const char* ssid = "Wifi";
const char* password = "password";
RCSwitch mySwitch = RCSwitch();
WebServer server(80); // Initialize the WebServer object on port 80
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"regexp"
"strings"