Skip to content

Instantly share code, notes, and snippets.

View sysr-q's full-sized avatar
💾
Hacking the planet.

Chris sysr-q

💾
Hacking the planet.
  • Auckland, New Zealand
  • 11:46 (UTC +12:00)
View GitHub Profile
@sysr-q
sysr-q / VersionComparator.groovy
Created June 9, 2020 22:56 — forked from founddrama/VersionComparator.groovy
a version comparator (e.g., "1.0.2" < "1.0.10")
def versions = []
def f = new File('mock-version-tags.txt')
f.eachLine { versions << it }
def versionComparator = { a, b ->
def VALID_TOKENS = /._/
a = a.tokenize(VALID_TOKENS)
b = b.tokenize(VALID_TOKENS)
for (i in 0..<Math.max(a.size(), b.size())) {
@sysr-q
sysr-q / README.md
Last active August 29, 2015 14:15 — forked from mathiasbynens/README.md
+plausi | I've patented a special sorting algorithm I like to call "dicksort".
+plausi | It's like quicksort, but I use it to rank men by their penis size.
+gnustomp | I've patented a special sorting algorithm I like to call "nosort".
+gnustomp | It's like other sorting algorithms, but it doesn't actually sort anything.
+plausi | I've patented a special sorting algorithm I like to call "stackoversort"
+plausi | It just downloads and runs code from stack overflow until the array is
| sorted.
+gnustomp | I've patented a special sorting algorithm I like to call "sorted".
+gnustomp | Your array is already sorted, but you don't believe it.
+loadedice | I've stolen this sorting algorithm called bogo sort, it just shuffles
@sysr-q
sysr-q / gist:11171023
Last active August 29, 2015 14:00
Proof if some is good, more is better.
+forkbomb | plausi: perl pls
+forkbomb | ruby pls
+forkbomb | python pls
+gnustomp | go pls
+forkbomb | go build pls
+gnustomp | gcc pls
+plausi | go get pls
+gnustomp | llvm pls
+forkbomb | make pls
+plausi | apt-get pls
#!/usr/bin/python
# Connects to servers vulnerable to CVE-2014-0160 and looks for cookies, specifically user sessions.
# Michael Davis (mike.philip.davis@gmail.com)
# Based almost entirely on the quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import select
package main
import (
"fmt"
"flag"
)
func help(args []string) {
help := []string{
"YO",
@sysr-q
sysr-q / what
Created January 23, 2014 03:14
zed at deku in ~/go/src/github.com/plausibility/gitsby on master?
± go build 14:11:23
gitsby.go:7:2: cannot find package "github.com/hoisie/web" in any of:
/usr/lib/go/src/pkg/github.com/hoisie/web (from $GOROOT)
($GOPATH not set)
gitsby.go:9:2: cannot find package "github.com/plausibility/gitsby/server" in any of:
/usr/lib/go/src/pkg/github.com/plausibility/gitsby/server (from $GOROOT)
($GOPATH not set)
zed at deku in ~/go/src/github.com/plausibility/gitsby on master?
± echo $GOPATH 14:13:49
@sysr-q
sysr-q / decrypt.py
Created January 21, 2014 11:30
YOLO SWAG
text = input()
def decrypt(text):
plaintext = []
for word in text.split():
w, w1 = [], []
# Chunk letters
letters = word.split("$$$$")
for i, c in enumerate(letters):
if i%2:
if c == "$w@G":
@sysr-q
sysr-q / c1.py
Created December 30, 2013 07:06
You ever write code and just wonder where it all went wrong?
#!/usr/bin/env python3
print(
(lambda λ: (λ.translate))(input("λ "))(
((lambda Λ:
(lambda Γ:
(lambda ω, ϒ:
ω(ϒ, ϒ[2:] + ϒ[:2])) (Γ.maketrans, Λ))("Σ")
)((lambda π:
(lambda α, Ω:
getattr(α, Ω))(π, "ascii_lowercase")
Only in /home/[redacted]/snapchat-4.1.01/out/com/snapchat/android: brief.diff
diff -r /home/[redacted]/snapchat-4.1.01/out/com/snapchat/android/camera/CameraPreviewFragment$10$1.smali android/camera/CameraPreviewFragment$10$1.smali
29c29
< .line 486
---
> .line 487
43c43
< .line 488
---
> .line 489