myl-discovery 0.6.0__py3-none-any.whl → 0.6.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {myl_discovery-0.6.0.dist-info → myl_discovery-0.6.1.dist-info}/METADATA +2 -1
- myl_discovery-0.6.1.dist-info/RECORD +10 -0
- myldiscovery/discovery.py +7 -4
- myldiscovery/main.py +7 -1
- myl_discovery-0.6.0.dist-info/RECORD +0 -10
- {myl_discovery-0.6.0.dist-info → myl_discovery-0.6.1.dist-info}/LICENSE +0 -0
- {myl_discovery-0.6.0.dist-info → myl_discovery-0.6.1.dist-info}/WHEEL +0 -0
- {myl_discovery-0.6.0.dist-info → myl_discovery-0.6.1.dist-info}/entry_points.txt +0 -0
- {myl_discovery-0.6.0.dist-info → myl_discovery-0.6.1.dist-info}/top_level.txt +0 -0
| @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            Metadata-Version: 2.1
         | 
| 2 2 | 
             
            Name: myl-discovery
         | 
| 3 | 
            -
            Version: 0.6. | 
| 3 | 
            +
            Version: 0.6.1
         | 
| 4 4 | 
             
            Summary: email autodiscovery
         | 
| 5 5 | 
             
            Author-email: Philipp Schmitt <philipp@schmitt.co>
         | 
| 6 6 | 
             
            License: GNU GENERAL PUBLIC LICENSE
         | 
| @@ -829,3 +829,4 @@ myl-discovery is licensed under the [GNU General Public License v3.0](LICENSE). | |
| 829 829 |  | 
| 830 830 | 
             
            - https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat
         | 
| 831 831 | 
             
            - https://datatracker.ietf.org/doc/html/rfc6186
         | 
| 832 | 
            +
            - https://developers.google.com/gmail/imap/imap-smtp
         | 
| @@ -0,0 +1,10 @@ | |
| 1 | 
            +
            myldiscovery/__init__.py,sha256=L_XVC06ZVdjhnV5up1MBnywTuGUIyjt8PUoQDUOzfAk,381
         | 
| 2 | 
            +
            myldiscovery/__main__.py,sha256=5BjNuyet8AY-POwoF5rGt722rHQ7tJ0Vf0UFUfzzi-I,58
         | 
| 3 | 
            +
            myldiscovery/discovery.py,sha256=MPNFGmkxy_XRk-24E-Rrc4O3Y0OhuJVoqSwKzrNfjiQ,9330
         | 
| 4 | 
            +
            myldiscovery/main.py,sha256=KfWTcc3kmvrHITCvA2Xvck19JmyoGZgRo5I-7YQR0X0,2199
         | 
| 5 | 
            +
            myl_discovery-0.6.1.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
         | 
| 6 | 
            +
            myl_discovery-0.6.1.dist-info/METADATA,sha256=DzURCdfeAIZXaynhga3CI_D34K4Blt5AUgKlWZkRx1A,45214
         | 
| 7 | 
            +
            myl_discovery-0.6.1.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
         | 
| 8 | 
            +
            myl_discovery-0.6.1.dist-info/entry_points.txt,sha256=nyyAyvgvu6iO9mPEA6uVrPfd0lIrUyo9AQWeH2asEY0,52
         | 
| 9 | 
            +
            myl_discovery-0.6.1.dist-info/top_level.txt,sha256=v_h72JexaacqBNY6iOMD9PpGg8lnGoL-pkmUIzxdiVU,13
         | 
| 10 | 
            +
            myl_discovery-0.6.1.dist-info/RECORD,,
         | 
    
        myldiscovery/discovery.py
    CHANGED
    
    | @@ -280,14 +280,14 @@ def autodiscover_port_scan(server): | |
| 280 280 | 
             
                }
         | 
| 281 281 |  | 
| 282 282 |  | 
| 283 | 
            -
            def autodiscover_autoconfig(domain):
         | 
| 283 | 
            +
            def autodiscover_autoconfig(domain, insecure=False):
         | 
| 284 284 | 
             
                autoconfig = autodiscover_txt(domain)
         | 
| 285 285 |  | 
| 286 286 | 
             
                if not autoconfig:
         | 
| 287 287 | 
             
                    LOGGER.warning("Failed to autodiscover using TXT records")
         | 
| 288 288 | 
             
                    return
         | 
| 289 289 |  | 
| 290 | 
            -
                res = requests.get(autoconfig)
         | 
| 290 | 
            +
                res = requests.get(autoconfig, verify=not insecure)
         | 
| 291 291 | 
             
                res.raise_for_status()
         | 
| 292 292 |  | 
| 293 293 | 
             
                try:
         | 
| @@ -297,12 +297,15 @@ def autodiscover_autoconfig(domain): | |
| 297 297 | 
             
                    return parse_autodiscover(res.text)
         | 
| 298 298 |  | 
| 299 299 |  | 
| 300 | 
            -
            def autodiscover(email_addr, username=None, password=None):
         | 
| 300 | 
            +
            def autodiscover(email_addr, username=None, password=None, insecure=False):
         | 
| 301 301 | 
             
                domain = email_addr.split("@")[-1]
         | 
| 302 | 
            +
             | 
| 302 303 | 
             
                if not domain:
         | 
| 303 304 | 
             
                    raise ValueError(f"Invalid email address {email_addr}")
         | 
| 305 | 
            +
             | 
| 304 306 | 
             
                if domain == "gmail.com":
         | 
| 305 307 | 
             
                    LOGGER.debug("Gmail detected, skipping autodiscover")
         | 
| 308 | 
            +
                    # https://developers.google.com/gmail/imap/imap-smtp
         | 
| 306 309 | 
             
                    return {
         | 
| 307 310 | 
             
                        "imap": {
         | 
| 308 311 | 
             
                            "server": "imap.gmail.com",
         | 
| @@ -318,7 +321,7 @@ def autodiscover(email_addr, username=None, password=None): | |
| 318 321 | 
             
                        },
         | 
| 319 322 | 
             
                    }
         | 
| 320 323 |  | 
| 321 | 
            -
                res = autodiscover_autoconfig(domain)
         | 
| 324 | 
            +
                res = autodiscover_autoconfig(domain, insecure=insecure)
         | 
| 322 325 |  | 
| 323 326 | 
             
                if not res:
         | 
| 324 327 | 
             
                    res = autodiscover_srv(domain)
         | 
    
        myldiscovery/main.py
    CHANGED
    
    | @@ -24,6 +24,9 @@ def parse_args(): | |
| 24 24 | 
             
                parser.add_argument(
         | 
| 25 25 | 
             
                    "-p", "--password", required=False, help="Password (Exchange only)"
         | 
| 26 26 | 
             
                )
         | 
| 27 | 
            +
                parser.add_argument(
         | 
| 28 | 
            +
                    "--insecure", required=False, action="store_true", default=False
         | 
| 29 | 
            +
                )
         | 
| 27 30 | 
             
                parser.add_argument("EMAIL")
         | 
| 28 31 | 
             
                return parser.parse_args()
         | 
| 29 32 |  | 
| @@ -40,7 +43,10 @@ def main(): | |
| 40 43 |  | 
| 41 44 | 
             
                try:
         | 
| 42 45 | 
             
                    res = autodiscover(
         | 
| 43 | 
            -
                        args.EMAIL, | 
| 46 | 
            +
                        args.EMAIL,
         | 
| 47 | 
            +
                        username=args.username,
         | 
| 48 | 
            +
                        password=args.password,
         | 
| 49 | 
            +
                        insecure=args.insecure,
         | 
| 44 50 | 
             
                    )
         | 
| 45 51 | 
             
                    if args.json:
         | 
| 46 52 | 
             
                        print_json(data=res)
         | 
| @@ -1,10 +0,0 @@ | |
| 1 | 
            -
            myldiscovery/__init__.py,sha256=L_XVC06ZVdjhnV5up1MBnywTuGUIyjt8PUoQDUOzfAk,381
         | 
| 2 | 
            -
            myldiscovery/__main__.py,sha256=5BjNuyet8AY-POwoF5rGt722rHQ7tJ0Vf0UFUfzzi-I,58
         | 
| 3 | 
            -
            myldiscovery/discovery.py,sha256=eSvTFEwzJU6qf3PLhXxn1xZs9SJlPdAn5SJUMYpmcco,9195
         | 
| 4 | 
            -
            myldiscovery/main.py,sha256=BQlblFEsPx3-JSXImWc1i2SsRED2IiEWD3cEPTszwac,2034
         | 
| 5 | 
            -
            myl_discovery-0.6.0.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
         | 
| 6 | 
            -
            myl_discovery-0.6.0.dist-info/METADATA,sha256=Nu0m2olCS_9eAMuuJ2ZyDcVDzoF8kUxAq9xi0ZWjGkc,45161
         | 
| 7 | 
            -
            myl_discovery-0.6.0.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
         | 
| 8 | 
            -
            myl_discovery-0.6.0.dist-info/entry_points.txt,sha256=nyyAyvgvu6iO9mPEA6uVrPfd0lIrUyo9AQWeH2asEY0,52
         | 
| 9 | 
            -
            myl_discovery-0.6.0.dist-info/top_level.txt,sha256=v_h72JexaacqBNY6iOMD9PpGg8lnGoL-pkmUIzxdiVU,13
         | 
| 10 | 
            -
            myl_discovery-0.6.0.dist-info/RECORD,,
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         |