Skip to content

Instantly share code, notes, and snippets.

View likuilin's full-sized avatar

kuilin likuilin

View GitHub Profile
@likuilin
likuilin / powerball.py
Created September 8, 2023 05:59
Map a single random [0, 292201338) integer onto powerball numbers
import itertools
n = # pick a random integer in range(292201338), idk hash something important and mod that or something
pb = (n % 26) + 1
n = n // 26
print(next(itertools.islice(itertools.combinations(range(1, 70), 5), n, n+1)), pb)
# n=0 yields (1, 2, 3, 4, 5) 1
@likuilin
likuilin / cloudcat.md
Created June 29, 2023 23:30
cloudflared file transfers

cloudflared file transfers

Want to transfer a file between two computers, but both are behind layers of bastion hosts?

If both can connect to the internet (Cloudflare edge servers), here is a solution that leverages free Cloudflare Tunnels.

The sender must have python3 and cloudflared installed. The receiver doesn't need anything.

Sender:

ctf challenges by kuilin

This CTFd instance has a bunch of security CTF challenges written by kuilin. All of them are hard, some exceptionally hard.

All of these are solvable with only info from CTFd, but here's the repo these are deployed from: https://github.com/likuilin/ctf-challenges

Of course, the write-ups contain solutions. The flags were updated for this deployment, though (at least, the ones where they're changeable).

Name Public Release Short Non-Spoilers Description Solved/Teams Write-ups
@likuilin
likuilin / discord-custom.css
Created July 4, 2021 09:29
Discord custom CSS
/* put your custom css here. */
/* \\192.168.0.137\Users\kuilin\AppData\Local\Discord\app-1.0.9002\modules\discord_desktop_core-2\discord_desktop_core */
.theme-light {
--background-primary:#ececec;
--background-secondary:#fcfcfc;
--background-tertiary:#dddddd;
--background-floating:#ececec;

Keybase proof

I hereby claim:

  • I am likuilin on github.
  • I am kuilin (https://keybase.io/kuilin) on keybase.
  • I have a public key whose fingerprint is 68DB 2DE8 DC1B B2EB D46D 6B06 26D7 284E 6957 332E

To claim this, I am signing this object:

// ==UserScript==
// @name MediaSpace Styles
// @author kuilin
// @match https://mediaspace.illinois.edu/captionseditor/index/edit-captions/entryid/*
// @updateURL https://gist.github.com/likuilin/a8f2cfdddf3796a5f00fe985dd8a1144/raw/kui_mediaspace_styles.user.js
// @grant none
// ==/UserScript==
(function() {
'use strict';
// ==UserScript==
// @name 391 Queue Map
// @version 0.1
// @author kuilin
// @match *://ece391test.web.illinois.edu/*
// @grant none
// @updateURL https://gist.githubusercontent.com/likuilin/f72acb4a92e51a28537c815bc2b3b11e/raw/ece391_queue_map.user.js
// ==/UserScript==
(function() {
/*
Quick n' Dirty In-Browser CTFD Importer
by Kuilin
INSTRUCTIONS:
1. Put the data into json, with form array of object {name, points, flag}. Example data below in input_data
2. Log into admin on ctfd, open JS console, get data into it, paste code into it, etc etc
3. Edit the visibility, flag case sensitivity, etc, if you want, in the code itself
4. Run ctfd_import(data) (commented out to prevent accidents)
*/
// ==UserScript==
// @name Pardus Ship2Ship Bot-Key
// @version 0.1
// @author kuilin
// @match http*://*.pardus.at/ship2ship_transfer.php*
// @grant none
// ==/UserScript==
(function() {
let loadScript = function () {
// ==UserScript==
// @name Pardus Coords Around Nav
// @version 0.2
// @author Kui
// @match http*://*.pardus.at/main.php*
// @grant none
// @updateURL https://gist.github.com/likuilin/e095903f3cbcc20a2eb1d5e98170645c/raw/coords_around_nav.user.js
// ==/UserScript==
(function() {