Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
:cheeeeeese:

Royce Williams roycewilliams

💭
:cheeeeeese:
View GitHub Profile
@Wolf480pl
Wolf480pl / README.md
Last active Feb 21, 2018
Tools for parsing and pretty-printing slack json logs
View README.md

slack2dsv.sh

  • converts slack .json log to tab-separated DSV format
  • requires [jq] and awk
  • takes slack .json log as first argument
  • reads users.json from parent directory (adjustable by USERFILE env var)
  • if a user in the USERFILE has a dispname attribute, it is used instead of name (useful in conjunction with slack-colorize-nicks.sh)

chat-prettify.sh

  • reads chat log in tab-separated DSV format from stdin (eg. from slack2dsv.sh), formats the timestamps and aligns the nicknames
  • requires awk
@dfirfpi
dfirfpi / wanna_sink_check.py
Last active Mar 20, 2018
Check if WannaCry SinkHole is reachable, as per its code.
View wanna_sink_check.py
from __future__ import print_function
import ctypes
DLL_KERNEL32 = ctypes.windll.kernel32
DLL_WININET = ctypes.windll.wininet
handle_inet = DLL_WININET.InternetOpenA(None, 1, None, None, None)
response = DLL_WININET.InternetOpenUrlA(
handle_inet,
@LebedevRI
LebedevRI / gpsControl.c
Created Mar 15, 2016
./gpsControl -s -d /dev/ttyAMA0 = Stationary Mode
View gpsControl.c
#include <stdio.h>
#include <string.h>
#include <termios.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
void usage( void )
{
View evidlo_magstripe.py
#/bin/env python3
## Evan Widloski - 2017-01-06
## Asynchronous magstripe reader example
## Requires root and >= python 3.5
# Much taken from: http://python-evdev.readthedocs.io/en/latest/tutorial.html#reading-events-from-multiple-devices-using-asyncio
import asyncio, evdev
# MSR100 reader vendor/product ids
@kinichiro
kinichiro / ocsptest.sh
Created Jun 25, 2016
OCSP test script
View ocsptest.sh
#!/bin/sh
#
# ocsptest.sh - test script
#
openssl_bin=/usr/local/bin/openssl
function section_message {
echo ""
echo "#---------#---------#---------#---------#---------#---------#---------#--------"
@gavinlaking
gavinlaking / stretches
Created Jul 3, 2013
Devise "stretches" benchmarked.
View stretches
require "bcrypt"
require "benchmark"
password = "My_Rea11y-B1G_S3cr3t"
salt = "2d3ec54c5fa27b9e9d8a3e7f1ed9f7f7c4b1c7e2f7da5c"
stretches = [1, 2, 3, 4, 5, 6, 7 ,8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
stretches.each do |cost|
puts "\n\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"
puts "Cost = #{cost}"
@matlink
matlink / hcstat.sh
Created Feb 16, 2018
create hcstat2 file
View hcstat.sh
hcstat2gen < inputfile 2>/dev/null | xz --compress --format=raw --stdout -9e 2>/dev/null > output.hcstat2
@mattifestation
mattifestation / CertificateSubjectToPEGrouping.ps1
Created Dec 25, 2016
Can you trust everything that's signed on your host? This might help you begin to answer that question.
View CertificateSubjectToPEGrouping.ps1
# Get-SystemDriver requires the ConfigCI module on Win10 Enterprise
# This will collect all signer information for all PEs in C:\
# This will take a while!!!
$Signers = Get-SystemDriver -ScanPath C:\ -UserPEs
# Associate the subject name of each certificate to the file/signer info
# so we can correlate the two.
$CertSubjectMapping = $Signers | % {
$Signer = $_
@chokepoint
chokepoint / clipboard.ps1
Created Aug 19, 2017
Clipboard Stealing
View clipboard.ps1
function Get-Clipboard([switch] $Lines) {
if($Lines) {
$cmd = {
Add-Type -Assembly PresentationCore
[Windows.Clipboard]::GetText() -replace "`r", '' -split "`n"
}
} else {
$cmd = {
Add-Type -Assembly PresentationCore
[Windows.Clipboard]::GetText()
@taviso
taviso / delete-twitter-dm.js
Created Nov 3, 2017
Automate deleting twitter direct messages.
View delete-twitter-dm.js
// Open direct messages window, paste this into console.
function deleteNextConversation()
{
if (!(dm = document.getElementsByClassName("DMInbox-conversationItem")[0])) {
clearInterval(tmr)
return;
}
dm.firstChild.click();
setTimeout('document.getElementsByClassName("js-actionDeleteConversation")[0].click()', 1000);