mirror of
https://github.com/k4m4/kickthemout.git
synced 2024-11-26 23:14:25 +01:00
added -f option: read target IP(s) from file and perform attack
This commit is contained in:
parent
9238b1bd88
commit
d140602ad0
@ -737,6 +737,17 @@ if __name__ == '__main__':
|
|||||||
callback=targetList, type='string',
|
callback=targetList, type='string',
|
||||||
dest='targets', help='specify target IP address(es) and perform attack')
|
dest='targets', help='specify target IP address(es) and perform attack')
|
||||||
|
|
||||||
|
|
||||||
|
def target_files(option, opt, value, parser):
|
||||||
|
with open(value) as file:
|
||||||
|
addr_list = file.readlines()
|
||||||
|
setattr(parser.values, option.dest, addr_list)
|
||||||
|
|
||||||
|
parser.add_option('-f', '--file', action='callback',
|
||||||
|
callback=target_files, type='string',metavar='FILE',
|
||||||
|
dest='targets', help='read target IP address(es) from given file and perform attack')
|
||||||
|
|
||||||
|
|
||||||
(options, argv) = parser.parse_args()
|
(options, argv) = parser.parse_args()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user