Skip to content

Instantly share code, notes, and snippets.

View syncom's full-sized avatar

Ning Shang syncom

View GitHub Profile
@syncom
syncom / pis-rt-memo.md
Last active May 9, 2018 17:21
Memo: PIS-RT, Rainbow Table Search Processing in Storage

PIS-RT: Processing In Storage - Rainbow Tables

The idea described in this tech memo is to accelerate rainbow table searches inside the SSD SoC.

A "rainbow table" is a data structure containing precomputed "chains" for reversing cryptographic hash functions, usually for cracking password hashes. A good yet simple instruction of the rainbow table by Kestas can be found at http://kestas.kuliukas.com/RainbowTables/.

RainbowCrack (http://project-rainbowcrack.com/) is a project that generates rainbow tables (for various hash algorithms) and creates tools for cracking hashes using rainbow tables. As can be seen

@syncom
syncom / bash-cpu-hogger.md
Last active December 22, 2017 07:43
A CPU hogger in bash

The following bash script hogs CPU resources (and thus drains laptop battery quickly):

#!/bin/bash
# CPU hogger, using 8 threads
hog='dd if=/dev/urandom | bzip2 -9 >> /dev/null'
cmd=$(echo -n ${hog}; printf " | ${hog}%.0s" {1..7};  echo -n '& read; killall dd')
eval ${cmd}

Explaination:

@syncom
syncom / fuji-docucentre-iv_c226-password-bruteforcing
Last active April 20, 2018 18:31
HOWTO: brute force Fuji DocuCentre-IV C2260 Scan folder's password
This instruction describes how to brute force the "Scan" folder's password on a Fuji DocuCentre-IV C2260 Version
1.8 printer/xerox copier.
The DocuCentre-IV C2260 runs a web server at port 80. Because the HTTP interface is not secured, one could also
mount a man-in-the-middle (MITM) attack. However, doing a MITM attack is not what we are discussing here. The
web application at port 80 has an interface (in UI, under the Scan>Folder menu) to which mutiple users deliver
their scanned documents. These folders are password protected. It turns out getting access to such a folder can
be done through a simple HTTP POST command. And this command is not throttled upon access failure. Therefore, it
allows us to automate the authentication process and thus brute force the password.
@syncom
syncom / join_gpx_files_for_strava.md
Last active November 21, 2017 17:57
How to combine GPX files into one (for Strava)

How to combine GPX files into one (for Strava)

I use strava.com (https://strava.com) for my activity tracking. From time to time, I need to combine multiple activities into one for a better data management. Here is how I do it.

  1. First, in the page of the individual activity, download the data in GPX format by choosing the "Export GPX" menu. (GPX, or GPS exchange format, is an XML file format for storing coordinate data.) Order the downloaded activity data in time sequence. Suppose we now have three files, "1.gpx", "2.gpx", and "3.gpx" to join, where "1.gpx" is the earlist activity, and "3.gpx" is the latest activity.

  2. Open "*.gpx" with a text editor. Look for the XML tag ''. This is the parent of all the '' GPS coordinate samples (points). We need to extract all '' from all the GPX files to combine, and put them, in order, under the '' section. Do this by appending all the '' entries from "2.gpx" and "3.gpx" to that of "