Coder Social home page Coder Social logo

run error about ajpy HOT 5 CLOSED

hypn0s avatar hypn0s commented on June 10, 2024
run error

from ajpy.

Comments (5)

admpri avatar admpri commented on June 10, 2024

def unpack(stream, fmt):
print stream, fmt
size = struct.calcsize(fmt)
print size
buf = stream.read(size)
print buf
if "" in buf:
print "error"
return struct.unpack(fmt, buf)

from ajpy.

hypn0s avatar hypn0s commented on June 10, 2024

I'm sorry but I don't understand your issue. Please provide more information:

  • Have you tested with Python 3?
  • Which version of tomcat are you trying to communicate with?
  • What is your actual issue?

You just put some code and stacktrace without any kind of context, I can't help you with so little information.

from ajpy.

admpri avatar admpri commented on June 10, 2024

oh, i am not test with python 3.
Apache Tomcat/Coyote JSP engine 1.1:nmap scan result(it is not my server): Apache Tomcat/Coyote JSP engine 1.1

def unpack(stream, fmt): print stream, fmt size = struct.calcsize(fmt) print size buf = stream.read(size) print buf if "" in buf: print "error" return struct.unpack(fmt, buf)
stream: <socket._fileobject object at 0x7f4b45690ad0>
fmt: >HHb
size: 5
buf: ''ps:empty
buf: it is empty
Now how to modify the code to make it work properly?

from ajpy.

hypn0s avatar hypn0s commented on June 10, 2024

Hi, if you see "Apache Tomcat/Coyote JSP engine 1.1" in your nmap output it means it's an Apache HTTP server with mod_jk loaded so it is not AJP but HTTP. AJP usually is exposed on port 8009 and nmap will tell you 'Apache Jserv (Protocol v1.3)' instead.

AJPy only uses the AJP protocol, not the HTTP which is already supported by, any other web tool I would say.

from ajpy.

admpri avatar admpri commented on June 10, 2024

oh, it is all my fault, I thought they were the same.
Thank you very much!

from ajpy.

Related Issues (17)

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.