Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block marzn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
marzn /
Created Oct 27, 2017
Create filterlist for fail2ban / samba / ransomware
sed 's/^.*"filters":\["//g; s/"\]}$//g; s/","/\n/g; s/ /\\ /g; s/\./\\./g; s/\#/\\#/g; s/\+/\\+/g; s/\-/\\-/g; s/\;/\\;/g; s/\~/\\~/g; s/\!/\\!/g; s/\$/\\$/g; s/\@/\\@/g; s/\[/\\[/g; s/\]/\\]/g; s/\*/\.*/g;' combined > samba.conf
sed -i 's/^\.\*//; s/^/ smbd.*\\:\\ IP=<HOST>\\|.*/; s/$/\$/;' samba.conf
CONTENT=`cat samba.conf`
echo -e "[Definition]\nfailregex =${CONTENT}\n\nignoreregex = \n" > samba.conf
You can’t perform that action at this time.