Skip to content

Instantly share code, notes, and snippets.

View ChrisPritchard's full-sized avatar
🍻
...

Christopher Pritchard ChrisPritchard

🍻
...
View GitHub Profile
import requests
import string
url = "http://localhost:8080/login.php"
headers = {"Host": "localhost:8080", "Authorization": "Basic YWRtaW46WTN0aVN0YXJDdXIhb3VzcGFzc3dvcmQ9YWRtaW4="}
cookies = {}
possible_chars = list(string.ascii_letters) + list(string.digits) + ["\\"+c for c in string.punctuation+string.whitespace ]
def get_usernames(prefix):
usernames = []
@ChrisPritchard
ChrisPritchard / Cargo.toml
Last active November 9, 2023 19:54
Capture Returns solver
[package]
name = "capture-returns"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
base64 = "0.21.5"
eval = "0.4.3"
@ChrisPritchard
ChrisPritchard / caller.html
Created May 26, 2022 20:56
Simple JS Page that retrieves latest commits from all Azure DevOps repos in a project, with optional filters
<html>
<head>
<title>Latest Commits</title>
<style>
label {
display:block;
}
</style>
</head>
<body>

Putting Linux on an Asus VivoBook

My device: Asus VivoBook Series X206HA-FD0077T Notebook

  • Use rufus on windows to write a linux iso to a usb drive (A)unite
  • ESC will get into the boot menu / grub. if the latter, open system settings to get into bios/uefi
  • save & exit allows you to override the boot order and boot from USB
@ChrisPritchard
ChrisPritchard / pomodoro.go
Created March 11, 2022 07:48
pretty simple command line go pomodoro implementation
package main
import (
"bufio"
"fmt"
"os"
"strings"
"time"
)
@ChrisPritchard
ChrisPritchard / mf.c
Last active April 27, 2022 18:52
chattr alternative
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <linux/fs.h>
int main(int argc, char **argv)
{
FILE *fp;
@ChrisPritchard
ChrisPritchard / copier.cs
Created February 15, 2022 19:43
A simple filewatcher used to preserve any files created and then renamed in a directory. Used for some save file shenanigans with Pillars of Eternity
var watcher = new FileSystemWatcher(".") { EnableRaisingEvents = true };
watcher.Renamed += (_, e) =>
{
if(Path.GetExtension(e.Name) != ".savegame")
{
Console.WriteLine($"Ignoring {Path.GetExtension(e.Name)} file");
return;
}
try
@ChrisPritchard
ChrisPritchard / imap-clean.go
Created September 10, 2021 20:11
small go script to ask a imap server to delete all its emails - part of the first module for the OSWE course
package main
import (
"bufio"
"fmt"
"log"
"net"
"regexp"
"strconv"
"strings"