codecat icon indicating copy to clipboard operation
codecat copied to clipboard

Curl operation times out

Open The-legend3 opened this issue 4 years ago • 4 comments

So I followed you installation instructions and for some reason the curl post keeps timing out. Not sure what the issue might be.

/tools/codecat/Backend# python3 wsgi.py & [1] 1745 root@kali:~/tools/codecat/Backend# * Serving Flask app "application" (lazy loading)

  • Environment: production WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
  • Debug mode: on
  • Running on https://0.0.0.0:5001/ (Press CTRL+C to quit)
  • Restarting with stat
  • Debugger is active!
  • Debugger PIN: 149-731-841

/tools/codecat/Backend# python3 wsgi.py & [1] 1745 root@kali:~/tools/codecat/Backend# * Serving Flask app "application" (lazy loading)

  • Environment: production WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
  • Debug mode: on
  • Running on https://0.0.0.0:5001/ (Press CTRL+C to quit)
  • Restarting with stat
  • Debugger is active!
  • Debugger PIN: 149-731-841

~/tools/codecat# curl -i -X POST -H "Content-Type: application/json" -d '{"email":"[email protected]","username":"admin","password":"rubrik123"}' https://0.0.0.0:5001/api/users -k curl: (28) Operation timed out after 300644 milliseconds with 0 out of 0 bytes received

The-legend3 avatar Dec 04 '19 21:12 The-legend3

I test on ubuntu and fedora, look that following:

root@Artorias:/home/madara/new/codecat/Backend# python3 wsgi.py 
 * Running on https://0.0.0.0:5001/ (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 336-380-853
127.0.0.1 - - [04/Dec/2019 21:03:20] "POST /api/users HTTP/1.1" 200 -

other term

madara@Artorias:~/new/codecat/Frontend$ python3 wsgi.py 
 * Running on https://0.0.0.0:9093/ (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 659-564-752

madara@Artorias:~/codecat$ curl -i -X POST -H "Content-Type: application/json" -d '{"email":"[email protected]","username":"admin","password":"1234"}' https://127.0.0.1:5001/api/users -k
HTTP/1.0 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 4
X-Frame-Options: SAMEORIGIN
Content-Security-Policy: default-src 'self'
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Strict-Transport-Security: max-age=31536000; includeSubDomains
Server: Werkzeug/0.12.2 Python/3.6.9
Date: Thu, 05 Dec 2019 00:03:20 GMT

True

On dir of backend give recursive permissions to write... here return ok...

Do you have any error log ?

CoolerVoid avatar Dec 05 '19 00:12 CoolerVoid

Other dont use ip 0.0.0.0... use 127.0.0.1

curl -i -X POST -H "Content-Type: application/json" -d '{"email":"[email protected]","username":"admin","password":"1234"}' https://127.0.0.1:5001/api/users -k

Any doubt, i am here to help.

CoolerVoid avatar Dec 05 '19 00:12 CoolerVoid

Same here:

*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 5001 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):

dwisiswant0 avatar Dec 31 '19 05:12 dwisiswant0

TOday i test on Last version of ubuntu, runs ok i follow readme.md step by step...

update your repository and try again please

CoolerVoid avatar Jan 01 '20 17:01 CoolerVoid