1
0
mirror of https://github.com/byReqz/blackmate.git synced 2024-11-23 11:44:56 +00:00

Create generator.sh

This commit is contained in:
Anyon3 2016-06-25 21:51:43 +08:00 committed by GitHub
commit e778ae831b

74
generator.sh Normal file
View File

@ -0,0 +1,74 @@
#!/bin/bash
#
# First shot, considering this as an alpha version
#
# Description : Tools menu generator for gtk based desktop, tested on xfce4 and mate-desktop
#
# Author : Dimitri Mader -> dimitri@linux.com
# Gnu / GPL v3
for u in $( ls categories/ | sort ); do
cntools=`wc -l < categories/$u`;
if [[ "$u" == 'reversing ' ]] || [[ "$u" == 'disassembler' ]] || [[ "$u" == 'binary' ]] || [[ "$u" == 'code-audit' ]] || [[ "$u" == 'analysis' ]] ||
[[ "$u" == 'debugger' ]] || [[ "$u" == 'decompiler' ]]; then
namecat=`echo X-BlackArch-CodeAnalysis;`;
elif [[ "$u" == 'cracker' ]] || [[ "$u" == 'crypto' ]]; then
namecat=`echo X-BlackArch-Cracking;`;
elif [[ "$u" == 'defensive' ]] || [[ "$u" == 'honeypot' ]]; then
namecat=`echo X-BlackArch-Defensive;`;
elif [[ "$u" == 'exploitation' ]] || [[ "$u" == 'automation' ]] || [[ "$u" == 'dos' ]]; then
namecat=`echo X-BlackArch-Exploitation;`;
elif [[ "$u" == 'anti-forensic' ]] || [[ "$u" == 'unpacker' ]] || [[ "$u" == 'forensic' ]] || [[ "$u" == 'packer' ]]; then
namecat=`echo X-BlackArch-Forensic;`;
elif [[ "$u" == 'malware' ]] || [[ "$u" == 'keylogger' ]] || [[ "$u" == 'backdoor' ]]; then
namecat=`echo X-BlackArch-Malware;`;
elif [[ "$u" == 'networking' ]] || [[ "$u" == 'proxy' ]] || [[ "$u" == 'spoofer' ]] || [[ "$u" == 'tunnel' ]] || [[ "$u" == 'spoof' ]]; then
namecat=`echo X-BlackArch-Networking;`;
elif [[ "$u" == 'bluetooth' ]] || [[ "$u" == 'nfc' ]] || [[ "$u" == 'wireless' ]]; then
namecat=`echo X-BlackArch-Wireless;`;
elif [[ "$u" == 'voip' ]] || [[ "$u" == 'mobile' ]]; then
namecat=`echo X-BlackArch-Telephony;`;
elif [[ "$u" == 'scanner' ]] || [[ "$u" == 'fuzzer' ]] || [[ "$u" == 'fingerprint' ]] || [[ "$u" == 'recon' ]]; then
namecat=`echo X-BlackArch-Scanning;`;
elif [[ "$u" == 'sniffer' ]]; then
namecat=`echo X-BlackArch-Sniffing;`;
else
namecat=`echo X-BlackArch-Misc;`;
fi
a=`cat categories/$u | sed 's/|/\n/g' | sed 's/http.*//' | sed '/^$/d' | sort -r | head -n $cntools`;
for i in $a; do
cat gendesk | sed -e 's/Name=.*/Name='$i'/' | sed -e 's/TryExec=.*/TryExec=\/usr\/bin\/'$i'/' |
sed 's/Exec=.*/Exec=sh -c '\''\/usr\/bin\/'$i' -Help;$SHELL'\''/' |
sed -e 's/Categories=.*/Categories='$namecat'/' > ba-$i.desktop
done
done