Skip to content

Instantly share code, notes, and snippets.

View Exadra37's full-sized avatar

Paulo Renato Exadra37

View GitHub Profile
@Exadra37
Exadra37 / player.js
Created December 10, 2019 22:41
Youtube Video Player
let Player = {
player: null,
init(domId, playerId, onReady){
window.onYouTubeIframeAPIReady = () => {
this.onIframeReady(domId, playerId, onReady)
}
@Exadra37
Exadra37 / tags_unify.ex
Last active September 25, 2022 19:55
Elixir Tags Unify module
defmodule Utils.TagsUnify do
@moduledoc """
This module unifies the given tags, by removing duplicates and merging the
ones that are similar.
## Examples
iex> "My Elixir Status, my-elixir-status, myelixirstatus, MyElixirStatus" |> Utils.TagsUnify.string()
"MyElixirStatus"
@Exadra37
Exadra37 / 00-WHY-DOES-YOUR-MOBILE-APP-NEED-AN-API-KEY.md
Last active May 1, 2019 14:50
Blog post code snippets for: WHY DOES YOUR MOBILE APP NEED AN API KEY?

WHY DOES YOUR MOBILE APP NEED AN API KEY?

The blog post can fe found here.

TLDR

Mobile apps are becoming increasingly important in the strategy of any company. As a result, companies need to release new application versions at a fast pace, and this puts developers under pressure with tight deadlines to complete and release new features very quickly.

HOW TO EXTRACT AN API KEY FROM A MOBILE APP WITH STATIC BINARY ANALYSIS

You can read the blog post here.

TLDR

An API key is probably the most common method used by developers to identify what is making the request to an API server, but most developers are not aware how trivial is for a hacker or even a script kid to steal and reuse an API key for unauthorized access to their APIs.

We will see how to grab an API key by reverse engineering the binary of a mobile app in an effective and quick way with an open source tool, and once we see how easy it can be, we will realize why it is even achievable by non developers.

@Exadra37
Exadra37 / security-tools.md
Last active September 22, 2020 13:17
Security Tools

SECURITY TOOLS

My personal list of security tools I recommend in the Approov Blog were I write articles as a Developer Advocate for security in Mobile and APIs.

API

  • MITMPROXY or Man In The Middle Proxy - Intercept traffic from a client consuming an API.
  • Fierce Domain Scanner - Enumerate hostnames for a domain.
  • Certificate Transparency Logs:
  • Web Interface:
@Exadra37
Exadra37 / 00-README.md
Last active May 1, 2019 14:54
Code Snippets for an Approov Integration in a NodeJS Express API as per this blog post http://blog.approov.io/approov-integration-in-a-nodejs-express-api

APPROOV INTEGRATION IN A NODEJS EXPRESS API

The blog post can be found here.

TLDR

This walk-though will show us how simple it is to integrate Approov in a current API server using NodeJS and the Express framework.

We will see the requirements, dependencies and a step by step walk-through of the code necessary to implement Approov in a NodeJS Express API.

@Exadra37
Exadra37 / 00-README.md
Last active May 1, 2019 14:50
Code Snippets for an Approov Integration in Python Flask API on this blog post http://blog.approov.io/approov-integration-in-a-python-flask-api

APPROOV INTEGRATION IN A PYTHON FLASK API

The blog post can be found here.

TLDR

This walk-though will show us how simple it is to integrate Approov in a current API server using Python and the Flask framework.

We will see the requirements, dependencies and a step by step walk-through over the code necessary to implement Approov in a Python Flask API.

@Exadra37
Exadra37 / Package Control.sublime-settings
Last active April 18, 2018 11:24
Sublime Text 3 Settings - Work
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"Alignment",
"Blade Snippets",
"CSS Format",
@Exadra37
Exadra37 / command-line-prompt
Created June 7, 2016 13:22
Watch Mysql queries in real time
$> tail -f -n 100 /var/lib/mysql/devint1.log
...
8941 Prepare select * from `stepFeed` where `productId` = ? limit 1
8941 Execute select * from `stepFeed` where `productId` = '764773' limit 1
@Exadra37
Exadra37 / BasicTestCase.php
Created June 4, 2015 14:11
More robust testing for the methods we are testing
<?php
/**
* @author Paulo Silva(Exadra37) <exadra37ingmaildotcom>
* @since 2015/06/04
*/
abstract class BasicTestCase extends PHPUnit_Framework_TestCase // Orchestra\Testbench\TestCase for Laravel
{
/**