Skip to content

Instantly share code, notes, and snippets.

View tristan2077's full-sized avatar

TristanHou tristan2077

  • Shanghai
View GitHub Profile
@tristan2077
tristan2077 / serialNumInfo()
Created April 23, 2019 08:42 — forked from ptdecker/serialNumInfo()
Evaluates a mobile device serial number, determines its type (ESN, IMEI, MEID) and attempts to check for validity if possible.
// serialNumInfo()
//
// Evaluates a mobile device serial number, determines its type (ESN, IMEI, MEID) and attempts
// to check for validity if possible.
//
// When the passed purported serial number, the serialNumInfo() function returns a boolean flag
// ('isValid') indicating the validity of the number along with 'numType' indicating the type of
// serial number passed. The function expects the passed serialNumber to be not contain any
// spaces and for hexadecimal values to be passed without a leading "0x" or "0h" prefix.
//
@tristan2077
tristan2077 / gist:217935e9445d05072f6da9a96ee21d61
Created August 8, 2018 02:38 — forked from jennyq/gist:5671585
Install m2crypto on Mac
When running "pip install m2crypto" in a virtualenv, I got the following error:
Downloading/unpacking m2crypto
Running setup.py egg_info for package m2crypto
Installing collected packages: m2crypto
Running setup.py install for m2crypto
building 'M2Crypto.__m2crypto' extension
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
swig -python -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/usr/include -includeall -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i