{"id":20066269,"url":"https://github.com/ossobv/pylresolv","last_synced_at":"2026-06-09T19:31:15.919Z","repository":{"id":57456112,"uuid":"176163579","full_name":"ossobv/pylresolv","owner":"ossobv","description":"Python DNS querying through libc libresolv.so using ctypes","archived":false,"fork":false,"pushed_at":"2019-07-03T10:32:02.000Z","size":16,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-21T14:19:21.263Z","etag":null,"topics":["dns","library","python","resolver-library"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ossobv.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-17T21:34:36.000Z","updated_at":"2023-04-07T09:21:29.000Z","dependencies_parsed_at":"2022-08-29T10:41:20.767Z","dependency_job_id":null,"html_url":"https://github.com/ossobv/pylresolv","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ossobv/pylresolv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ossobv%2Fpylresolv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ossobv%2Fpylresolv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ossobv%2Fpylresolv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ossobv%2Fpylresolv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ossobv","download_url":"https://codeload.github.com/ossobv/pylresolv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ossobv%2Fpylresolv/sbom","scorecard":{"id":713883,"data":{"date":"2025-08-11","repo":{"name":"github.com/ossobv/pylresolv","commit":"e0c5cad88b97ecb985eace208228af1b5d7f06d2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/5 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}}]},"last_synced_at":"2025-08-22T08:56:00.573Z","repository_id":57456112,"created_at":"2025-08-22T08:56:00.574Z","updated_at":"2025-08-22T08:56:00.574Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34123171,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dns","library","python","resolver-library"],"created_at":"2024-11-13T13:55:36.829Z","updated_at":"2026-06-09T19:31:15.899Z","avatar_url":"https://github.com/ossobv.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"pylresolv - DNS querying through libc libresolv.so using ctypes\n===============================================================\n\nProvides access to ``res_query`` (``resolver(3)``) and friends for very\nbasic DNS querying (beyond ``gethostbyname``).\n\n*Right now, it only supports MX record lookups.*\n\nThis is *not* a replacement for fully featured DNS libraries like\n``dnspython`` or ``pycares``, but rather a small wrapper to provide a bare\nminimal lookup capability. Additionally, it serves as an example of how\nto use ``-lresolv`` routines.\n\n.. warning:: BEWARE!\n\n    This library uses (a) not-so-well documented C library calls which\n    (b) may differ in their ABI across different libc versions and\n    operating systems. Proceed with caution. The only thing this has\n    going for it, is its small size.\n\n\nMost common usage\n-----------------\n\n.. code-block:: python\n\n    from pylresolv import ns_parse, ns_type, res_query\n\n    answer = res_query('gmail.com', rr_type=ns_type.ns_t_mx)\n    ret = ns_parse(answer, handler=ns_type.handle_t_mx)\n    print(ret)\n\nWill produce a list of ``RR`` objects::\n\n    [RR\u003cns_type.ns_t_mx: 15\u003e((40, u'alt4.gmail-smtp-in.l.google.com')),\n     RR\u003cns_type.ns_t_mx: 15\u003e((30, u'alt3.gmail-smtp-in.l.google.com')),\n     RR\u003cns_type.ns_t_mx: 15\u003e((10, u'alt1.gmail-smtp-in.l.google.com')),\n     RR\u003cns_type.ns_t_mx: 15\u003e((20, u'alt2.gmail-smtp-in.l.google.com')),\n     RR\u003cns_type.ns_t_mx: 15\u003e((5, u'gmail-smtp-in.l.google.com'))]\n\nExample from main:\n\n.. code-block:: python\n\n    from pprint import pprint\n    queries = (\n        ('gmail.com', ns_type.ns_t_ns),\n        ('gmail.com', ns_type.ns_t_a),\n        ('gmail.com', ns_type.ns_t_mx),\n        ('gmail.com', ns_type.ns_t_txt),\n        ('www.gmail.com', ns_type.ns_t_cname),\n    )\n    for qhost, qtype in queries:\n        print('Querying host {!r} type {!r}:'.format(qhost, qtype))\n        answer = res_query(qhost, rr_type=qtype)\n        ret = ns_parse(answer)\n        # ret = ns_parse(answer, handler=ns_type.handle_t_mx)\n        # ret = ns_parse(answer, handler=ns_type.handle_bin)\n        pprint([rr.contents for rr in ret])\n        print()\n\nProduces::\n\n    Querying host 'gmail.com' type \u003cns_type.ns_t_ns: 2\u003e:\n    ['ns2.google.com', 'ns4.google.com', 'ns3.google.com', 'ns1.google.com']\n\n    Querying host 'gmail.com' type \u003cns_type.ns_t_a: 1\u003e:\n    [bytearray(b'\\xac\\xd9\\x11e')]\n\n    Querying host 'gmail.com' type \u003cns_type.ns_t_mx: 15\u003e:\n    [(40, 'alt4.gmail-smtp-in.l.google.com'),\n     (30, 'alt3.gmail-smtp-in.l.google.com'),\n     (10, 'alt1.gmail-smtp-in.l.google.com'),\n     (20, 'alt2.gmail-smtp-in.l.google.com'),\n     (5, 'gmail-smtp-in.l.google.com')]\n\n    Querying host 'gmail.com' type \u003cns_type.ns_t_txt: 16\u003e:\n    ['globalsign-smime-dv=CDYX+XFHUw2wml6/Gb8+59BsH31KzUr6c1l2BPvqKX8=',\n     'v=spf1 redirect=_spf.google.com']\n\n    Querying host 'www.gmail.com' type \u003cns_type.ns_t_cname: 5\u003e:\n    ['mail.google.com']\n\n\n2019-07-03: 0.2\n~~~~~~~~~~~~~~~\n\n- Renamed ``ns_type.handle_mx`` to ``ns_type.handle_t_mx``.\n- Added:\n  - ``handle_bin``\n  - ``handle_compressed``\n  - ``handle_text``\n  - ``handle_t_cname``\n  - ``handle_t_ns```\n  - ``handle_t_txt```\n- ``ns_parse`` now wraps the returned values into ``RR`` objects, so the\n  type can be retrieved afterwards. The value can be fetched from its\n  ``contents`` property.\n- You can use ``handle_bin`` to fetch A or AAAA records.\n- ``res_query`` now raises LookupError on failure.\n\n\n2019-03-17: 0.1\n~~~~~~~~~~~~~~~\n\n- Initial release.\n\n\nCopyright\n---------\n\nCopyright 2019, Walter Doekes (OSSO B.V.)\n\nThis program is free software: you can redistribute it and/or modify it\nunder the terms of the GNU General Public License as published by the\nFree Software Foundation, either version 3 of the License, or (at your\noption) any later version.\n\nThis program is distributed in the hope that it will be useful, but\nWITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General\nPublic License for more details.\n\nYou should have received a copy of the GNU General Public License along\nwith this program. If not, see http://www.gnu.org/licenses/.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fossobv%2Fpylresolv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fossobv%2Fpylresolv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fossobv%2Fpylresolv/lists"}