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

Everything posted by -SnooPY-

  1. 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. 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. Exactly! And the problem with Cryptography in Python is just a consequence of this "inaccuracy".
  4. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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
  16. I accidentally found out that our colleague @jumper created the ImportPatcher tool. Do you think it can be useful in this case, given that _openssl.cp37-win32.pyd is in essence a DLL?
  17. I apologize that I also repeat, but I meant that even with the prefix "https:" these direct links do not open in the address bar of the browser. Obviously, when these links are at the end of the .htm file, there are no delays, because the letter is already fully downloaded at this point. But how to change the behavior of the browser is a much more interesting question for me.
  18. I always thought that the CSS file would be displayed as a text file in any browser, including IE8. And WOFF files would simply be downloaded like any other binary files. In this case, neither is happening. Given that Eudora uses the IE8 engine, I believe that this is the reason for all the delays. It takes time to correctly handle errors.
  19. In my case, CSS does not open in IE8, but in Notepad. And WOFF doesn't download at all, crashing with the "Internet Explorer cannot display the webpage" error. Perhaps something like this happens in Eudora, but with the proper handling of erroneous events.
  20. Thanks so much for the extremely detailed explanation. :) Unfortunately, I can’t tell anything about IE8, but I found information about security patches for Eudora 7.1 from https://www.computerhistory.org/atchm/the-eudora-email-client-source-code/#comment-4302840899 Have you tried using it? And all that concerns the filtering of any content can be done using a bunch of ProxHTTPSProxyMII + Privoxy.
  21. I'm not sure I understood the problem you are discussing correctly, but which user-agent is defined in your browser? I use Privoxy and https://helpforum.sky.com visible to me in IE 8 like this (it doesn’t depend on Google Chrome Frame): And I get multiple errors in ProxHTTPSProxyMII: [16:50] 134 ProxHTTPSProxyMII FrontProxy/v1.5 [WinError 10054] An existing connection was forcibly closed by the remote host [16:50] 167 ProxHTTPSProxyMII FrontProxy/v1.5 [WinError 10054] An existing connection was forcibly closed by the remote host [16:50] 169 ProxHTTPSProxyMII FrontProxy/v1.5 [WinError 10054] An existing connection was forcibly closed by the remote host [16:50] 162 ProxHTTPSProxyMII FrontProxy/v1.5 [WinError 10054] An existing connection was forcibly closed by the remote host [16:50] 170 ProxHTTPSProxyMII FrontProxy/v1.5 [WinError 10054] An existing connection was forcibly closed by the remote host [16:50] 171 ProxHTTPSProxyMII FrontProxy/v1.5 [WinError 10054] An existing connection was forcibly closed by the remote host [16:50] 172 ProxHTTPSProxyMII FrontProxy/v1.5 [WinError 10054] An existing connection was forcibly closed by the remote host I suspect the problem is that IE8 does not support WebSockets - https://caniuse.com/#feat=websockets
  22. You can use the command: EDITBIN.EXE /VERSION:5.1 /SUBSYSTEM:CONSOLE,5.01 stunnel-msspi-cli.exe to achieve performance in WinXP. But it is still not clear what to do with stunnel.pem and how to get it. PS. Stand-alone EDITBIN can be downloaded here.
  23. I don’t think bcrypt.dll is really needed here. Version 1.5, which you mentioned above, does not need any additional libraries. I just hoped that it was possible to do a thing like this patch for ws2_32.dll that implements only two missing functions.
  24. I continue to talk to myself. It turned out that _openssl.cp37-win32.pyd contains bcrypt.dll in the import table. But in WinXP this library is physically missing.
  25. Honestly, I did not quite understand your answer. I meant that I can't use the OpenSSL module in Python 3.7.1, which is discussed in this topic. 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 >>> import ssl >>> ssl.OPENSSL_VERSION 'OpenSSL 1.1.0i 14 Aug 2018' >>> import OpenSSL Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Temp\python-3.7.1\Lib\site-packages\OpenSSL\__init__.py", line 8, in <module> from OpenSSL import crypto, SSL File "C:\Temp\python-3.7.1\Lib\site-packages\OpenSSL\crypto.py", line 16, in <module> from OpenSSL._util import ( File "C:\Temp\python-3.7.1\Lib\site-packages\OpenSSL\_util.py", line 6, in <module> from cryptography.hazmat.bindings.openssl.binding import Binding File "C:\Temp\python-3.7.1\Lib\site-packages\cryptography\hazmat\bindings\openssl\binding.py", line 14, in <module> from cryptography.hazmat.bindings._openssl import ffi, lib ImportError: DLL load failed: The specified module could not be found. >>> ^Z C:\Temp\python-3.7.1> Does anyone know how to fix it? Thanks a lot.
×
×
  • Create New...