{"action":"created","issue":{"url":"https://api.github.com/repos/jczic/MicroDNSSrv/issues/4","repository_url":"https://api.github.com/repos/jczic/MicroDNSSrv","labels_url":"https://api.github.com/repos/jczic/MicroDNSSrv/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/jczic/MicroDNSSrv/issues/4/comments","events_url":"https://api.github.com/repos/jczic/MicroDNSSrv/issues/4/events","html_url":"https://github.com/jczic/MicroDNSSrv/issues/4","id":293483450,"number":4,"title":"Dns answers to partial FQDN match","user":{"login":"Liberasys","id":25202151,"avatar_url":"https://avatars2.githubusercontent.com/u/25202151?v=4","gravatar_id":"","url":"https://api.github.com/users/Liberasys","html_url":"https://github.com/Liberasys","followers_url":"https://api.github.com/users/Liberasys/followers","following_url":"https://api.github.com/users/Liberasys/following{/other_user}","gists_url":"https://api.github.com/users/Liberasys/gists{/gist_id}","starred_url":"https://api.github.com/users/Liberasys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Liberasys/subscriptions","organizations_url":"https://api.github.com/users/Liberasys/orgs","repos_url":"https://api.github.com/users/Liberasys/repos","events_url":"https://api.github.com/users/Liberasys/events{/privacy}","received_events_url":"https://api.github.com/users/Liberasys/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2018-02-01T10:47:17Z","updated_at":"2018-02-05T12:20:41Z","closed_at":null,"author_association":"NONE","body":"I did an improvement in order to match a word in the fqdn asked.\r\nNow in the domain list, you can put something like : {'\"test\" : \"192.168.4.1\"}\r\nAnd making a DNS request on www.test.com, test.fr, test, will replay with \"192.168.4.1\".\r\nThis is useful for configuration web portal.\r\n\r\n`\r\n      # ============================================================================\r\n    # ===( Server Thread )========================================================\r\n    # ============================================================================\r\n\r\n    def _serverProcess(self) :\r\n        self._started = True\r\n        debug = True\r\n        while True :\r\n            try :\r\n                packet, cliAddr = self._server.recvfrom(256)\r\n                domName = MicroDNSSrv._getAskedDomainName(packet)\r\n                if domName:\r\n                    ipB = self._domList.get(domName.lower(), None)\r\n                    if debug and ipB:\r\n                        print(\"DNS: full domain matched: \" + domName.lower())\r\n\r\n                    if not ipB:\r\n                        for word_a in domName.lower().split(\".\"):\r\n                            for word_b in self._domList.keys():\r\n                                if word_a == word_b:\r\n                                    if debug:\r\n                                        print(\"DNS: word matched: \" + word_b)\r\n                                    ipB = self._domList.get(word_b, None)\r\n                                    break\r\n                            if ipB:\r\n                                break\r\n\r\n                    if not ipB:\r\n                        ipB = self._domList.get('*', None)\r\n                        if debug and ipB:\r\n                            print(\"DNS: catchall matched.\")\r\n\r\n                    if not ipB:\r\n                        if debug:\r\n                            print(\"DNS: no match found.\")\r\n\r\n                    if ipB:\r\n                        packet = MicroDNSSrv._getPacketAnswerA(packet, ipB)\r\n                        if packet :\r\n                            self._server.sendto(packet, cliAddr)\r\n\r\n            except :\r\n                if not self._started :\r\n                    break\r\n\r\n`"},"comment":{"url":"https://api.github.com/repos/jczic/MicroDNSSrv/issues/comments/363069119","html_url":"https://github.com/jczic/MicroDNSSrv/issues/4#issuecomment-363069119","issue_url":"https://api.github.com/repos/jczic/MicroDNSSrv/issues/4","id":363069119,"user":{"login":"Liberasys","id":25202151,"avatar_url":"https://avatars2.githubusercontent.com/u/25202151?v=4","gravatar_id":"","url":"https://api.github.com/users/Liberasys","html_url":"https://github.com/Liberasys","followers_url":"https://api.github.com/users/Liberasys/followers","following_url":"https://api.github.com/users/Liberasys/following{/other_user}","gists_url":"https://api.github.com/users/Liberasys/gists{/gist_id}","starred_url":"https://api.github.com/users/Liberasys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Liberasys/subscriptions","organizations_url":"https://api.github.com/users/Liberasys/orgs","repos_url":"https://api.github.com/users/Liberasys/repos","events_url":"https://api.github.com/users/Liberasys/events{/privacy}","received_events_url":"https://api.github.com/users/Liberasys/received_events","type":"User","site_admin":false},"created_at":"2018-02-05T12:20:41Z","updated_at":"2018-02-05T12:20:41Z","author_association":"NONE","body":"For me not :-)\r\nThe catchall should come as last chance :-)\r\n"}}
{"actor":{"display_login":"Liberasys"}}