Skip to content
This repository has been archived by the owner on Dec 10, 2023. It is now read-only.

No client ip_address? #4

Closed
kazerewrite opened this issue Nov 15, 2021 · 9 comments
Closed

No client ip_address? #4

kazerewrite opened this issue Nov 15, 2021 · 9 comments

Comments

@kazerewrite
Copy link

When I use the addon, it shows these information:
Addon error: Traceback (most recent call last):
File "c:\Program Files (x86)\mitmproxy\mitmpcap.py", line 114, in response
client_addr = list(flow.client_conn.ip_address[:2])
AttributeError: 'Client' object has no attribute 'ip_address'

How can I fix it?

@lhlhx
Copy link

lhlhx commented Jun 1, 2022

I changed line 114 and 115 as below and it seems worked for me.
Disclaimer: I did not do a regression test on the code.

        client_addr = list(flow.client_conn.peername[:2])
        server_addr = list(flow.server_conn.peername[:2])

Cheers

@inceabdullah
Copy link

I changed line 114 and 115 as below and it seems worked for me. Disclaimer: I did not do a regression test on the code.

        client_addr = list(flow.client_conn.peername[:2])
        server_addr = list(flow.server_conn.peername[:2])

Cheers

I have added PR: #9

Thank you @lhlhx

@raxod502
Copy link

Even with that PR, I get:

AttributeError: 'ServerConnection' object has no attribute 'peername'

@lhlhx
Copy link

lhlhx commented Jul 18, 2023

How is your PCAP setup? @raxod502

@raxod502
Copy link

What do you mean? I don't have a PCAP file; I have a dump file produced by mitmproxy, which I'm trying to convert into PCAP format.

@lhlhx
Copy link

lhlhx commented Jul 20, 2023

@raxod502 apologize for my wordings, I mean how is your mitmproxy capture setup?

@inceabdullah
Copy link

inceabdullah commented Jul 23, 2023

@raxod502 apologize for my wordings, I mean how is your mitmproxy capture setup?

I thing with the param -s like:
-s mitmpcap.py

but I always set save.py also.

@raxod502
Copy link

raxod502 commented Jul 23, 2023

Yes, correct, I was using:

mitmproxy -nr preexisting.dump -s mitmpcap.py

to read a dump file that was previously exported by mitmproxy.

I have subsequently learned that the version of mitmproxy shipped in recent Ubuntu versions is very old (6.x), and have since upgraded (9.x). With the latest version, the version of mitmpcap in this repository does not work, but the updated version suggested in #4 (comment) does.

@muzuiget
Copy link
Owner

#10

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants