def test_compare_unchanged(self): """ Tests get_template_database contents with the original TEMPLATE_DATABASE. """ original = phishingpage.TEMPLATE_DATABASE copy = phishingpage.get_template_database() self.assertDictEqual(original, copy, "Failed to copy original TEMPLATE_DATABASE!")
def test_compare_unchanged(self): """ Tests get_template_database contents with the original TEMPLATE_DATABASE. """ original = phishingpage.TEMPLATE_DATABASE copy = phishingpage.get_template_database() self.assertDictEqual(original, copy, "Failed to copy original TEMPLATE_DATABASE!")
def test_compare_changed(self): """ Tests get_template_database contents with the original TEMPLATE_DATABASE when the original is changed. """ original = phishingpage.TEMPLATE_DATABASE copy = phishingpage.get_template_database() # change elements in original del original["minimal"] self.assertDictEqual(original, copy, "Failed to copy original TEMPLATE_DATABASE when" " changed!")
def test_compare_changed(self): """ Tests get_template_database contents with the original TEMPLATE_DATABASE when the original is changed. """ original = phishingpage.TEMPLATE_DATABASE copy = phishingpage.get_template_database() # change elements in original del original["minimal"] self.assertDictEqual( original, copy, "Failed to copy original TEMPLATE_DATABASE when" " changed!")
# Are you root? if os.geteuid(): sys.exit('[' + R + '-' + W + '] Please run as root') # Kill any possible programs that may interfere with the wireless card # Only for systems with airmon-ng installed if os.path.isfile('/usr/sbin/airmon-ng'): proc = Popen(['airmon-ng', 'check', 'kill'], stdout=PIPE, stderr=DN) # Get hostapd if needed get_hostapd() # get dnsmasq if needed get_dnsmasq() # get template_database template_database = phishingpage.get_template_database() # check to see if the template is local if not template_database[TEMPLATE_NAME] is None: # if template is incomplete locally, delete and ask for a download if not phishingpage.check_template(TEMPLATE_NAME): # clean up the previous download phishingpage.clean_template(TEMPLATE_NAME) # get user's response response = raw_input("Template is available online. Do you want"\ " to download it now? [y/n] ") # in case the user agrees to download
# Parse args args = parse_args() # Are you root? if os.geteuid(): sys.exit('[' + R + '-' + W + '] Please run as root') # Kill any possible programs that may interfere with the wireless card # Only for systems with airmon-ng installed if os.path.isfile('/usr/sbin/airmon-ng'): proc = Popen(['airmon-ng', 'check', 'kill'], stdout=PIPE, stderr=DN) # Get hostapd if needed get_hostapd() # get template_database template_database = phishingpage.get_template_database() # check to see if the template is local if not template_database[TEMPLATE_NAME] is None: # if template is incomplete locally, delete and ask for a download if not phishingpage.check_template(TEMPLATE_NAME): # clean up the previous download phishingpage.clean_template(TEMPLATE_NAME) # get user's response response = raw_input("Template is available online. Do you want"\ " to download it now? [y/n] ") # in case the user agrees to download