Git Product home page Git Product logo

mitmproxy-node's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mitmproxy-node's Issues

Post install fails

> [email protected] postinstall /Users/ewhite/.nvm/versions/node/v10.7.0/lib/node_modules/mitmproxy
> scripts/install_python_deps.py

Traceback (most recent call last):
  File "scripts/install_python_deps.py", line 18, in <module>
    version[2] = int(version[2])
ValueError: invalid literal for int() with base 10: '4\\nPython:'

Looks like format given isn't expected

mitmdump --version
Mitmproxy: 4.0.4
Python:    3.7.0
OpenSSL:   OpenSSL 1.0.2o  27 Mar 2018
Platform:  Darwin-16.7.0-x86_64-i386-64bit

MITMProxy does not start on macOS

I'm trying to run BLeak on macOS, but it fails to start MITMProxy through mitmproxy-node. It appears that waitForPort(8080, 1); at src/index.ts:361 resolves successfully even though MITMProxy is not running.

I have confirmed that there is nothing listening on port 8080:

~  lsof -nP -i4TCP:8080 | grep LISTEN
➜  ~

macOS: 10.13.6
Node: 8.15.1
Python: 3.7.2

postinstall failing: 'scripts' is not recognized as an internal or external command (windows)

Trying to npm install BLeak, but am running into an issue with mitmproxy-node failing its postinstall script. Here is the error message:

> [email protected] postinstall C:\Users\jforcier\AppData\Roaming\npm\node_modules\mitmproxy
> scripts/install_python_deps.py

'scripts' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `scripts/install_python_deps.py`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\jforcier\AppData\Roaming\npm-cache\_logs\2018-09-24T19_40_06_833Z-debug.log

Cloning the repo and replacing the postinstall path with the direct path is my current work around. This is reproducible on multiple windows computers, but I don't have easy access to other OSs to see whether its windows only or not.

ModuleNotFoundError: No module named 'websockets'

Hello,

When I'm calling MITMProxy.Create, I keep getting the error ModuleNotFoundError: No module named 'websockets' at mitmproxy/scripts/proxy.py, line 15.

Do you have any idea what is causing this and how to fix it?

Thanks,
-tlf

Python deps won't install

$ npm install --save mitmproxy

> [email protected] postinstall /Users/levi/Desktop/.../mitmproxy
> scripts/install_python_deps.py

['version:']
Traceback (most recent call last):
  File "scripts/install_python_deps.py", line 17, in <module>
    version[0] = int(version[0])
ValueError: invalid literal for int() with base 10: 'version:'
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `scripts/install_python_deps.py`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.

Log file:

112 verbose stack Error: [email protected] postinstall: `scripts/install_python_deps.py`
112 verbose stack Exit status 1
112 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
112 verbose stack     at EventEmitter.emit (events.js:182:13)
112 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
112 verbose stack     at ChildProcess.emit (events.js:182:13)
112 verbose stack     at maybeClose (internal/child_process.js:962:16)
112 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
113 verbose pkgid [email protected]
114 verbose cwd /Users/Levi/...
115 verbose Darwin 18.0.0
116 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--save" "mitmproxy"
117 verbose node v11.0.0
118 verbose npm  v6.4.1
119 error code ELIFECYCLE
120 error errno 1
121 error [email protected] postinstall: `scripts/install_python_deps.py`
121 error Exit status 1
122 error Failed at the [email protected] postinstall script.
122 error This is probably not a problem with npm. There is likely additional logging output above.
123 verbose exit [ 1, true ]

$ python3 scripts/install_python_deps.py

['version:']
Traceback (most recent call last):
  File "scripts/install_python_deps.py", line 17, in <module>
    version[0] = int(version[0])
ValueError: invalid literal for int() with base 10: 'version:'

$ mitmproxy --version

Mitmproxy version: 2.0.2 (release version) Precompiled Binary
Python version: 3.5.2
Platform: Darwin-18.0.0-x86_64-i386-64bit
SSL version: OpenSSL 1.0.2j  26 Sep 2016
Mac version: 10.14 ('', '', '') x86_64

$ python3 -V

Python 3.7.1

$ node -v

v11.0.0

$ npm -v

6.4.1

Compatibility with Python 3.7

mitmproxy-node does not work with Python 3.7 right now because it depends on the Python websockets package, which is currently incompatible with Python 3.7:

python-websockets/websockets#431

I should update the mitmproxy package once Websockets updates with Python 3.7 support.

Workaround is to install websockets from the GitHub repository:

pip3 install -U git+https://github.com/aaugustin/websockets

No module named 'websockets'

Hi, I'm running the following test script

import MITMProxy from 'mitmproxy';

async function main() {
  const interceptPaths = [
    '/eval'
  ]
  const mitmProxy = await MITMProxy.default.Create(undefined, interceptPaths, false);
}

main();

Got error:

MITMProxy not running; starting up mitmproxy.
Loading script /Users/.../mitmproxy-test-local/node_modules/mitmproxy/scripts/proxy.py
in script /Users/.../mitmproxy-test-local/node_modules/mitmproxy/scripts/proxy.py: No module named 'websockets'

Under env:

  • node: v16.14.2
  • python: 3.10.6
  • Mitmproxy: 8.1.1
  • Platform: Mac M1, macOS-12.4-arm64-arm-64bit

I've been stuck for a whole day and it's the critical dependency for my project, could you please give some instructions on this issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.