Skip to content

Commit ac2314c

Browse files
committed
Small cleanup
1 parent 76947b7 commit ac2314c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dnspwn.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ def send_response(x):
4848

4949
def main():
5050
logger.info('Starting to intercept [CTRL+C to stop]')
51-
data = sniff(prn=lambda x: send_response(x), lfilter=lambda x:x.haslayer(UDP) and x.dport == 53)
52-
return data
51+
sniff(prn=lambda x: send_response(x), lfilter=lambda x:x.haslayer(UDP) and x.dport == 53)
5352

54-
# Make it happen!
55-
data = main()
53+
if __name__ == "__main__":
54+
# Make it happen!
55+
main()

0 commit comments

Comments
 (0)