diff --git a/src/webattack/harvester/harvester.py b/src/webattack/harvester/harvester.py index a865e78b2..296e611c8 100644 --- a/src/webattack/harvester/harvester.py +++ b/src/webattack/harvester/harvester.py @@ -434,10 +434,8 @@ def run(): if apache_counter == 1: # check if we are running apache mode - print_status( - "Successfully stopped Apache. Starting the credential harvester.") - print_status( - "Harvester is ready, have victim browse to your site.") + print_status("Successfully stopped Apache. Starting the credential harvester.") + print_status("Harvester is ready, have victim browse to your site.") if apache_check == False: try: @@ -465,11 +463,11 @@ def run(): except Exception: apache_counter = 0 - if apache_counter == 0: - print(bcolors.GREEN + "[*] Try disabling Apache and try SET again." + bcolors.ENDC) - print("[*] Printing error: " + str(e) + "\n") - return_continue() - exit_set() + #if apache_counter == 0: + # print(bcolors.GREEN + "[*] Try disabling Apache and try SET again." + bcolors.ENDC) + # print("[*] Printing error: " + str(e) + "\n") + # return_continue() + # exit_set() # if we are using apache, then use the harvester php type that writes it out to post.php # note just change the index.html to post somewhere else and rename the diff --git a/src/webattack/harvester/report_generator.py b/src/webattack/harvester/report_generator.py index 2deeed0c3..eb425cadb 100644 --- a/src/webattack/harvester/report_generator.py +++ b/src/webattack/harvester/report_generator.py @@ -7,8 +7,7 @@ import datetime from src.core.setcore import * # make sure the reports directory is created -if not os.path.isdir(userconfigpath + "reports/"): - os.makedirs(userconfigpath + "reports/") +if not os.path.isdir(userconfigpath + "reports/"): os.makedirs(userconfigpath + "reports/") # # Quick report generation script @@ -46,28 +45,27 @@ for line in fileopen: filewrite2.write(r"" + "\n") for line2 in fileopen1: counter = 0 - filewrite = open(userconfigpath + "reports/%s.html" % (now), "a") + #filewrite = open(userconfigpath + "reports/%s.html" % (now), "a") match1 = re.search("REPLACEHEREDUDE", line2) if match1: line2 = line2.replace("REPLACEHEREDUDE", url) - filewrite.write(line2) + #filewrite.write(line2) url_xml = url.rstrip() filewrite2.write(" %s" % (url_xml) + "\n") counter = 1 - match2 = re.search( - "If this is blank, SET did not get a successful attempt on the website, sorry hoss..", line2) + match2 = re.search("If this is blank, SET did not get a successful attempt on the website, sorry hoss..", line2) if match2: line2 = line2.replace( "If this is blank, SET did not get a successful attempt on the website, sorry hoss..", "Report findings on %s

" % (url)) counter = 1 - filewrite.write(line2) + #filewrite.write(line2) opentag = True for line3 in site_template: match3 = re.search("PARAM:", line3) if match3: xml = line3.replace("PARAM: ", "") xml = xml.rstrip() - filewrite.write(line3 + "
") + #filewrite.write(line3 + "
") if opentag: filewrite2.write(r" ") opentag = False @@ -77,8 +75,8 @@ for line in fileopen: if match4: filewrite2.write(" " + "\n") opentag = True - filewrite.write( - "
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

") + #filewrite.write( + # "
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

") # look for how many people visited the website match5 = re.search("VISITORSHERE", line2) @@ -112,19 +110,17 @@ for line in fileopen: line2 = line2.replace("BITESHERE", str(counter5)) counter = 1 - filewrite.write(line2) + #filewrite.write(line2) - if counter == 0: - filewrite.write(line2) + #if counter == 0: + #filewrite.write(line2) try: - filewrite.close() + #filewrite.close() filewrite2.write(r"
" + "\n") filewrite2.close() except: pass -subprocess.Popen("cp -rf %s/src/core/reports/files %sreports/" % (definepath, - userconfigpath), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True).wait() -print(bcolors.BLUE + "[*] File exported to %s/reports/%s.html for your reading pleasure..." % (userconfigpath, now) + bcolors.ENDC) -print(bcolors.BLUE + "[*] File in XML format exported to %s/reports/%s.xml for your reading pleasure..." % (userconfigpath, now) + bcolors.ENDC) +subprocess.Popen("cp -rf %s/src/core/reports/files %sreports/" % (definepath, userconfigpath), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True).wait() +print(bcolors.BLUE + "[*] File in XML format exported to %sreports/%s.xml for your reading pleasure..." % (userconfigpath, now) + bcolors.ENDC)