Skip to content

Instantly share code, notes, and snippets.

View JackMc's full-sized avatar

Jack McCracken JackMc

View GitHub Profile
@JackMc
JackMc / src.rb
Last active May 28, 2023 15:12
The Great Processor: NorthSec 2023 CTF Challenge by @Becojo
require 'rexml'
require 'json'
$stdout.sync = true
class State < Struct.new(:cells, :selection)
def initialize
state = REXML::Functions.json_parse(File.read("state.json"))
@cells = state[:@cells].map do |key, value|
[REXML::Functions.json_parse(key.to_s), value]
@JackMc
JackMc / windows_dual_boot.md
Last active September 30, 2022 21:33
Steam Deck Windows Instructions

These are some rough steps for setting up Windows dual-boot on the Steam Deck. Please note that this may or may not work, since I didn't follow this exact path and did a lot of experimentation to land on these recommendations.

Things you need:

  • A decent chunk of time (1-2 hours if things go smoothly) set aside to set this up, doesn't have to be all in one go
  • Enough free space (at least 30GB) on your Steam Deck internal drive for a Windows install plus games. Note that if you just follow this first set of steps (eg. if you don't want to buy a Paragon Linux Filesystem for Windows license) you won't be able to use your SD card for Windows game storage.
  • 1-2 USB sticks (depends on if you want to burn Windows to USB beforehand or after you do the partitioning)
  • A keyboard, although you might be able to get away without it since Windows Setup has pretty good on screen keyboard support w/ the touchscreen
  • USB C to USB A adapter if your USBs or keyboard are USB A
  • Some knowledge of partitioning. There are
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
int main() {
uint32_t input_bytes[4];
uint32_t x_pos = 0, y_pos = 0;
bool values_match_rules = false;
for (x_pos = 0; x_pos < 255; x_pos++) {
@JackMc
JackMc / legend_of_scoin.c
Created May 23, 2022 22:04
Bruteforcing script for The Legend of Shiitakoin from the NSec 2022 CTF.
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
int main() {
uint32_t input_bytes[4];
uint32_t first_item, second_item, third_item, fourth_item;
bool values_match_rules = false;
for (first_item = 0; first_item < 255; first_item++) {
@JackMc
JackMc / cloud_metadata.txt
Last active May 24, 2018 22:31 — forked from BuffaloWill/cloud_metadata.txt
Cloud Metadata Dictionary useful for SSRF Testing
## AWS
# Amazon Web Services (No Header Required)
# from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories
http://169.254.169.254/latest/user-data
http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME]
http://169.254.169.254/latest/meta-data/iam/security-credentials/[ROLE NAME]
http://169.254.169.254/latest/meta-data/ami-id
http://169.254.169.254/latest/meta-data/reservation-id
http://169.254.169.254/latest/meta-data/hostname
http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key

Keybase proof

I hereby claim:

  • I am jackmc on github.
  • I am jackmc (https://keybase.io/jackmc) on keybase.
  • I have a public key whose fingerprint is 2C45 DF69 F561 C0F6 322B 6FF8 0CC6 1C99 E5CE AE91

To claim this, I am signing this object:

@JackMc
JackMc / main.py
Last active August 29, 2015 14:01
Add for the fractional part of an IEEE floating-point number from a list of bits (least to most significant)
def fractional_add(bits):
accum = 0
for i, bit in enumerate(reversed(bits)):
accum += 1/(2**(i+1))
return accum
@JackMc
JackMc / pull_all.sh
Created May 18, 2014 20:54
Updates my sources folder
bold=`tput bold`
normal=`tput sgr0`
touch .errors
for d in */
do
echo "Processing $d"
cd "$d"
if [ -d .git ]
then
@JackMc
JackMc / 2013 GTR East Schedule.htm
Created December 2, 2013 13:43
Test for BeautifulSoup'ing the FIRST robotics match schedules.
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="ProgId" content="Word.Document">
<meta name="Generator" content="Microsoft Word 14">
<meta name="Originator" content="Microsoft Word 14">
<link rel="File-List" href="http://www2.usfirst.org/2013comp/Events/ONTO/matchresults_files/filelist.xml">
<link rel="Edit-Time-Data" href="http://www2.usfirst.org/2013comp/Events/ONTO/matchresults_files/editdata.mso">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}