Skip to content

Instantly share code, notes, and snippets.

@iGio90
iGio90 / FadingActionBarHelperBase.java
Last active August 29, 2015 13:56
FadingActionBar: onClickListener to header view
/*
* Copyright (C) 2013 Manuel Peinado
* onCliListener to header view implementations by: Giovanni Rocca (iGio90)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
first sensor info (2 sessions)
sensor_info:
{ timestamp_snapshot: '2268',
accel_normalized_x: 0.4304962158203125,
accel_normalized_y: -0.037109375,
accel_normalized_z: 9.79705810546875,
accelerometer_axes: '3' },
sensor_info:
{ timestamp_snapshot: '2181',
hook.py
import frida
import sys
scriptname = sys.argv[1]
fd = open(scriptname, "r")
def on_message(message, data):
print(message)
@iGio90
iGio90 / gist:41782cd43663cd9f2783bff171ef6f2f
Last active April 2, 2019 01:26
Clash of Clans public key hasher
package com.igio90;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.BitSet;
/**
* I've spent some nice times understanding the logic, I'm not even sure if it's an hasher built by sc
* nor if that code is the right representation of what is currently used on SC games.
* The following implementation has been built by translating gdb assembly into java.
import utils
from asyncio import *
def run(*args):
async def coro():
await discord_client.send_message(message.channel, embed=utils.simple_embed('it', 'worked', utils.random_color()))
message = args.message
discord_client = args.discord_client
coro()
[{"type":"PvP","battleTime":"20181022T014718.000Z","arena":{"id":54000016,"name":"League 5"},"gameMode":{"id":72000006,"name":"Ladder"},"replayTag":"#08Q2JGPJ09PU","deckSelection":"collection","team":[{"tag":"#2J82YL","name":"ruiner!","startingTrophies":5313,"trophyChange":26,"crowns":2,"clan":{"tag":"#8Q8R9LQ0","name":"Boréal ★ MG","badgeId":16000122},"cards":[{"name":"P.E.K.K.A","level":8,"maxLevel":8,"iconUrls":{"medium":"https://api-assets.clashroyale.com/cards/300/MlArURKhn_zWAZY-Xj1qIRKLVKquarG25BXDjUQajNs.png"}},{"name":"Electro Wizard","level":5,"maxLevel":5,"iconUrls":{"medium":"https://api-assets.clashroyale.com/cards/300/RsFaHgB3w6vXsTjXdPr3x8l_GbV9TbOUCvIx07prbrQ.png"}},{"name":"Bandit","level":5,"maxLevel":5,"iconUrls":{"medium":"https://api-assets.clashroyale.com/cards/300/QWDdXMKJNpv0go-HYaWQWP6p8uIOHjqn-zX7G0p3DyM.png"}},{"name":"Minions","level":13,"maxLevel":13,"iconUrls":{"medium":"https://api-assets.clashroyale.com/cards/300/yHGpoEnmUWPGV_hBbhn-Kk-Bs838OjGzWzJJlQpQKQA.png"}},{"name":"Poiso
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# The MIT License (MIT)
# Copyright (c) 2017 Duncan Macleod
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
import os
import sys
if len(sys.argv) < 2:
print('usage: python3', sys.argv[0], ' /path/to/file_smali')
exit(2)
path = sys.argv[1]