Skip to content

Commit

Permalink
Merge pull request #931 from molangning/patch-3
Browse files Browse the repository at this point in the history
Removed swear words from passwords
  • Loading branch information
g0tmi1k authored Feb 13, 2024
2 parents 928828e + 5df1b87 commit 4b0dc7f
Show file tree
Hide file tree
Showing 31 changed files with 2,756 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .bin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
This is SecLists script directory where stuff like automated tasks and cleaner scripts can be found. You are welcome to use them to modify files here to your liking.

Below are scripts you can use to clean/modify/mutate files to your liking

- - -

`swear-words-remover.py` removes swear words from a target directory and outputs them in the same root directory as the passwords

e.g. target dir is `Passwords/Common-Credentials` and suffix is `-without-curse-words` so passwords will be in `Passwords/Common-Credentials`

- - -

`os-names-mutate.py` mutates `Fuzzing/os-names.txt` to include possible mutations of OS names in a url.

By default this script outputs the results in `Fuzzing/os-names-mutated.txt`
72 changes: 72 additions & 0 deletions .bin/swear-words-remover.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#!/usr/bin/python3

# Beware of the Scunthorpe problem!
# https://en.wikipedia.org/wiki/Scunthorpe_problem

import os

print("[+] Curse words remover")

SOURCE_FOLDER="Miscellaneous/list-of-swear-words"
TARGET_DIRS=["Passwords/Common-Credentials"]
curse_words=[]
TARGET_SUFFIX="-without-curse-words"

for root,_,file_list in os.walk(SOURCE_FOLDER):
for file in file_list:
if not file.endswith(".txt"):
continue
curse_words+=open(os.path.join(root,file)).read().split('\n')

# dedupe them
curse_words=list(dict.fromkeys(curse_words))

target_files=[]

for i in TARGET_DIRS:
for root,_,file_list in os.walk(i):
for file in file_list:
if not file.endswith(".txt"):
continue
target_files.append(os.path.join(root,file))

print("[+] Got %s files to check"%(len(target_files)))

for i in target_files:

print("[+] Checking %s"%(i))

counter=0
contents=open(i).read().split('\n')
root,file=i.rsplit("/",1)
root+=TARGET_SUFFIX
clean_contents=[]

for password in contents:

has_curse_word=False

if not password:
continue

for curse_word in curse_words:
if curse_word in password:
has_curse_word=True
break

if has_curse_word:
counter+=1
continue

clean_contents.append(password)

contents="\n".join(clean_contents)

if not os.path.isdir(root):
os.makedirs(root)

if counter==0:
print("[+] No curse words found in %s"%(i))
else:
print("[!] Removed %i swear words from %s"%(counter,i))
open(os.path.join(root,file),"w").write(contents)
3 changes: 3 additions & 0 deletions Miscellaneous/list-of-swear-words/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This is a list of swear words imported directly from https://github.com/LDNOOBW/List-of-Dirty-Naughty-Obscene-and-Otherwise-Bad-Words/

The files in this directory is named after the language of the swear word is in(e.g `en.txt` for english swear words)
38 changes: 38 additions & 0 deletions Miscellaneous/list-of-swear-words/ar.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
سكس
طيز
شرج
لعق
لحس
مص
تمص
بيضان
ثدي
بز
بزاز
حلمة
مفلقسة
بظر
كس
فرج
شهوة
شاذ
مبادل
عاهرة
جماع
قضيب
زب
لوطي
لواط
سحاق
سحاقية
اغتصاب
خنثي
احتلام
نيك
متناك
متناكة
شرموطة
عرص
خول
قحبة
لبوة
41 changes: 41 additions & 0 deletions Miscellaneous/list-of-swear-words/cs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
bordel
buzna
čumět
čurák
debil
do piče
do prdele
dršťka
držka
flundra
hajzl
hovno
chcanky
chuj
jebat
kokot
kokotina
koňomrd
kunda
kurva
mamrd
mrdat
mrdka
mrdník
oslošoust
piča
píčus
píchat
pizda
prcat
prdel
prdelka
sračka
srát
šoustat
šulin
vypíčenec
zkurvit
zkurvysyn
zmrd
žrát
20 changes: 20 additions & 0 deletions Miscellaneous/list-of-swear-words/da.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
anus
bøsserøv
cock
fisse
fissehår
fuck
hestepik
kussekryller
lort
luder
pik
pikhår
pikslugeri
piksutteri
pis
røv
røvhul
røvskæg
røvspræke
shit
66 changes: 66 additions & 0 deletions Miscellaneous/list-of-swear-words/de.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
analritter
arsch
arschficker
arschlecker
arschloch
bimbo
bratze
bumsen
bonze
dödel
fick
ficken
flittchen
fotze
fratze
hackfresse
hure
hurensohn
ische
kackbratze
kacke
kacken
kackwurst
kampflesbe
kanake
kimme
lümmel
MILF
möpse
morgenlatte
möse
mufti
muschi
nackt
neger
nigger
nippel
nutte
onanieren
orgasmus
penis
pimmel
pimpern
pinkeln
pissen
pisser
popel
poppen
porno
reudig
rosette
schabracke
schlampe
scheiße
scheisser
schiesser
schnackeln
schwanzlutscher
schwuchtel
tittchen
titten
vögeln
vollpfosten
wichse
wichsen
wichser
Loading

0 comments on commit 4b0dc7f

Please sign in to comment.