Skip to content

Instantly share code, notes, and snippets.

View jonathands's full-sized avatar
🏠
Working from home

Jonathan DS jonathands

🏠
Working from home
  • Brazil
View GitHub Profile
@jonathands
jonathands / checklist-pt_br.md
Last active May 9, 2025 16:54
Understanding and Mitigating the Androxgh0st and similar malware threat

🔐 Entendendo e Mitigando a Ameaça do Malware Androxgh0st

Como o Androxgh0st Funciona

O Androxgh0st atinge principalmente aplicações Laravel, um dos principais frameworks PHP usados em muitos sites. Ao escanear arquivos .env, o malware consegue identificar e extrair informações sensíveis, especialmente credenciais de acesso a plataformas como a Amazon Web Services (AWS).

O funcionamento do Androxgh0st ocorre em várias fases:

Etapa 1: Varredura com Botnet

O Androxgh0st utiliza uma botnet para procurar por sites que utilizam Laravel. Isso gera uma lista de possíveis alvos.

@jonathands
jonathands / gist:d48d22aaebc54dac5415a7c6cfca0e6c
Last active May 4, 2025 00:44
install cloudflare warp on mint
echo "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ jammy main" | sudo tee /etc/apt/sources.list.d/cloudflare-client.list
## force Jammy
sudo apt-get update && sudo apt-get install cloudflare-warp
warp-cli registration new
warp-cli connect

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@jonathands
jonathands / gist:03a449740ce72acbc68b8d1e6f6aa7ef
Last active September 27, 2024 01:22
extrair dados registro.br
// === Global Variables ===
var siteResults = {};
var isPaused = false;
var pausePromiseResolve;
// === Function to Export siteResults as CSV ===
function exportSiteResultsAsCSV(siteResults) {
// Create the CSV headers
var csvContent = 'Site,Domain Info,DNS Info,Error\n';
@jonathands
jonathands / README.md
Created September 20, 2024 12:59 — forked from dpaluy/README.md
Download view only protected PDF from Google Drive

Step by step guide to downloading protected PDF from Google Drive

  1. Open the document in Google Docs
  2. Scroll to the bottom of the document, so all the pages are present
  3. Open Developer Tools on separate window and choose the Console tab
  4. Paste the code
  5. Have fun!
@jonathands
jonathands / gist:c0554be97d6e103f65f2c8cdf1bd8c25
Created December 11, 2023 20:01
composer install with www-data user
sudo su -l www-data -s /bin/bash -c "cd $PWD; composer install"
@jonathands
jonathands / gmail-stats.gs
Created June 24, 2023 12:23 — forked from leodevbro/gmail-stats.gs
In Gmail inbox, Find sender with most mail threads
// Original script: https://gist.github.com/leodevbro/2987e8874a18b2086ea6cc1aa3c494e8
// v2.5
// Google Apps Script is a coding language based on JavaScript.
// This Apps Script code helps us to sort addresses by most threads.
// A thread is a group of messages, as a conversation.
const modes = {
inbox: "inbox", // to analyze threads in the "Inbox" folder
outbox: "outbox", // to analyze threads in the "Sent" folder
** This is a Test
asfasdf asdf asdf asdf asdfa sdfa sdfas dfasdf
* 1
* 2
- 3
- 4
@jonathands
jonathands / simple_curl.php
Created November 28, 2022 11:34 — forked from ViliamKopecky/simple_curl.php
Simple cURL wrapper function for GET, POST, PUT & DELETE methods
/**
* Wrapper for easy cURLing
*
* @author Viliam Kopecký
*
* @param string HTTP method (GET|POST|PUT|DELETE)
* @param string URI
* @param mixed content for POST and PUT methods
* @param array headers
* @param array curl options