-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplaton.py
276 lines (226 loc) · 11.7 KB
/
platon.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#####################################
# PLATON WORDLİST MAKER #
#####################################
from sys import exit
from os import name,mkdir,path
#####################################
class color:
if name == 'nt':
PURPLE = ''
CYAN = ''
BLUE = ''
YELLOW = ''
RED = ''
ORANGE = ''
RESET = ''
else:
PURPLE = '\033[95m'
CYAN = '\033[96m'
BLUE = '\033[94m'
YELLOW = '\033[93m'
RED = '\033[91m'
ORANGE = '\033[33m'
RESET = '\033[0m'
#####################################
KELIMELER = []
YENI_KELIMELER = []
OZEL_UZUNLUK = []
OZEL_KARAKTER = []
OLASI_SAYILAR = []
UZUNLUK = None
secim = {}
#####################################
def bosmu(value):
value = str(value)
if len(value) == 0 or value.isspace():
return True
return False
def imza():
print(color.CYAN,"""
██████╗░██╗░░░░░░█████╗░████████╗░█████╗░███╗░░██╗
██ ██╗██║░░░░░██ ██╗╚══██╔══╝██ ██╗████╗░██║
██████╔╝██║░░░░░███████║░░░██║░░░██ ██║██╔██╗██║
██╔═══╝░██║░░░░░██ ██║░░░██║░░░██ ██║██║╚████║
██║░░░░░███████╗██ ██║░░░██║░░░╚█████╔╝██║░╚███║
╚═╝░░░░░╚══════╝╚═╝ ╚═╝░░░╚═╝░░░░╚════╝░╚═╝░░╚══╝
█ █ █ █▀█ █▀█ █▀▄ █ █ █▀ ▀█▀ █▀▄▀█ ▄▀█ █▄▀ █▀▀ █▀█
▀▄▀▄▀ █▄█ █▀▄ █▄▀ █▄▄ █ ▄█ █ █ ▀ █ █▀█ █ █ ██▄ █▀▄
-by mefistophelezz
""")
secim = input(" [ ▶ ] Wordlist Ayrıştırmak İsterseniz [1] yazın yada \n enter'a basınız... : ")
if secim == '1':
try:
print(color.RED, '\n', '#' * 68,color.BLUE)
print(color.CYAN,"""[ BU BÖLÜMDE KULLANIPTA İŞİNİZE YARAMAMIŞ ]
[ KELİMELERİ YENİ WORDLİSTİNİZ DEN ÇIKARABİLİRSİNİZ ]\n""")
# Dosyaları Liste Haline Getiriyorum...
ayeni = sum([a.split() for a in open(input(' [+] Yeni Wordlistin Konumunu Girin : '))], [])
aeski = sum([b.split() for b in open(input(' [+] Eski Wordlistin Konumunu Girin : '))], [])
YENI_WORDLIST = []
for i in ayeni:
if i not in aeski:
YENI_WORDLIST.append(i)
with open('new_wordlist.txt','w',encoding='utf-8') as new:
for words in YENI_WORDLIST:
new.write(words + '\n')
print(color.YELLOW,'[√] Yeni Wordlist Oluşturuldu....')
exit()
except FileNotFoundError:
print(color.RED,'[!] BÖYLE BİR KONUM YOK...')
exit()
except PermissionError:
print(color.RED, '[!] YANLIŞ DOSYA KONUMU GİRİLDİ...')
exit()
else:
pass
def sorular():
print(color.RED,'\n','#'*60)
print(color.BLUE,'[ YOKSA BOŞ BIRAKINIZ ]')
print(' [ ÇOKLU,DEĞERLER,VİRGÜLLE,AYIRARAK,YAZILIR,YANİ,BÖYLE ]\n',color.CYAN)
global KELIMELER
global OLASI_SAYILAR
isim = input(' [+] AD : ')
KELIMELER.extend(isim.title().split(','))
KELIMELER.extend(isim.split(','))
soyad = input(' [+] SOYAD : ')
KELIMELER.extend(soyad.title().split(',')) ## HEM BÜYÜK HARFLİ OLAN OLASILIĞI HEMDE
KELIMELER.extend(soyad.split(',')) ## KÜÇÜK HARFLİ OLASILIKLARI ALIYORUM.....
sehir = input(' [+] ŞEHİR : ')
KELIMELER.extend(sehir.title().split(','))
KELIMELER.extend(sehir.split(','))
lakap = input(' [+] LAKAP : ')
KELIMELER.extend(lakap.title().split(','))
KELIMELER.extend(lakap.split(','))
sanslisayi = input(' [+] ŞANSLI SAYILARI (örn: 1907) : ')
OLASI_SAYILAR.extend(sanslisayi.split(','))
ozelisimler = input(' [+] HOŞLANDIGI ŞEYLER (örn: fb,gs,bjk) : ')
KELIMELER.extend(ozelisimler.title().split(','))
KELIMELER.extend(ozelisimler.split(','))
KELIMELER = [i for i in KELIMELER if i] # BOŞ DEĞERLERİ SİLİYORUM
OLASI_SAYILAR = [a for a in OLASI_SAYILAR if len(a) > 2]
def secimler():
def yanlisdeger(deger):
if secim[deger] == 'Y' or secim[deger] == 'N':
pass
else:
print(' {}[!]{} Lütfen [Y] veya [N] değerlerini giriniz.'.format(color.RED,color.RESET))
exit()
global secim
secim = {'sayi':'','ozel':'','ters':''} ## Seçimler Y/N
print(color.RED,'#'*60,color.RESET,color.CYAN)
## SAYILAR DAHİL Mİ ?
secim['sayi'] = input('\n [?] Sayılar Dahil Edilsin mi ? [0123456789}] [Y/N] : ').capitalize()
yanlisdeger('sayi')
## KELİMENİN BAŞINA SAYILAR DAHİL Mİ ?
if secim['sayi'] == 'Y':
secim['ters'] = input(f'\n [?] Başlarada Sayı Eklensin mi ? [Y/N] : ').capitalize()
yanlisdeger('ters')
else:
pass
## UZUNLUK
while True:
global UZUNLUK
UZUNLUK = input(' [?] Max. Uzunluğu Giriniz [Boş Bırakabilirsiniz] : ')
if bosmu(UZUNLUK) == True:
UZUNLUK = None
break
elif UZUNLUK.isalpha() == True:
print('{} [!]{} Lütfen Sayı Giriniz...{}'.format(color.RED,color.RESET,color.CYAN))
else:
UZUNLUK = int(UZUNLUK)
break
## OZEL SEMBOLLER DAHİL Mİ ?
secim['ozel'] = input(f'\n [?] Özel Semboller Dahil Edilsin mi ? [Y/N] : ').capitalize()
yanlisdeger('ozel')
if secim['ozel'] == 'Y':
global OZEL_KARAKTER
OZEL_KARAKTER.extend(input(f'\n {color.YELLOW}[?]{color.CYAN} Hangi Özel Karakterleri Dahil Etmek İstersiniz [ !,?,#,$ ] \n {color.YELLOW}[!]{color.CYAN} Üstteki Gibi Virgülle Yazınız : ').split(','))
def kombinasyon():
def kombin(loop):
## tekrar tekrar for döngüsü yapmamak için fonksiyon kullandım
for newpass in eval(loop):
YENI_KELIMELER.append(newpass)
if secim['sayi'] == 'Y':
## kelimeleri kombinle ve sonuna sayı ekle
kombin('[word1 + word2 + str(sayi) for word1 in KELIMELER for word2 in KELIMELER for sayi in range(1,101)]')
## kelimelerin sonuna şanslı sayıları ekle
kombin("[word1 + word2 + str(sayi) for word1 in KELIMELER for word2 in KELIMELER for sayi in OLASI_SAYILAR ]")
## kelimeleri kombinle ve sonuna yıl ekle
kombin('[word1 + word2 + str(sayi) for word1 in KELIMELER for word2 in KELIMELER for sayi in range(2000,2021)]')
if secim['ozel'] == 'Y': # eğer hem sayi hemde özel karakterler dahil edildiyse bu bloga girer
## kelime1 + ozelkarakter + kelime2 + sayi
kombin('[word1 + ozel + word2 + str(sayi) for word1 in KELIMELER for word2 in KELIMELER for ozel in OZEL_KARAKTER for sayi in range(1,101)]')
## olası sayıları sona ekliyorum (örn:123,321,1234)
kombin("[word1 + ozel + word2 + str(sayi) for word1 in KELIMELER for word2 in KELIMELER for ozel in OZEL_KARAKTER for sayi in OLASI_SAYILAR ]")
## kelime1 + ozelkarakter + kelime2 + ozelkarakter2 + sayi
kombin('[word1 + ozel + word2 + ozel2 + str(sayi) for word1 in KELIMELER for word2 in KELIMELER for ozel in OZEL_KARAKTER for ozel2 in OZEL_KARAKTER for sayi in range(1,101)]')
## kelime1 + ozel karakter + kelime2 + ozel karakter + olası sayılar
kombin("[word1 + ozel + word2 + ozel2 + str(sayi) for word1 in KELIMELER for word2 in KELIMELER for ozel in OZEL_KARAKTER for ozel2 in OZEL_KARAKTER for sayi in OLASI_SAYILAR ]")
## kelime1+kelime2+ozelkarakter+sayi
kombin('[word1 + word2 + ozel +str(sayi) for word1 in KELIMELER for word2 in KELIMELER for ozel in OZEL_KARAKTER for sayi in range(1,101)]')
## üsttekinin aynısı sonuna yıl eklenmiş hali
kombin('[word1 + ozel + word2 + str(sayi) for word1 in KELIMELER for word2 in KELIMELER for ozel in OZEL_KARAKTER for sayi in range(2000,2021)]')
if secim['ters'] == 'Y':
## eger hem sayı hemde ters dahil edildiyse bu bloğa girer
kombin('[str(sayi) + word1 + word2 + str(sayi) for word1 in KELIMELER for word2 in KELIMELER for sayi in range(1,101)]')
## yıl eklenmiş hali
kombin('[str(sayi) + word1 + word2 + str(sayi) for word1 in KELIMELER for word2 in KELIMELER for sayi in range(2000,2021)]')
## sayı + kelime1 + kelime2
kombin('[str(sayi) + word1 + word2 for word1 in KELIMELER for word2 in KELIMELER for sayi in range(1,101)]')
## yıl eklenmiş hali
kombin('[str(sayi) + word1 + word2 for word1 in KELIMELER for word2 in KELIMELER for sayi in range(2000,2021)]')
if secim['ozel'] == 'Y':
## eger sayı hem ters hem özel seçilmişse bu bloga girer
kombin('[str(sayi) + word1 + ozel + word2 + str(sayi) for word1 in KELIMELER for word2 in KELIMELER for ozel in OZEL_KARAKTER for sayi in range(1,101)]')
## yıl eklenmiş hali
kombin('[str(sayi) + word1 + ozel + word2 + str(sayi) for word1 in KELIMELER for word2 in KELIMELER for ozel in OZEL_KARAKTER for sayi in range(2000,2021)]')
if secim['sayi'] == 'N':
## sayi dahil edilmediyse bu bloğa girer
kombin('[word1 + word2 for word1 in KELIMELER for word2 in KELIMELER]')
## sayi dahil edilmemiş ve ozel karakter dahil edilmişse bu bloga girer
if secim['ozel'] == 'Y':
kombin('[word1 + ozel + word2 for word1 in KELIMELER for word2 in KELIMELER for ozel in OZEL_KARAKTER]')
if UZUNLUK != None:
for uz in YENI_KELIMELER:
if len(uz) <= UZUNLUK:
OZEL_UZUNLUK.append(uz)
else:
pass
def kaydet():
WORDLIST_ISIM = input(f'\n [+] Wordlist İsmi Ne Olsun ? >>> ')
if bosmu(WORDLIST_ISIM) == True:
WORDLIST_ISIM = 'wordlist'
else:
pass
## WORDLİST DOSYASINI KAYDEDİYORUM ########################
with open(f'{path.abspath("Wordlist")}/{WORDLIST_ISIM}.txt', 'w',encoding='utf-8') as dosya:
if UZUNLUK == None:
for word in YENI_KELIMELER:
dosya.write(word + '\n')
print('\n\n')
print(color.RED,'#'*40,color.CYAN)
print(f' [+] {len(YENI_KELIMELER)} Kombinasyon Oluşturuldu.')
else:
for word in OZEL_UZUNLUK:
dosya.write(word + '\n')
print('\n\n')
print(color.RED, '#' * 40, color.CYAN)
print(f' [*] {len(OZEL_UZUNLUK)} Kombinasyon Oluşturuldu.')
print(color.RED,'#'*40,color.RESET)
print(f'{color.CYAN} [*] {WORDLIST_ISIM}.txt kaydedildi...')
print(color.RED,'#'*40,color.RESET)
if __name__ == '__main__':
if path.exists('Wordlist') == False:
mkdir('Wordlist')
else:
pass
# NOT : DAHA BÜYÜK WORDLİSTLER İÇİN DAHA FAZLA KARAKTER GİRİN
######################################
imza()
sorular()
secimler()
kombinasyon()
kaydet()
######################################