Skip to content

Instantly share code, notes, and snippets.

View bugeyemonster's full-sized avatar
💭
I may be slow to respond.

bugeyemonster

💭
I may be slow to respond.
  • Thailand
View GitHub Profile
@bugeyemonster
bugeyemonster / md5.sh
Created March 24, 2023 08:23
create md5 hash for vm backups
for file in $(ls /vms/*.qcow2 | sort); do md5sum "$file"; done > /tmp/original.md5sums
for file in $(ls /buvms/*.qcow2 | sort); do md5sum "$file"; done > /tmp/backups.md5sums
# then dif the 2 files diff /tmp/original.md5sums /tmp/backups.md5sums
import os
import sys
import time
import math
import shlex
import syslog
import hashlib
import subprocess
@bugeyemonster
bugeyemonster / set_log.py
Created March 19, 2023 14:44
set up logging in python
import logging
import platform
import sys
def setup_logging():
# Configure the logger
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
if platform.system() == 'Linux':
try:
@bugeyemonster
bugeyemonster / xmlpost.js
Created March 19, 2023 14:40
JS Post with XML
const xhr = new XMLHttpRequest();
xhr.open('POST', 'https://example.com/api');
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status === 200) {
console.log(xhr.responseText);
}
};
const data = { name: 'John', age: 30 };
xhr.send(JSON.stringify(data));
fetch('https://example.com/data.json')
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console. Error(error));
import requests
import sys
import json
def waybackurls(host, with_subs):
if with_subs:
url = 'http://web.archive.org/cdx/search/cdx?url=*.%s/*&output=json&fl=original&collapse=urlkey' % host
else:
url = 'http://web.archive.org/cdx/search/cdx?url=%s/*&output=json&fl=original&collapse=urlkey' % host
@bugeyemonster
bugeyemonster / kerberos_attacks_cheatsheet.md
Created March 4, 2021 20:42 — forked from TarlogicSecurity/kerberos_attacks_cheatsheet.md
A cheatsheet with commands that can be used to perform kerberos attacks

Kerberos cheatsheet

Bruteforcing

With kerbrute.py:

python kerbrute.py -domain <domain_name> -users <users_file> -passwords <passwords_file> -outputfile <output_file>

With Rubeus version with brute module:

@bugeyemonster
bugeyemonster / scrape.js
Created June 3, 2020 14:13 — forked from davglass/scrape.js
Pull images from twitter based on a hashtag and save them locally.
#!/usr/bin/env node
/*
This is a total hack, just needed to grab all the photos from twitter
so that we could import them into our Flickr group..
*/
const fs = require('fs');
const config = require('./config.json');
const Twitter = require('twitter');
const parse = require('querystring').parse;
const client = new Twitter({
@bugeyemonster
bugeyemonster / main.py
Created February 26, 2018 19:09
StaidGloriousDesigner created by maxwell_69 - https://repl.it/@maxwell_69/StaidGloriousDesigner
# tag = chr(0x2)
# n > 127 = special encoding
# normal encoding
# n_octets = log(number, 2) // 8 + 1
# if n > 127
# 128 + n_octets
import math # DO NOT USE IN HOMEWORK
def number_of_octets(n):
<?php
$possible_strings = array(
'SUSESI LUXURY RESORT 3*',
'VIKING STAR 5*',
'SAILORS BEACH CLUB HV1'
);
$pattern = '#^(.*?)(\s+((\d)\*|HV1))?$#iu';
/*