question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how to implement it in python?

See original GitHub issue

https://gist.github.com/senaps/df18fe3cade2dd5557b1e990da29768c

this is how im trying to implement the appsensor in a python application! anybody able to help me?

i want to send a ACE3 detect into the server, i have the ui, but it doesn’t get the logs.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jtmeltoncommented, Feb 19, 2018

Very good - responses is working! So, events and attacks are about the same level of effort - if you get attacks working, then events will work and vice versa. For events, I think the POSTed json body should look something like this:

{"user":{"username":"bob"},"detectionPoint":{"category":"Access Control","label":"ACE3","responses":[]},"timestamp":"2018-02-18T18:54:58.506Z","detectionSystem" {"detectionSystemId":"localhostme", "ipAddress":"10.20.30.40"}}

The content type is going to be JSON. If you want a lot of detail, you can see the following link: http://appsensor.org/docs/v2.3.0/api/ui/index.html#!/RestRequestHandler/resource_RestRequestHandler_addEvent_POST . It should give you details of the post for events, and the post for attacks can be seen on the same page. Hope this helps.

1reaction
jtmeltoncommented, Feb 18, 2018

@senaps Thanks for reaching out. Can you post the actual http request/response/error you’re seeing? Usually the issue is that people are not adding the header, but it looks like you’ve got that setup properly. I usually recommend people try to access /api/v1.0/responses as that just takes a get request (https://github.com/jtmelton/appsensor/blob/master/execution-modes/appsensor-ws-rest-server/src/main/java/org/owasp/appsensor/handler/RestRequestHandler.java). It does require a param, so ?earliest=SomeRFC3339Timestamp should be added (see http://henry.precheur.org/projects/rfc3339). Hope this helps.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PythonImplementations - Python Wiki
An "implementation" of Python should be taken to mean a program or environment which provides support for the execution of programs written ...
Read more >
Implementing an Interface in Python - Real Python
In this tutorial, you'll see how you can use a Python interface to help determine what class you should use to tackle the...
Read more >
How to Get Started With Python? - Programiz
The Easiest Way to Run Python · Download Thonny IDE. · Run the installer to install Thonny on your computer. · Go to:...
Read more >
Understanding Python Implementations | by Shashwat Singh
An “implementation” of Python should be taken to mean a program or environment which provides support for the execution of programs written ...
Read more >
Override Python's 'in' operator? - Stack Overflow
If you don't overload __contains__ python would use __iter__ (if it's overloaded) to check whether or not your data structure contains specified value....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found