This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #bash | |
| sudo apt update | |
| sudo apt install apache2 php libapache2-mod-php php-mysql | |
| mysql | |
| CREATE DATABASE IF NOT EXISTS test_login CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; | |
| CREATE USER 'appuser'@'localhost' IDENTIFIED BY 'ChangeMeStrong!23'; | |
| GRANT ALL PRIVILEGES ON test_login.* TO 'appuser'@'localhost'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Je suis le propriétaire légal et j'ai l'autorisation écrite pour réaliser un test d'intrusion sur https://progfacil.com. | |
| Objectif : effectuer un pentest non destructif, limité à la découverte et au scan de vulnérabilités web/infra, et produire un rapport structuré. | |
| Contraintes strictes (NE PAS dépasser) : | |
| - Aucun exploitation destructive, aucun effacement/modification de données, aucune tentative d'accès aux comptes utilisateurs, aucun credential stuffing, aucun bruteforce sur comptes authentifiés, aucun test de type "destructive" (shell upload, RCE exploit actif), et aucune attaque de déni de service (DDoS). | |
| - Respecter un rythme raisonnable (-T4 pour nmap max, limites de taux pour gobuster/httpx). | |
| - Arrêter immédiatement si une opération pourrait compromettre l'intégrité des systèmes. | |
| Étapes demandées (exécutées dans cet ordre) : | |
| 1. Reconnaissance passive : curl, dig. | |
| 2. Découverte de sous-domaines (passif + bruteforce léger) puis vérification d'alive via httpx. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Script pour générer un APK pour ensuite l'utiliser avec metasploit | |
| set -e | |
| # === CONFIGURATION === | |
| PROJECT_NAME="MyApp" | |
| PACKAGE_NAME="org.example.app" | |
| MIN_SDK=24 | |
| TARGET_SDK=34 | |
| VERSION_CODE=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| // =================================================== | |
| // Auteur : Lamri : Alias ingenius | |
| // Projet : "Déploiement d'application dotnet CRUD avec sql server " | |
| // Date : 2025-09-29 | |
| // =================================================== | |
| sudo apt-get update && | |
| sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18 mssql-tools unixodbc-dev && |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.EntityFrameworkCore; | |
| using Microsoft.AspNetCore.Builder; | |
| using Microsoft.Extensions.DependencyInjection; | |
| using Microsoft.Extensions.Hosting; | |
| // | |
| var builder = WebApplication.CreateBuilder(args); | |
| // ne pas oublier d'ajouter la dépendance nuget dotnet add package Microsoft.EntityFrameworkCore.InMemory |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker run -d -v /:/host/ -p 2225:22 dockette/ssh bash -c "\ | |
| adduser -D -s /bin/bash cours && \ | |
| echo 'cours:abc' | chpasswd && \ | |
| adduser -D -s /bin/bash stagiaire && \ | |
| echo 'stagiaire:azerty' | chpasswd && \ | |
| echo 'FLAG h0tel_du_t3mp' > /home/stagiaire/flag.txt && \ | |
| chmod 600 /home/stagiaire/flag.txt && \ | |
| chown stagiaire:stagiaire /home/stagiaire/flag.txt && \ | |
| echo 'stagiaire:azer' > /home/cours/note.txt && \ | |
| chmod 600 /tmp/note.txt && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| # Supprime ancien container si existant | |
| docker rm -f ldap-ctf 2>/dev/null || true | |
| Création du serveur ldap crateldap.sh | |
| # Lance OpenLDAP | |
| docker run -d --name ldap-ctf -p 389:389 \ | |
| -e LDAP_ORGANISATION="CTF LDAP" \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| if [[ $EUID -ne 0 ]]; then | |
| echo "Ce script doit être exécuté en tant que root." | |
| exit 1 | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import tweepy | |
| import pandas as pd | |
| # Clés d'API Twitter (pour l'API v2) | |
| BEARER_TOKEN = 'votre_bearer_token' | |
| # Authentification avec l'API v2 | |
| client = tweepy.Client(bearer_token=BEARER_TOKEN) | |
| # Fonction pour rechercher des tweets récents contenant des mots-clés spécifiques |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Demander à l'utilisateur de saisir les variables nécessaires | |
| read -p "Entrez le nom de votre sous-domaine (par exemple, sub.localhost) : " SUBDOMAIN | |
| read -p "Entrez le nom de votre domaine principal (par exemple, localhost) : " DOMAIN | |
| # Définir les autres variables en fonction des entrées utilisateur | |
| WEB_ROOT="/var/www/$SUBDOMAIN/public_html" | |
| APACHE_CONF="/etc/apache2/sites-available/$SUBDOMAIN.conf" | |
| HOSTS_FILE="/etc/hosts" |
NewerOlder