Skip to content

Instantly share code, notes, and snippets.

View jhowbhz's full-sized avatar
🦾
Um programador apaixonado pelo que faz

Jhon jhowbhz

🦾
Um programador apaixonado pelo que faz
View GitHub Profile
@jhowbhz
jhowbhz / sendText.sh
Created April 10, 2025 19:01
Novo sendText evolution 2.2.3
curl --location "https://gateway.apibrasil.io/api/v2/evolution/message/sendText" --header "Content-Type: application/json" --header "DeviceToken: seu_device_token" --header "Authorization: Bearer seu_bearer_aqui" --data "{\"number\": \"5518991978402\",\"options\": {\"delay\": 1,\"presence\": \"composing\"},\"text\": \"TESTE INFORMA: COMPRA DE R$ 3,19 EFETUADA NA DATA 10/04/2025. DÚVIDAS: INFORME O DOC. NÚMERO 12345679\"}"
@jhowbhz
jhowbhz / sendText.php
Last active April 7, 2025 15:06
Novo sendText evolution 2.2.3
<?php
//Nova versão do servidor 2.2.3
$body = json_encode([
"number" => "5531994359434",
"options" => [
"delay" => 1,
"presence" => "composing"
],
@jhowbhz
jhowbhz / clear-kinsing.sh
Last active April 2, 2025 20:31
how to clear kinsing cryptojacking from ubuntu
# auto script clear
sudo curl -O https://scripts.apibrasil.io/v3/clear-kinsing.sh && bash ./clear-kinsing.sh
----------------------------------------
# clear-kinsing.sh
#!/bin/bash
# Define o arquivo de log com timestamp
@jhowbhz
jhowbhz / curl_php_example.php
Last active March 3, 2025 18:04
Curl PHP Example
<?php
$URL_REQUEST = "https://jsonplaceholder.typicode.com/posts/1");
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, URL_REQUEST);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$headers = [
"Accept: application/json"
@jhowbhz
jhowbhz / resolve.sh
Last active May 31, 2024 14:40
Ubuntu Network Failure
# Se você está enfrentando erros de DNS, experimente fazer o seguinte
# Erro: ping: google.com.br: Temporary failure in name resolution
# Tente isso
ping -c 4 8.8.8.8
# Se der ok, cheque o status
sudo systemctl status systemd-resolved
# Altere o DNS
@jhowbhz
jhowbhz / laravel-permissions-folder.sh
Created May 17, 2024 05:40
Permissions security laravel php nginx
# Caminho do projeto Laravel
LARAVEL_PATH=/opt/...
# Alterar proprietário e grupo
sudo chown -R www-data:www-data $LARAVEL_PATH
# Permissões para diretórios
find $LARAVEL_PATH -type d -exec chmod 755 {} \;
# Permissões para arquivos
@jhowbhz
jhowbhz / sec-brute-force-attack.sh
Last active May 17, 2024 04:44
Install fail2Ban
# 1. Instalar Fail2Ban
sudo apt install fail2ban
# 2. Configurar Fail2Ban
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
# 2.1 Configure os parametros de acordo com a sua necesidade
[DEFAULT]
bantime = 10m
findtime = 10m
@jhowbhz
jhowbhz / sec-nginx-php.bash
Last active May 17, 2024 05:19
Minimal security changes for PHP Nginx
# 1. Configurações do Nginx
# Restringir Acesso a Arquivos Sensíveis:
# Assegure-se de que arquivos sensíveis, como *.env, *.php (fora do diretório de acesso público), e outros arquivos de configuração não sejam acessíveis via web.
location ~ /\.(?!well-known).* {
deny all;
}
# 2. Desativar Execução de Scripts em Diretórios de Upload ou outros:
@jhowbhz
jhowbhz / clamav.sh
Last active May 16, 2024 23:38
Install clamav ubuntu 22.04
# 1. Adiciona o usuário
groupadd clamav
useradd -g clamav -s /bin/false -c "Clam Antivirus" clamav
# 1.1 Instalar o ClamAV
sudo apt update && sudo apt install clamav clamav-daemon -y
# 2. Configurar o ClamAV
sudo nano /etc/clamav/clamd.conf
@jhowbhz
jhowbhz / install.md
Last active April 9, 2024 18:20
Install PHP 8.3 - FPM Nginx Ubuntu 22.04

Add Ondrej's PPA

sudo add-apt-repository ppa:ondrej/php 
sudo apt update