Skip to content

Instantly share code, notes, and snippets.

@m-rousse
m-rousse / main.js
Created February 9, 2018 11:01
Proof of bug chrome 65
const CDP = require('chrome-remote-interface');
async function wait(duration) {
process.stdout.write('Waiting ' + duration + ' ms ')
await new Promise(resolve => setTimeout(resolve, duration))
console.log('- done!')
}
@m-rousse
m-rousse / index.html
Last active February 8, 2018 13:14
Proof of bug, chrome devtool protocol and angular
<!doctype html>
<html ng-app="testModule">
<head></head>
<body ng-controller="MainController as vm">
<button ng-click="vm.onNgClick()"></button>
<ui-view></ui-view>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.3.2/angular-ui-router.min.js"></script>
<script>
angular
@m-rousse
m-rousse / badge.php
Created June 26, 2017 19:32
Script to decode keystrokes for NDHXV BBC
<?php
include("hid-table.php");
$keys = file_get_contents("keycodes.txt");
$keys = explode("\n", $keys);
array_pop($keys);
foreach($keys as $k){
$dec = hexdec($k);
$clear = $dec ^ hexdec("4E");
@m-rousse
m-rousse / docker-ddns.py
Created May 22, 2017 20:13
Dynamically update DNS zone to give domain name to new Dockers
#!/usr/bin/python3
import docker
import pprint
import json
import signal
import sys
import dns.query
import dns.tsigkeyring
import dns.update
@m-rousse
m-rousse / filter.py
Created May 22, 2017 15:08
Script to rewrite links in e-mails, to be used with Sieve
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import email
import email.encoders
import sys
from bs4 import BeautifulSoup
import re
import requests
mail = sys.stdin.read()
@m-rousse
m-rousse / GenerateHostFile.py
Created May 22, 2017 13:41
Script to fetch blacklisted domains from public lists and generate a zone file for bind.
#!/usr/bin/python3
from urllib.request import Request, urlopen
global confFile, sinkZone
urls = [
"https://adaway.org/hosts.txt",
"https://hosts-file.net/ad_servers.txt",
"https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext"
]
@m-rousse
m-rousse / rev1.writeup.asm
Created April 20, 2016 17:11
A write up of sCTF 2016 Q1 Rev1 using radare2
[0x00400560]> aaa
[0x00400560]> iz
vaddr=0x00400744 paddr=0x00000744 ordinal=000 sz=28 len=27 section=.rodata type=a string=What is the magic password?
vaddr=0x00400763 paddr=0x00000763 ordinal=001 sz=26 len=25 section=.rodata type=a string=Correct! Your flag is: %s
[0x00400560]> pd 10 @ 0x00400744-5
| 0x0040073f 0001 add byte [rcx], al
| ;-- sym._IO_stdin_used:
| ;-- section..rodata:
| 0x00400740 0100 add dword [rax], eax ; [14] va=0x00400740 pa=0x00000740 sz=61 vsz=61 rwx=-r-- .rodata