This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package so; | |
import javax.crypto.Cipher; | |
import javax.crypto.KeyAgreement; | |
import javax.crypto.SecretKey; | |
import javax.crypto.interfaces.DHPublicKey; | |
import javax.crypto.spec.DHParameterSpec; | |
import javax.crypto.spec.SecretKeySpec; | |
import java.security.*; | |
import java.security.spec.X509EncodedKeySpec; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import unittest | |
class LatLon(object): | |
def __init__(self, lat, lon, alt): | |
""" | |
:param lat: Latitude in radians | |
:param lon: Longitude in radians | |
:param alt: Altitude in any unit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# __ .__ | |
# _______/ |_ ___.__.| | ____ | |
# / ___/\ __< | || | _/ __ \ | |
# \___ \ | | \___ || |_\ ___/ | |
# /____ > |__| / ____||____/\___ > | |
# \/ \/ \/ | |
export COLOR_NC='\e[0m' # No Color | |
export COLOR_WHITE='\e[1;37m' | |
export COLOR_BLACK='\e[0;30m' | |
export COLOR_BLUE='\e[0;34m' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Assume class A; class B extends A; class C extends B; | |
*/ | |
public static void main(String[] args) throws ClassNotFoundException { | |
A obj = new C(); | |
System.out.println(obj.getClass()); | |
Class.forName(String.valueOf(obj.getClass().getName())); | |
System.out.println(GetClassesType(obj.getClass())); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static List<String> GetClasses(Class cls) throws ClassNotFoundException { | |
List<String> clsList = new ArrayList<>(); | |
String name; | |
while (!(name = cls.getGenericSuperclass().getTypeName()).equals("java.lang.Object")){ | |
clsList.add(name); | |
cls = Class.forName(name); | |
} | |
return clsList; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir ~/arm-pi2 | |
cd ~/arm-pi2 | |
git clone https://github.com/offensive-security/gcc-arm-linux-gnueabihf-4.7 | |
git clone https://github.com/offensive-security/kali-arm-build-scripts | |
export PATH=${PATH}:~/arm-pi2/gcc-arm-linux-gnueabihf-4.7/bin | |
cd ~/arm-pi2/kali-arm-build-scripts | |
curl https://gist.githubusercontent.com/joubin/e454661f82f5f749b2f8/raw/dbf27d37db449d1459f0cea984cb654769597a3c/rpi.sh > rpi.sh | |
https://gist.githubusercontent.com/joubin/cc7adf5196f8c6b2661e/raw/01db3e60154ce483c00c71c360c979cdc8e98f42/pi2_kernel.config > pi2_kernel.config | |
./build-deps.sh | |
./rpi.sh 1.2.3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This is the Raspberry Pi Kali ARM build script - http://www.kali.org/downloads | |
# A trusted Kali Linux image created by Offensive Security - http://www.offensive-security.com | |
if [[ $# -eq 0 ]] ; then | |
echo "Please pass version number, e.g. $0 1.0.1" | |
exit 0 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Automatically generated file; DO NOT EDIT. | |
# Linux/arm 3.18.5 Kernel Configuration | |
# | |
CONFIG_ARM=y | |
CONFIG_SYS_SUPPORTS_APM_EMULATION=y | |
CONFIG_HAVE_PROC_CPU=y | |
CONFIG_STACKTRACE_SUPPORT=y | |
CONFIG_LOCKDEP_SUPPORT=y | |
CONFIG_TRACE_IRQFLAGS_SUPPORT=y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user nginx; | |
worker_processes 1; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} |