This file contains 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
AuthUserFile /path/.htpasswd | |
AuthName "Authorization required" | |
AuthType Basic | |
require valid-user |
This file contains 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 | |
iptables -P FORWARD DROP | |
iptables -P OUTPUT ACCEPT | |
iptables -N TCP | |
iptables -N UDP | |
iptables -A INPUT -p icmp --icmp-type echo-request -m recent --name ping_limiter --set | |
iptables -A INPUT -p icmp --icmp-type echo-request -m recent --name ping_limiter --update --hitcount 6 --seconds 4 -j DROP | |
iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT | |
iptables -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT | |
iptables -A TCP -p tcp --dport 22 -j ACCEPT |
This file contains 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 | |
#Check root access | |
if [ "$UID" != 0 ] | |
then | |
echo "This shell script must be run as root." | |
exit 2 | |
fi |
This file contains 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 | |
#Check root access | |
if [ "$UID" != 0 ] | |
then | |
echo "This shell script must be run as root." | |
exit 2 | |
fi |
This file contains 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 | |
[ $# -eq 0 ] && { echo "Usage: $0 server"; exit 1; } | |
SERVER="$1" | |
SSH="/usr/bin/ssh" | |
USER="root" | |
IDENTITY="/root/.ssh/id_rsa-$SERVER" | |
$SSH $USER@$SERVER -i $IDENTITY |
This file contains 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 React from "react"; | |
import Webcam from "react-webcam"; | |
import axios from "axios"; | |
// Using a Local CORS Django based Proxy to bypass CORS issues | |
const proxyUrl = "http://127.0.0.1:8000/" | |
const videoConstraints = { | |
width: 300, |
This file contains 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
""" | |
Copyright (c) 2022 Amine Asli, "MIAGE SIDI SLIMANE" | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: |