Skip to content

Instantly share code, notes, and snippets.

View Exadra37's full-sized avatar

Paulo Renato Exadra37

View GitHub Profile
@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 / secure-phpmyadmin-installation.txt
Last active June 21, 2022 05:46
Secure PhpMyAdmin installation in 3 steps, by restrict access for specific users from specific ip addresses and change the alias name from phpmyadmin to other name less obvious.
/**
* - Securing PhpMyAdmin instalation in Ubuntu server
*
* @author Paulo Silva(Exadra37) <exadra37ingmailpointcom>
* @package Exadra37/SecurePhpMyAdmin
* @version 1.0.1
* @since 30/01/2014 - v.1.0.0
* 05/06/2014 - v.1.0.1
*
*/

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 / exadra37.html
Last active February 11, 2020 17:02
Allow only 1 Selection by Group when using multiselect in option groups boxs with plugin https://github.com/silviomoreto/bootstrap-select
<!-- http://silviomoreto.github.io/bootstrap-select/ -->
<select id="compare" class="selectpicker" data-style="btn-success" data-max-options="2" title="Compare Settings" data-width="25em" multiple>
<optgroup class="multiple-options" label="Compare" data-max-options="1">
<option class="exadra37-1-selection-by-group exadra37-group-compare" title="Compare Daily" selected>Daily</option>
<option class="exadra37-1-selection-by-group exadra37-group-compare" title="Compare Weekly">Weekly</option>
<option class="exadra37-1-selection-by-group exadra37-group-compare" title="Compare Monthly">Monthly</option>
</optgroup>
<optgroup class="multiple-options" label="Against" data-max-options="1">
<option class="exadra37-1-selection-by-group exadra37-group-against" title="Against Previous Week" selected>Previous Week</option>
<option class="exadra37-1-selection-by-group exadra37-group-against" title="Against Last Year">Last Year</option>
@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 / 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 / 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.

@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",