Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


-SnooPY-

Member
  • Content Count

    31
  • Donations

    $0.00 
  • Joined

  • Last visited

Community Reputation

5 Neutral

About -SnooPY-

Profile Information

  • OS
    XP Pro x86
  • Country
  1. -SnooPY-

    Python 3.5 Runtime Redistributable backported to XP

    Yesterday I built a (working?) version of the _openssl.pyd extension for Python 3.7.1 using MinGW 4.9.2 (I will be very grateful for any feedback) : https://www13.zippyshare.com/v/olH5qzDq/file.html I was forced to use pre-built binaries, LIBS and INCLUDES from the official Python distribution and the previously mentioned project Curl for Windows by Viktor Szakats. Now you just need to install cryptography 2.6.1, and then replace the files libcrypto-1_1.dll and libssl-1_1.dll in the directory with Python.exe and the _openssl.cp37-win32.pyd file in Lib\site-packages\cryptography\hazmat\bindings Your version of Cryptography 2.6.1 and the version of OpenSSL 1.1.1b from @Mathwiz also work great for Python 3.4, but I don’t have the opportunity to use Win7+ and VS2015+ to build a version compatible with Python 3.7.1. Thank you all and good luck!
  2. -SnooPY-

    Python 3.5 Runtime Redistributable backported to XP

    You can also check OpenSSL 1.1.1b MinGW build from the Curl for Windows project. The only thing left is to build the latest Cryptography using these DLLs. Does anyone know how to build * .pyd files?
  3. -SnooPY-

    Python 3.5 Runtime Redistributable backported to XP

    Exactly! And the problem with Cryptography in Python is just a consequence of this "inaccuracy".
  4. -SnooPY-

    Python 3.5 Runtime Redistributable backported to XP

    I apologize for not being clear. Personally, I only have Win XP, but as far as I understood, @heinoganda successfully tested the latest Cryptography up to 2.6.1 under Win 7 with Python 3.4. In theory, in newer versions of Python (3.5, 3.6 and 3.7) there should also be no problems under Win 7. I just meant that. IMHO, we already have OpenSSL with XP support in the form of libcrypto-1_1.dll and libssl-1_1.dll files. Unfortunately, I still can not figure out how to build *. pyd files for Python. Cryptohraphy package is not well documented for this case.
  5. -SnooPY-

    Python 3.5 Runtime Redistributable backported to XP

    Cryptography performance does not depend on the version of Python. The only problem is that the new cryptography package (v2.5 - v2.6.1) includes incompatible pre-built binaries (_openssl-cp37-win32.pyd, etc ...), which for some reason is not possible to rebuild with XP support. Although @hotnuma already pointed to the source code: https://github.com/openssl/openssl/blob/master/crypto/rand/rand_win.c We are interested in lines from 20 to 40. It is enough not to link bcrypt.lib and the compatibility problem will disappear.
  6. -SnooPY-

    Python 3.5 Runtime Redistributable backported to XP

    In my opinion, we don't do anything criminal. Most versions of bcrypt.dl mentioned here contain sources so everyone can be convinced that there are no "surprises". For example, another one I wrote yesterday (thanks @jumper for the hint). bcrypt.zip Personally, I am interested in two things: - why "cryptography" module cannot be compiled from sources - what has changed so much in "cryptography" greater than 2.4.2, that now Python crashes even in cases not directly related to this module
  7. -SnooPY-

    Python 3.5 Runtime Redistributable backported to XP

    With Python itself, not everything is so rosy either. I hardly found bcrypt.dll which does not cause Python 3.7.1 to crash, but other errors appeared. It seems that something is still wrong with sockets. Errors when creating a new certificate occur after the connection is already broken. C:\Temp\ProxHTTPSProxy>python C:\Temp\ProxHTTPSProxy\ProxHTTPSProxy.py ============================================================================ ProxHTTPSProxyMII v1.5 (urllib3/1.24.1) FrontServer : localhost:8079 RearServer : localhost:8081 ParentServer : None Proxomitron : http://localhost:8118 ============================================================================ ---------------------------------------- Exception happened during processing of request from ('127.0.0.1', 2309) Traceback (most recent call last): File "socketserver.py", line 647, in process_request_thread File "socketserver.py", line 357, in finish_request File "socketserver.py", line 717, in __init__ File "http\server.py", line 426, in handle File "C:\Temp\ProxHTTPSProxy\ProxyTool.py", line 115, in handle_one_request BaseHTTPRequestHandler.handle_one_request(self) File "http\server.py", line 414, in handle_one_request File "C:\Temp\ProxHTTPSProxy\ProxHTTPSProxy.py", line 167, in do_CONNECT dummycert = get_cert(commonname) ---------------------------------------- PS. Another version of bcrypt.dll from GOG Galaxy WinXP Patch by Drako Pensulo.
  8. -SnooPY-

    Python 3.5 Runtime Redistributable backported to XP

    Do you mean Python > 3.7.1 or "cryptography" module > 2.4.2 ? I recently discovered an interesting tool called WinAPIOverride - it may be useful to solve some problems with the lack of necessary API functions.
  9. -SnooPY-

    Python 3.5 Runtime Redistributable backported to XP

    In my case, ProxHTTPSProxy (python.exe) crashes absolutely the same, both at the stage of "Creating CA ..." and if I just do nothing in a few minutes after launch. It bothers me that it is impossible to compile new "cryptography" module ( >=2.5 ) from sources, disabling the forced use of bcrypt.dll.
  10. -SnooPY-

    Python 3.5 Runtime Redistributable backported to XP

    Yes, you are right. There are no problems with Python 3.7.1, it's all about the "cryptography-2.5" module and newer ones. But I also don't see any problems with psapi.dll or mpr.dll, only with bcrypt.dll. Nevertheless, the problem with the new versions of "cryptography" and Python crashes would be interesting to solve. C:\Temp\python-3.7.1>pip list Package Version ------------ ------- asn1crypto 0.24.0 cffi 1.12.1 colorama 0.4.1 cryptography 2.4.2 idna 2.8 pip 19.0.3 pycparser 2.19 pyOpenSSL 19.0.0 PySocks 1.6.8 setuptools 40.8.0 six 1.12.0 urllib3 1.24.1 wheel 0.33.1 C:\Temp\python-3.7.1>python Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:05:16) [MSC v.1915 32 bit (Intel)] on win32 >>> ^Z File: _openssl.cp37-win32.pyd MD5: 6b3ef6344fc88c5c991017d4892a917a SHA-1: 021b329260f5ae2916ef42097cb8ef2109e35f32 SHA-256: 67de1aaadf0f19b5d6f7b89ede5a5b6e7986e7955c2ca31ffccf5a882f604e4a C:\Temp\dumpbin>dumpbin /dependents _openssl.cp37-win32.pyd Microsoft (R) COFF/PE Dumper Version 8.00.50727.762 Copyright (C) Microsoft Corporation. All rights reserved. Dump of file _openssl.cp37-win32.pyd File Type: DLL Image has the following dependencies: ADVAPI32.dll CRYPT32.dll USER32.dll WS2_32.dll python37.dll KERNEL32.dll VCRUNTIME140.dll api-ms-win-crt-heap-l1-1-0.dll api-ms-win-crt-string-l1-1-0.dll api-ms-win-crt-time-l1-1-0.dll api-ms-win-crt-runtime-l1-1-0.dll api-ms-win-crt-utility-l1-1-0.dll api-ms-win-crt-convert-l1-1-0.dll api-ms-win-crt-stdio-l1-1-0.dll api-ms-win-crt-filesystem-l1-1-0.dll api-ms-win-crt-environment-l1-1-0.dll api-ms-win-crt-math-l1-1-0.dll C:\Temp\ProxHTTPSProxy>python C:\Temp\ProxHTTPSProxy\ProxHTTPSProxy.py ============================================================================ ProxHTTPSProxyMII v1.5 (urllib3/1.24.1) FrontServer : localhost:8079 RearServer : localhost:8081 ParentServer : None Proxomitron : http://localhost:8118 ============================================================================ [12:24] 001 [D] "POST https://www.google.com/gen_204?s=webhp&t=aft&atyp=csi&ei=u _h4XKayLdqVk74Po469mA0&rt=wsrt.14,aft.276,prt.276&bb=1 0" 204 0 [12:24] 002 [D] "GET https://www.google.com/gen_204?atyp=i&ct=backbutton&cad=&tt =navigation&ei=u_h4XKayLdqVk74Po469mA0&zx=1551432247610" 204 0 [12:24] 003 [D] "POST https://www.google.com/gen_204?atyp=csi&bb=1&ei=u_h4XKayLd qVk74Po469mA0&s=jsa&jsi=s,t.0,et.focus,n.iDPoPb,cn.1&zx=1551432247778 0" 204 0 [12:24] 004 [D] "POST https://www.google.com/gen_204?atyp=csi&bb=1&ei=u_h4XKayLd qVk74Po469mA0&s=webhp&t=all&imn=2&adh=&ima=1&ime=1&imeb=0&imeo=0&wh=620&scp=0&st o=&sys=hc.1&rt=prt.276,aft.276,iml.522,xjsls.390,dcl.418,xjses.922,xjsee.1356,xj s.1356,ol.2230,wsrt.14,cst.0,dnst.0,rqst.112,rspt.100,rqstt.2,unt.2,cstt.2,dit.3 46&zx=1551432248922 0" 204 0
  11. -SnooPY-

    Python 3.5 Runtime Redistributable backported to XP

    I'm sorry, but I saw in Dependency Walker only that _openssl.cp37-win32.pyd uses the system psapi.dll instead of the version made by @Dibya . Could you clarify exactly which functions are marked in red (missing?) ? Are these functions related to kernel32.dll or ws2_32.dll? Can I send here a minidump file to analyze the error from my post above?
  12. -SnooPY-

    Python 3.5 Runtime Redistributable backported to XP

    I tested your BCrypt.dll on XP in Python 3.7.1 and it crashed a couple of minutes after launch with the "BEX EventType" error: C:\Temp\ProxHTTPSProxy>python C:\Temp\ProxHTTPSProxy\ProxHTTPSProxy.py ============================================================================ ProxHTTPSProxyMII v1.5 (urllib3/1.24.1) FrontServer : localhost:8079 RearServer : localhost:8081 ParentServer : None Proxomitron : http://localhost:8118 ============================================================================ Thank you so much for the great work.
  13. -SnooPY-

    Python 3.5 Runtime Redistributable backported to XP

    By the way, what happens if add the XP-compatible code to the BCryptGenRandom function in the empty bcrypt.dll that I built? /* poll the CryptoAPI PRNG */ if (CryptAcquireContextW(&hProvider, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT) != 0) { if (CryptGenRandom(hProvider, bytes_needed, buffer) != 0) bytes = bytes_needed; CryptReleaseContext(hProvider, 0); }
  14. -SnooPY-

    Python 3.5 Runtime Redistributable backported to XP

    Unfortunately, I did not find any instructions at all on how to build "cryptography-2.5" from sources. The only thing I could find was OpenSSL code like this: /* On Windows 7 or higher use BCrypt instead of the legacy CryptoAPI */ # if defined(_MSC_VER) && defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0601 # define USE_BCRYPTGENRANDOM # endif # ifdef USE_BCRYPTGENRANDOM # include <bcrypt.h> # pragma comment(lib, "bcrypt.lib") # ifndef STATUS_SUCCESS # define STATUS_SUCCESS ((NTSTATUS)0x00000000L) # endif # else # include <wincrypt.h> But "cryptography-2.5" modules seem to come only in binaries.
  15. -SnooPY-

    Python 3.5 Runtime Redistributable backported to XP

    I dare to offer you the results of my experiments. I just built an empty bcrypt.dll and the error disappeared. However, I have no ideas about replacing missing functions with XP-compatible ones. Can you advise something? This is my first such experience. Sorry if something is wrong. bcrypt.zip
×