##libpcap for Android
###Android.mk
LOCAL_PATH := ./jni
include $(CLEAR_VARS)
LOCAL_MODULE := pcaptest
LOCAL_SRC_FILES := libpcap-native.c
# iOS builds for ARMv7 and simulator i386. | |
# Assumes any dependencies are in a local folder called libs and | |
# headers in a local folder called headers. | |
# Dependencies should already have been compiled for the target arch. | |
PROJ=untitled | |
ifeq ($(IOS), 1) | |
ARCH=armv7 | |
DEVICE=OS | |
CC_FLAGS=-arch $(ARCH) |
##libpcap for Android
###Android.mk
LOCAL_PATH := ./jni
include $(CLEAR_VARS)
LOCAL_MODULE := pcaptest
LOCAL_SRC_FILES := libpcap-native.c
import android.content.Context; | |
import android.content.pm.PackageInfo; | |
import android.content.pm.PackageManager; | |
import android.content.pm.PackageManager.NameNotFoundException; | |
import android.content.pm.Signature; | |
public class TamperCheck { | |
//we store the hash of the signture for a little more protection | |
private static final String APP_SIGNATURE = "1038C0E34658923C4192E61B16846"; |
#!/bin/bash | |
ADBShell () { adb ${2+-s }$2 shell "$1" | tr -d '\r' | |
} | |
GetAndroidVersion () { | |
local ALL_TAGS=$(wget -qO - "$GOOGLE_SOURCE/$REPO/+refs/tags/?format=text" | \ | |
tr -d '^{}' | cut -d/ -f3 | sort -u | grep -vE -- '-(cts|sdk)-' | grep -v "_r0") | |
TAG=${1:-$(ADBShell 'getprop ro.build.version.release')} | |
echo -e "ANDROID_SERIAL=$ANDROID_SERIAL\nro.build.version.release=$TAG" 1>&2 |
%% Make everything look better. | |
%% http://tex.stackexchange.com/questions/553/what-packages-do-people-load-by-default-in-latex | |
%% http://www.howtotex.com/packages/9-essential-latex-packages-everyone-should-use/ | |
\usepackage{microtype} | |
%% Shrink space around figures. | |
%% This beats manually adding negative \vspace commands everywhere. | |
%\setlength{\textfloatsep}{0pt} | |
%\setlength{\textfloatsep}{20pt plus 2pt minus 4pt} | |
%\setlength{\textfloatsep}{10pt plus 2pt minus 4pt} |
Pairings can be used for all kinds of advanced cryptographic schemes such as Encryption (Identity-based, Attribute-based, Predicate-based, etc.), Signatures, Zero-Knowledge Proofs, etc. It is in no particular order.
Provides multiple types of Elliptic Curve groups with appropriate pairings on top of them. Code repository resides here.
License: LGPL
Language: C
Thesis: On the Implementation of Pairing-Based Cryptography by Ben Lynn (2007)
# This script may use ~8 MiB Memory, it is fast and safe | |
def find_IP(dns_ser, domain, timeout = 2): | |
import dns.resolver, sys | |
try: | |
T = dns.resolver.Resolver(); T.nameservers = [dns_ser, ]; T.timeout = T.lifetime = timeout | |
answers = T.query(domain, raise_on_no_answer=False) | |
return [rdata for rdata in answers] | |
except Exception as e: | |
if e.__class__.__base__ == dns.exception.DNSException: |