Projects STRLCPY cupp Commits 668fc7c8
🤬
  • tests for alectodb download and the cow

  • Loading...
  • Mebus committed 5 years ago
    668fc7c8
    1 parent ab11479c
  • ■ ■ ■ ■ ■
    .gitignore
    skipped 2 lines
    3 3  *.gz
    4 4  .vscode/
    5 5  dictionaries/
     6 +.coverage
    6 7   
  • ■ ■ ■ ■
    cupp.py
    skipped 702 lines
    703 703   url = CONFIG["global"]["alectourl"]
    704 704   
    705 705   print("\r\n[+] Checking if alectodb is not present...")
    706  - if os.path.isfile("alectodb.csv.gz") == 0:
     706 + if not os.path.isfile("alectodb.csv.gz"):
    707 707   print("[+] Downloading alectodb.csv.gz...")
    708 708   webFile = urllib.request.urlopen(url)
    709 709   localFile = open(url.split("/")[-1], "wb")
    skipped 25 lines
    735 735   f = open("alectodb-passwords.txt", "w")
    736 736   f.write(os.linesep.join(gpa))
    737 737   f.close()
    738  - 
    739  - f.close()
    740  - sys.exit()
    741 738   
    742 739   
    743 740  def download_wordlist():
    skipped 368 lines
  • ■ ■ ■ ■ ■ ■
    test_cupp.py
    skipped 73 lines
    74 74   
    75 75   self.assertTrue(os.path.isfile(filename), "file " + filename + "exists")
    76 76   
     77 + def test_print_cow(self):
     78 + """ test the cow """
     79 + print_cow()
     80 + 
     81 + def test_alectodb_download(self):
     82 + 
     83 + alectodb_download()
     84 + 
     85 + self.assertTrue(
     86 + os.path.isfile("alectodb-usernames.txt"),
     87 + "file alectodb-usernames.txt exists",
     88 + )
     89 + self.assertTrue(
     90 + os.path.isfile("alectodb-passwords.txt"),
     91 + "file alectodb-passwords.txt exists",
     92 + )
     93 + 
    77 94   
    78 95  if __name__ == "__main__":
    79 96   unittest.main()
    skipped 1 lines
Please wait...
Page is in error, reload to recover