Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3.6 support + "Client Random" + "br" decompression support #25

Closed
wants to merge 25 commits into from

Conversation

LetMeR00t
Copy link

@LetMeR00t LetMeR00t commented Apr 24, 2019

  • Add Python3.6 support (Python2.7 doesn't work anymore due to mitmproxy)
  • Add a new tls_master regex to client "Client Random"
  • Add the "br" decompression support

Fix issue for #19 and #23

Tested with both pytest versions, all tests passed (except one, but already in xfail state)

- Add Python3.6 support (Python2.7 still works)
- Add a new tls_master regex to client "Client Random"
- Add the "br" decompression support

Squashed commit of the following:

commit 90e8ac1
Author: LetMeR00t <[email protected]>
Date:   Wed Apr 24 07:41:42 2019 +0200

    Few fixes

commit 997c9f9
Author: LetMeR00t <[email protected]>
Date:   Tue Apr 23 23:45:33 2019 +0200

    Lot of work, but all tests are okay

commit 9d927c7
Author: LetMeR00t <[email protected]>
Date:   Tue Apr 23 17:51:46 2019 +0200

    Test the tests

commit cc03b6b
Author: LetMeR00t <[email protected]>
Date:   Tue Apr 23 13:42:53 2019 +0200

    Add Python 3.6 support

commit 76fc82a
Author: LetMeR00t <[email protected]>
Date:   Tue Apr 23 13:37:46 2019 +0200

    Add Python3.6 support

commit 72682f7
Author: LetMeR00t <[email protected]>
Date:   Tue Apr 23 06:47:28 2019 +0200

    Change decode method for misc.py

commit a88e7a7
Author: LetMeR00t <[email protected]>
Date:   Mon Apr 22 20:19:50 2019 +0200

    Few fix

commit e11ffdc
Author: LetMeR00t <[email protected]>
Date:   Mon Apr 22 20:14:59 2019 +0200

    Python3 support : Continue

commit c33ba6c
Author: LetMeR00t <[email protected]>
Date:   Mon Apr 22 18:58:23 2019 +0200

    Add Python3.6 support - need to resolve an issue in the decoding

commit b1933bd
Author: LetMeR00t <[email protected]>
Date:   Mon Apr 22 18:11:40 2019 +0200

    Add Python3.6 support

commit 2eff382
Merge: ee63b2d 369e192
Author: LetMeR00t <[email protected]>
Date:   Mon Apr 22 17:05:28 2019 +0200

    Merge branch 'patchissue_cuckoo_#2103' into python3_support

commit ee63b2d
Author: LetMeR00t <[email protected]>
Date:   Mon Apr 22 14:24:29 2019 +0200

    Start to add support for Python3.6

commit 369e192
Merge: c940ec9 879bea3
Author: LetMeR00t <[email protected]>
Date:   Mon Apr 22 12:27:46 2019 +0200

    Merge branch 'br_encoding' into patchissue_cuckoo_#2103

commit 879bea3
Author: LetMeR00t <[email protected]>
Date:   Mon Apr 22 11:05:13 2019 +0200

    Add support for br encoding decompression

commit c940ec9
Merge: 5fe97ad bb17b81
Author: LmR <[email protected]>
Date:   Thu Apr 18 18:05:53 2019 +0200

    Merge branch 'patchissue_cuckoo_#2103' of https://github.com/LetMeR00t/httpreplay into patchissue_cuckoo_#2103

commit bb17b81
Merge: d182fb4 3074435
Author: LetMeR00t <[email protected]>
Date:   Fri Jun 15 22:08:15 2018 +0200

    Merge branch 'master' into patchissue_cuckoo_#2103

commit d182fb4
Author: LetMeR00t <[email protected]>
Date:   Sun Feb 4 17:37:56 2018 +0100

    Try to resolve an issue on cuckoo for using mitmproxy SSLKEYLOGFILE
@blshkv
Copy link

blshkv commented Apr 24, 2019

"All checks have failed" ?

@LetMeR00t
Copy link
Author

LetMeR00t commented Apr 24, 2019

@blshkv , if you check the details, you will see that pip2 is trying to recover mitmproxy 4.0.4 which doesn't exist in his reference...
You have to install it using pip3

@LetMeR00t
Copy link
Author

@jbremer @RicoVZ FYA

@blshkv
Copy link

blshkv commented Apr 24, 2019

The error basically means that you have to drop python2 because mitmproxy no longer supports it. The patch is not complete

@LetMeR00t
Copy link
Author

LetMeR00t commented Apr 24, 2019

@blshkv , well I agree with you but once you installed mitmproxy using pip3 and then compile the source code for httpreplay using python2 (no issue as mitmproxy is not mandatory), you have no issue to use mitmproxy in 4.0.4 as all tests passed (and in the code, you can see that i'm using the mitmproxy 4.0.4 source code which is well interpreted in python2)
And well, we can drop python2.7 if needed as the issue is mitmproxy itself in 0.18.2

@LetMeR00t LetMeR00t changed the title Python3.6 support (+Python2.7 continue) + "Client Random" + "br" decompression support Python3.6 support + "Client Random" + "br" decompression support Apr 24, 2019
@LetMeR00t
Copy link
Author

Hi @blshkv, @jbremer , @RicoVZ
Sorry for the last commits, I never used these tests before but it's very good when you understand how it works :)
Now the patch is okay, only python3.6 in the tests, see if we need to keep Python2.7 ?
Regards

@blshkv
Copy link

blshkv commented Apr 24, 2019

Python2 will be out of support next year, so don't waste your time. You can create a new branch if you really want a smooth transition but i would not care

@LetMeR00t
Copy link
Author

After reviewing my code again, I think I will need some more changes before you can review officially, I will do this asap. (Code is working but results of functions are returning bytes when they could return strings ...)

@LetMeR00t
Copy link
Author

My repository was updated with your's today.

@jbremer jbremer deleted the branch hatching:master December 8, 2021 10:23
@jbremer jbremer closed this Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants