Skip to content

Instantly share code, notes, and snippets.

@CyberLight
CyberLight / functional-utils.js
Created March 27, 2016 15:37 — forked from bendc/functional-utils.js
A set of pure and immutable ES2015 functions aimed to make functional JavaScript more idiomatic.
// array utils
// =================================================================================================
const combine = (...arrays) => [].concat(...arrays);
const compact = arr => arr.filter(Boolean);
const contains = (() => Array.prototype.includes
? (arr, value) => arr.includes(value)
: (arr, value) => arr.some(el => el === value)
@CyberLight
CyberLight / Win10IoTCoreEoP.ps1
Last active August 8, 2016 16:19 — forked from mattifestation/Win10IoTCoreEoP.ps1
Window 10 IoT Core (Build 14393) Elevation of Privilege PoC Exploit
#region Win10IoT Audit Code
$CimSession = New-CimSession -ComputerName Win10IoT -Credential Administrator -Authentication Negotiate
Get-CimInstance -ClassName Win32_OperatingSystem -CimSession $CimSession
Get-CimInstance -ClassName Win32_Service -Filter 'Name = "InputService"' -CimSession $CimSession | Format-List *
# Run the service audit function in CimSweep
$ServicePermissions = Get-CSVulnerableServicePermission -CimSession $CimSession
$ServicePermissions | Where-Object { $_.GroupName -eq 'NT AUTHORITY\Authenticated Users' }
# The fact that Authenticated Users can change the service configuration means that
@CyberLight
CyberLight / Buffer Overflow Tutorial in Kali.md
Created August 24, 2016 16:37 — forked from apolloclark/Buffer Overflow Tutorial in Kali.md
Buffer overflow demonstration in Kali Linux, based on the Computerphile video
@CyberLight
CyberLight / set_cookiejar.go
Created March 10, 2017 14:51 — forked from HugoPresents/set_cookiejar.go
golang set cookieJar example
package main
import (
"fmt"
"io/ioutil"
"net/http"
"net/http/cookiejar"
"net/url"
"strings"
)
@CyberLight
CyberLight / cli.md
Created March 26, 2017 04:16 — forked from phrawzty/2serv.py
simple http server to dump request headers
$ curl -s -H "X-Something: yeah" localhost:8000 > /dev/null
$ python serv.py
ERROR:root:User-Agent: curl/7.37.1
Host: localhost:8000
Accept: */*
X-Something: yeah
@CyberLight
CyberLight / test-dlsym.c
Created April 3, 2017 11:01 — forked from bindle/test-dlsym.c
simple example of dlsym()
/*
* Quick example to test dlsym()
* build: gcc -W -Wall -Werror -o test-dlsym test-dlsym.c
* Usage: ./test-dlsym openldap
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dlfcn.h>
@CyberLight
CyberLight / speech2text.py
Created April 9, 2017 16:06 — forked from baali/speech2text.py
A Python script to break audio into chunks of smaller audios and using Google API to get Speech to Text.
'''
A hack based on this http://mikepultz.com/2011/03/accessing-google-speech-api-chrome-11/. While with smaller voice samples google speech to text works really good, as length increases quality decreases. So here using audiolab and numPy we are breaking audio sample, in smaller chunks, and removing blank/empty spaces from audio signal and then pushing them to google for processing.
It takes wav file format as input but can be changed to other formats too.
'''
from scikits.audiolab import wavread, play, flacwrite
from numpy import average, array, hstack
import os
import sys
@CyberLight
CyberLight / commands.sh
Created April 16, 2017 10:58 — forked from williballenthin/commands.sh
Install IDA Pro under Wine in Docker
# build wine Docker image
pushd wine; docker build -t wine .; popd
# build x11 Docker image for IDA
pushd ida; docker build -t wine/ida .; popd
# demonstrate x11 forwarding works
docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix wine/ida xclock
# interactive shell in container
@CyberLight
CyberLight / headless.md
Created April 17, 2017 09:25 — forked from addyosmani/headless.md
So, you want to run Chrome headless.

Update

If you're looking at this in 2016 and beyond, I strongly recommend investigating real headless Chrome: https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md

Windows and Mac users might find using Justin Ribeiro's Docker setup useful here while full support for these platforms is being worked out.

You can use chrome --headless on Linux as of M57 but note you'll need to build the binaries yourself for now.

The metabug for adding headless mode to Chromium is over here.

@CyberLight
CyberLight / jest-webpack-preprocessor.js
Created April 23, 2017 08:18 — forked from okonet/jest-webpack-preprocessor.js
Test webpack-shimmed and aliased modules with Jest
/* eslint-env node */
const path = require('path');
const webpack = require('webpack');
const MemoryFileSystem = require('memory-fs');
const EnhancedResolve = require('enhanced-resolve');
const transform = require('transform-jest-deps');
const babel = require('babel-jest');
const createConfig = require('../build/utils/createWebpackConfig');