Implementation of the -i switch. Interactively question the user and create a password dictionary file based on the answer.
()
| 297 | |
| 298 | |
| 299 | def interactive(): |
| 300 | """Implementation of the -i switch. Interactively question the user and |
| 301 | create a password dictionary file based on the answer.""" |
| 302 | |
| 303 | print("\r\n[+] Insert the information about the victim to make a dictionary") |
| 304 | print("[+] If you don't know all the info, just hit enter when asked! ;)\r\n") |
| 305 | |
| 306 | # We need some information first! |
| 307 | |
| 308 | profile = {} |
| 309 | |
| 310 | name = input("> First Name: ").lower().strip() |
| 311 | while len(name) == 0: |
| 312 | print("\r\n[-] You must enter a name at least!") |
| 313 | name = input("> Name: ").lower().strip() |
| 314 | profile["name"] = name |
| 315 | |
| 316 | profile["surname"] = input("> Surname: ").lower() |
| 317 | profile["nick"] = input("> Nickname: ").lower() |
| 318 | birthdate = input("> Birthdate (DDMMYYYY): ") |
| 319 | while len(birthdate) != 0 and len(birthdate) != 8: |
| 320 | print("\r\n[-] You must enter 8 digits for birthday!") |
| 321 | birthdate = input("> Birthdate (DDMMYYYY): ") |
| 322 | profile["birthdate"] = birthdate |
| 323 | |
| 324 | print("\r\n") |
| 325 | |
| 326 | profile["wife"] = input("> Partners) name: ").lower() |
| 327 | profile["wifen"] = input("> Partners) nickname: ").lower() |
| 328 | wifeb = input("> Partners) birthdate (DDMMYYYY): ") |
| 329 | while len(wifeb) != 0 and len(wifeb) != 8: |
| 330 | print("\r\n[-] You must enter 8 digits for birthday!") |
| 331 | wifeb = input("> Partners birthdate (DDMMYYYY): ") |
| 332 | profile["wifeb"] = wifeb |
| 333 | print("\r\n") |
| 334 | |
| 335 | profile["kid"] = input("> Child's name: ").lower() |
| 336 | profile["kidn"] = input("> Child's nickname: ").lower() |
| 337 | kidb = input("> Child's birthdate (DDMMYYYY): ") |
| 338 | while len(kidb) != 0 and len(kidb) != 8: |
| 339 | print("\r\n[-] You must enter 8 digits for birthday!") |
| 340 | kidb = input("> Child's birthdate (DDMMYYYY): ") |
| 341 | profile["kidb"] = kidb |
| 342 | print("\r\n") |
| 343 | |
| 344 | profile["pet"] = input("> Pet's name: ").lower() |
| 345 | profile["company"] = input("> Company name: ").lower() |
| 346 | print("\r\n") |
| 347 | |
| 348 | profile["words"] = [""] |
| 349 | words1 = input( |
| 350 | "> Do you want to add some key words about the victim? Y/[N]: " |
| 351 | ).lower() |
| 352 | words2 = "" |
| 353 | if words1 == "y": |
| 354 | words2 = input( |
| 355 | "> Please enter the words, separated by comma. [i.e. hacker,juice,black], spaces will be removed: " |
| 356 | ).replace(" ", "") |