Skip to content

Commit

Permalink
Implemented Microsoft NSCI (#73)
Browse files Browse the repository at this point in the history
Implemented Microsoft NCSI
  • Loading branch information
mlhaigh authored and strictlymike committed Apr 7, 2018
1 parent 3f096a1 commit dcdcfcb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions fakenet/defaultFiles/ncsi.txt
@@ -0,0 +1 @@
Microsoft NCSI
5 changes: 5 additions & 0 deletions fakenet/listeners/DNSListener.py
Expand Up @@ -111,6 +111,11 @@ def parse(self,data):
# Get fake record from the configuration or use the external address
fake_record = self.server.config.get('responsea', None)

# msftncsi does request ipv6 but we only support v4 for now
#TODO integrate into randomized/custom responses. Keep it simple for now.
if 'dns.msftncsi.com' in qname:
fake_record = '131.107.255.225'

# Using socket.gethostbyname(socket.gethostname()) will return
# 127.0.1.1 on Ubuntu systems that automatically add this entry
# to /etc/hosts at install time or at other times. To produce a
Expand Down

0 comments on commit dcdcfcb

Please sign in to comment.