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
# /etc/sysconfig/iptables | |
# Generated by iptables-save v1.4.21 on Fri Jun 12 12:35:02 2015 | |
*filter | |
:INPUT DROP [127:13754] | |
:FORWARD DROP [0:0] | |
:OUTPUT ACCEPT [50:6304] | |
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT | |
-A INPUT -i eno33554984 -p udp -m udp --dport 53 -j ACCEPT | |
-A INPUT -i eno33554984 -p udp -m udp --dport 67 -j ACCEPT | |
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT |
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
# include <stdio.h> | |
# include <unistd.h> | |
main() { | |
int status; | |
char cmd[256],arg[256]; | |
for(;;) { | |
printf("===> Commande ? "); gets(cmd); | |
printf("---> Argument ? "); gets(arg); | |
if ( fork() == 0 ) { | |
execlp( cmd, cmd, arg, 0 ); |
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
/* | |
$Id: check_user.c,v 1.2 2000/12/04 19:02:33 baggins Exp $ | |
This program was contributed by Shane Watts <[email protected]> | |
slight modifications by AGM. | |
You need to add the following (or equivalent) to the /etc/pam.conf file. | |
# check authorization | |
check auth required pam_unix_auth.so | |
check account required pam_unix_acct.so | |
*/ |
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 | |
# Centos 7 John the Ripper Installation | |
yum -y install wget gpgme | |
yum -y group install "Development Tools" | |
cd | |
wget http://www.openwall.com/john/j/john-1.8.0.tar.xz | |
wget http://www.openwall.com/john/j/john-1.8.0.tar.xz.sign | |
wget http://www.openwall.com/signatures/openwall-signatures.asc | |
gpg --import openwall-signatures.asc | |
gpg --verify john-1.8.0.tar.xz.sign |
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 | |
yum -y install epel-release | |
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm | |
rpm -Uvh rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm | |
wget http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt | |
rpm --import RPM-GPG-KEY.dag.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 | |
# testpwd.sh | |
user=$1 | |
dic=$2 | |
shadow=/etc/shadow | |
original=$(<$shadow awk -v user=$user -F : 'user == $1 {print $2}') | |
prefix=${original%"${original#\$*\$*\$}"} | |
for pass in $(cat $dic); do | |
echo "Password : $pass" | |
computed=$(python -c "import crypt, getpass, pwd; print crypt.crypt('$pass', '$prefix')") |