File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -260,11 +260,13 @@ def toggle_dns_display():
260
260
with open (FAKE_LOC , 'r+' ) as f :
261
261
data = f .read ()
262
262
if DEBUG :
263
- if '# print ">> M' in data :
264
- data = data .replace ('# print ">> M ' , 'print ">> M ' )
263
+ if 'pass # print ">> M' in data :
264
+ data = data .replace ('pass # print ' , 'print ' )
265
265
if not DEBUG :
266
- if '# print ">> M' not in data :
267
- data = data .replace ('print ">> M' , '# print ">> M' )
266
+ if 'pass # print ">> M' not in data :
267
+ data = data .replace ('your " \\ \n "DNS Server."' , 'your DNS Server."' )
268
+ data = data .replace ('config path: \' \\ \n \' ./fakedns.py [configfile]\' ' , 'config path: ./fakedns.py [configfile]' )
269
+ data = data .replace ('print ' , 'pass # print ' )
268
270
f .seek (0 )
269
271
f .write (data )
270
272
f .truncate ()
@@ -304,9 +306,10 @@ def update_checker():
304
306
305
307
def startservers ():
306
308
"""Start the DNS and HTTP Server"""
307
- try :
309
+ print ('>> Starting FakeDns' )
310
+ if os .path .isfile (FAKE_LOC ):
308
311
dns = subprocess .Popen (['python' , FAKE_LOC , '-c' , DNS_LOC ])
309
- except IOError :
312
+ else :
310
313
sys .exit ('>> Unable to locate FakeDns' )
311
314
312
315
try :
You can’t perform that action at this time.
0 commit comments