Skip to content

Instantly share code, notes, and snippets.

@rena2019
rena2019 / version_dlg.bsh
Last active August 29, 2015 14:18
Display device version info
import android.view.View.OnClickListener;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Build;
void showDlg(String message) {
// MainActivity = myapp
AlertDialog alertDialog1 = new AlertDialog.Builder(myapp).create();
alertDialog1.setTitle("Info");
alertDialog1.setMessage( message );
#include <Arduino.h>
#include <Wire.h>
// Elechouse PN532 v3 board
// Switch: 1, 0 for I2C
#define SDA1 21
#define SCL1 22
TwoWire I2Cone = TwoWire(0);
#!/bin/bash
# https://goo.gl/v4K1MX
docker volume create portainer_data
docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer
#cloud-config
# https://goo.gl/jjsTsj
write_files:
- container: network
path: /var/lib/iptables/rules.sh
permissions: "0755"
owner: root:root
content: |
#iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
#iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
#cloud-config
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCrI3YvkQZ79yGicm8AUMePLaUcxuEdWrlntRUlugJPXq9XQcC1ySL35x4EE2MKUsa7MGWDoNWVWeK/mI0/5aVuLewioxW2HVWYBXNuGFOFeTThaJjimmQshH7pv8KYVU6s1BpSpXbLKG0u7ZUtbGFPKYWtT1lDcdB/9aqcWcVDen+/6FXkKZHypkMeaXbw9Il41kfP9VrzxifBBuh5BtQ9Sfp6c48iRS+rIuhfuJ4PIq/hChWlL+R6IRDd8A45CfGhyJkPzGK3jna3vMUdysRhHi3BZKIwS5Hq9UhQ17cNCup0hgjEo1b4OsFhamnAZWnAwrby5Ips6HcddD3UvZp5n+WoCBQhIBPWE+a4ijvYe242OEk11O/v6P3wbzjbU/436bb2qUhylSaO9JSJGkTvQvF0LWORigZ+dCPZ/vJEDxeNKt6mUYuq6bZrI3wvHgf3uWzqbHmw8UgKWMbjhNvWuuw2uI7n2tUyHF0SiP2umM8FiR4vb+Jx5SUOdG2C1G2AbIrWzvrbR9rwmQqRGEs7ZEoh/giLjUc8HygQhp2EdhGz1UtPJ1aCawusrZGnYIc00ZvqonIRvqJ/w3Ger7MqGl+q2vY0Sr2z+ozD7MBNfsN8EaH1Q/Tfgdh1edvqLW/93kbVf+KJkFZhPELSykBbo0GGnweZRbMFlQSuUFMUqw== rena2019@rena
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCgDLLG0+xMhIq1yusBaX6HxC67AfiFSIN1EDVveGuKNtEEd9PP5+8D7FKeVsQDwRnfQ2ofzZ2f4CeXMp+sqegzx3Mik+O4x49hefnbbBd5k4PoZXZf5AimRr/pLyJSQPeL+f1cTrbQBlvgJDhwSzi9sO2AV8ZhjQDUhHKsmYuyX1S0GG/P1z+hq1wcMXeNNa5rxvwNgQvvwo
--
-- Copyright 2018 rena2019
-- v0.2
--
-- @name girocard-limits
-- @description Display girocard limits
-- @targets 0.8
require('lib.tlv')
require('lib.strict')
@rena2019
rena2019 / Dockerfile
Last active March 23, 2019 21:24
Objection Ubuntu 18.04
# docker build -t ou1804 <URL>
# docker run -it -d --privileged -v /dev/bus/usb:/dev/bus/usb --name ou1804 ou1804 bash
FROM ubuntu:18.04
RUN apt-get update
RUN apt-get install -y adb wget python3 python3-pip usbutils aapt default-jdk locales zipalign git
RUN locale-gen en_US en_US.UTF-8
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
#localedef -i en_US -f UTF-8 en_US.UTF-8
#RUN git clone https://github.com/ThisIsLibra/AndroidProjectCreator.git
RUN wget https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.4.0.jar -O /usr/local/bin/apktool.jar
class_name = "rena2019.dummyapp.LoginActivity"
if (Java.available) {
setTimeout(function() { // avoid java.lang.ClassNotFoundException
Java.perform(function() {
var my_class = Java.use(class_name);
//replace the original implementation of the function `isEmailValid` with our custom function
my_class.isEmailValid.implementation = function(x){
//print the original arguments
console.log( "original call: fun("+ x + ")");
// start app: adb shell monkey -p rena2019.dummyapp 1
// display pid: frida-ps -U
// run script: frida -U -p <pid> -l ./lst_classes.js
class_name = "rena2019.dummyapp"
if (Java.available) {
Java.perform(function () {
Java.enumerateLoadedClasses({
onMatch: function(className){
class_name = "rena2019.dummyapp.LoginActivity"
setTimeout(function() {
Java.perform(function() {
var my_class = Java.use(class_name);
console.log( Object.getOwnPropertyNames(my_class.__proto__).join('\n') );
});
}, 0);