Skip to content

Instantly share code, notes, and snippets.

View neomafo88's full-sized avatar
🏠
Remote

Neoma Fong neomafo88

🏠
Remote
View GitHub Profile
@tmiz
tmiz / build_openssl_dylib.sh
Last active November 1, 2023 13:18
Build latest OpenSSL Universal Binary on OSX
#!/bin/bash
OPENSSL_VERSION="1.0.1g"
curl -O http://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz
mv openssl-$OPENSSL_VERSION openssl_i386
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz
mv openssl-$OPENSSL_VERSION openssl_x86_64
cd openssl_i386
@aztack
aztack / SendSMS.java
Created January 22, 2012 02:30
send sms in android 2.2
public class SendSMS extends Activity {
private void setStatus(String text)
{
TextView status = (TextView)findViewById(R.id.status);
status.setText(text);
}
private void sendSMS(String phoneNumber, String message)
{
@bcse
bcse / scrdec18-VC8.exe
Created February 15, 2012 10:13
Windows Script Decoder 1.8 (Decoding JScript.Encoded)
@cole-gillespie
cole-gillespie / gist:1975430
Created March 4, 2012 23:42
main plus one button script
gapi.loaded0(function (_) {
try {
_.h = function (a) {
throw a;
};
_.i = void 0;
_.k = !0;
_.l = null;
_.m = !1;
_.o = function () {
@nrk
nrk / command.txt
Created April 2, 2012 19:19
Using ffprobe to get info from a file in a nice JSON format
ffprobe -v quiet -print_format json -show_format -show_streams "lolwut.mp4" > "lolwut.mp4.json"
@seymores
seymores / AndroidManifestDecompressor.groovy
Created April 20, 2012 03:33
Extract AndroidManifest.xml information.
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
class AndroidXMLDecompress {
// decompressXML -- Parse the 'compressed' binary form of Android XML docs
// such as for AndroidManifest.xml in .apk files
@teqdruid
teqdruid / perf_event_template.c
Created April 23, 2012 18:59
Template for using perf_event
/*
============================================================================
Name : branch_mispred.c
Author : John Demme
Version : Mar 21, 2011
Description : A template for perf_event. Requires Linux 2.6.32 or higher
============================================================================
*/
#define _GNU_SOURCE
anonymous
anonymous / libclang_show_ast.py
Created April 26, 2012 21:03
Show the AST of a translation unit with libclang and python
# inspired by http://eli.thegreenplace.net/2011/07/03/parsing-c-in-python-with-clang/
import sys
import clang.cindex
def verbose(*args, **kwargs):
'''filter predicate for show_ast: show all'''
return True
def no_system_includes(cursor, level):
'''filter predicate for show_ast: filter out verbose stuff from system include files'''
@jlord
jlord / index.html
Created May 31, 2012 23:21
A CSS Sidebar Menu
<html>
<head>
<link href='http://fonts.googleapis.com/css?family=Arvo:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
</head>
<style>
h2 {font-family: 'Arvo', serif; font-weight: 400; font-size: 16px; color: #333; margin: 0px;}
a {text-decoration: none; }
#sidebar { position: relative; float: left; width: 360px;}
#sidebar h2 { margin-left: 8px; }
@craSH
craSH / aes_ctr-chosen_plaintext.py
Created June 22, 2012 01:18
Simple chosen-plaintext attack on AES-CTR given NONCE and IV re-use for multiple ciphertexts. Basically just a OTP chosen-plaintext attack implementation.
#!/usr/bin/env python
"""
Simple chosen-plaintext attack on AES-CTR given NONCE and IV re-use for
multiple ciphertexts
Copyleft 2011 Ian Gallagher <[email protected]>
"""
import sys
def decrypt(keystream, ciphertext):