資源簡介
wifiphisher 學習研究用請勿用于非正當途徑,此件乃網上
代碼片段和文件信息
#!/usr/bin/env?python
“““
This?module?tries?to?install?all?the?required?software.
“““
from?__future__?import?print_function
import?sys
import?os
from?ctypes.util?import?find_library
from?setuptools?import?setup?find_packages?Command
import?wifiphisher.common.constants?as?constants
class?CleanCommand(Command):
????“““Custom?clean?command?to?tidy?up?the?project?root.“““
????user_options?=?[]
????def?initialize_options(self):
????????pass
????def?finalize_options(self):
????????pass
????def?run(self):
????????os.system(‘rm?-vrf?./build?./dist?./*.pyc?./*.tgz?./*.egg-info‘)
def?get_dnsmasq():
????“““
????Try?to?install?dnsmasq?on?host?machine?if?not?present
????:return:?None
????:rtype:?None
????“““
????if?not?os.path.isfile(“/usr/sbin/dnsmasq“):
????????install?=?raw_input((“[“?+?constants.T?+?“*“?+?constants.W?+?“]?dnsmasq?not?found?“?+
?????????????????????????????“in?/usr/sbin/dnsmasq?“?+?“install?now??[y/n]?“))
????????if?install?==?“y“:
????????????if?os.path.isfile(“/usr/bin/pacman“):
????????????????os.system(“pacman?-S?dnsmasq“)
????????????elif?os.path.isfile(“/usr/bin/yum“):
????????????????os.system(“yum?install?dnsmasq“)
????????????else:
????????????????os.system(“apt-get?-y?install?dnsmasq“)
????????else:
????????????sys.exit((“[“?+?constants.R?+?“-“?+?constants.W?+?“]?dnsmasq?“?+
??????????????????????“not?found?in?/usr/sbin/dnsmasq“))
????if?not?os.path.isfile(“/usr/sbin/dnsmasq“):
????????dnsmasq_message?=?(“\n[“?+?constants.R?+?“-“?+?constants.W?+
???????????????????????????“]?Unable?to?install?the?\‘dnsmasq\‘?package!\n“?+?“[“?+?constants.T?+
???????????????????????????“*“?+?constants.W?+?“]?This?process?requires?a?persistent?internet?“?+
???????????????????????????“connection!\nPlease?follow?the?link?below?to?configure?your?“?+
???????????????????????????“sources.list\n“?+?constants.B?+?“http://docs.kali.org/general-use/“?+
???????????????????????????“kali-linux-sources-list-repositories\n“?+?constants.W?+?“[“?+
???????????????????????????constants.G?+?“+“?+?constants.W?+?“]?Run?apt-get?update?for?changes?“?+
???????????????????????????“to?take?effect.\n“?+?“[“?+?constants.G?+?“+“?+?constants.W?+?“]?“?+
???????????????????????????“Rerun?the?script?to?install?dnsmasq.\n[“?+?constants.R?+?“!“?+
???????????????????????????constants.W?+?“]?Closing“)
????????sys.exit(dnsmasq_message)
def?get_hostapd():
????“““
????Try?to?install?hostapd?on?host?system?if?not?present
????:return:?None
????:rtype:?None
????“““
????if?not?os.path.isfile(“/usr/sbin/hostapd“):
????????install?=?raw_input((“[“?+?constants.T?+?“*“?+?constants.W?+?“]?hostapd?not?found?in?“?+
?????????????????????????????“/usr/sbin/hostapd?install?now??[y/n]?“))
????????if?install?==?“y“:
????????????if?os.path.isfile(“/usr/bin/pacman“):
????????????????os.system(“pacman?-S?hostapd“)
????????????elif?os.path.isfile(“/usr/bin/yum“):
????????????????os.system(“yum?install?hostapd“)
????????????else:
????????????????os.system(“apt-get?-y?install?hostapd“)
??????
- 上一篇:Chisel教程.pdf
- 下一篇:MAX31856-STM32編程應用資料.zip
評論
共有 條評論