From add164236c3c67c9e3291a5b91ac3f170a18ba8c Mon Sep 17 00:00:00 2001 From: David Dworken Date: Sun, 9 Nov 2014 14:46:41 -0500 Subject: [PATCH] Changed location where logs opened So as to fix bug where files were opened prior to checking if you have root. --- LANs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LANs.py b/LANs.py index a6afa97..5af2ad8 100755 --- a/LANs.py +++ b/LANs.py @@ -153,8 +153,6 @@ C = '\033[36m' # cyan GR = '\033[37m' # gray T = '\033[93m' # tan -logger = open('LANspy.log.txt', 'w+') -DN = open(os.devnull, 'w') ############################# ##### Start LANs.py Code#### ############################ @@ -1589,6 +1587,8 @@ def stop(signal, frame): if __name__ == "__main__": if not os.geteuid() == 0: exit("\nPlease run as root\n") + logger = open('LANspy.log.txt', 'w+') + DN = open(os.devnull, 'w') args = parse_args() if args.pcap: pcap_handler(args)