Skip to content

Instantly share code, notes, and snippets.

@goffinet
Forked from godevnet/jtrinstall.sh
Last active May 28, 2024 23:36
Show Gist options
  • Save goffinet/83565ebec963fed0c74d to your computer and use it in GitHub Desktop.
Save goffinet/83565ebec963fed0c74d to your computer and use it in GitHub Desktop.
John the Ripper Installation for Centos 7/8
#!/bin/bash
# Centos 7/8 John the Ripper Installation
#release=(j 1.8.0)
release=(k 1.9.0)
# Check Centos version
if [ -f /etc/redhat-release ] ; then
source /etc/os-release
if [ $VERSION_ID == "8" ] ; then
packager=dnf
elif [ $VERSION_ID == "7" ] ; then
packager=yum
fi
else exit ; fi
sudo ${packager} -y install wget gpgme
sudo ${packager} -y group install "Development Tools"
cd
wget http://www.openwall.com/john/${release[0]}/john-${release[1]}.tar.xz
wget http://www.openwall.com/john/${release[0]}/john-${release[1]}.tar.xz.sign
wget http://www.openwall.com/signatures/openwall-signatures.asc
gpg --import openwall-signatures.asc
gpg --verify john-${release[1]}.tar.xz.sign
tar xvfJ john-${release[1]}.tar.xz
cd john-${release[1]}/src
make clean linux-x86-64
cd ../run/
./john --test
#password dictionary download
wget -O - http://mirrors.kernel.org/openwall/wordlists/all.gz | gunzip -c > openwall.dico
@stevewgr
Copy link

stevewgr commented May 28, 2024

Another approach using latest trunk:

sudo yum install -y openssl-devel
sudo yum -y group install "Development Tools"
cd ~
git clone --depth=1 https://github.com/openwall/john
cd john/src
./configure
make -j

mkdir ~/target && cd ~/target
curl -LO https://filebin.net/****/target.7z
$HOME/john/run/7z2john.pl target.7z > hash.txt
$HOME/john/run/john --format=7z hash.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment