Git Product home page Git Product logo

api-malwr.com's Introduction

Python API for malwr.com

Usage

You can check API_example.py for advanced usage.

Import the class:

from MalwrAPI import MalwrAPI

Then, here are the different features:

Submit a sample

res = MalwrAPI(True).submit_sample('/tmp/test.txt')
print res

Submit an entire folder

res = api_unauthenticated.submit_folder('/tmp/malware/')
print res

Get recent domains

res = MalwrAPI(True).get_recent_domains()
print res 

Get public tags

res = MalwrAPI(True).get_public_tags()
print res 

Get recent analyses

res = MalwrAPI(True).get_recent_analyses()
print res 

Get latest comments

res = MalwrAPI(True).get_latest_comments()
print res 

Get search results

res = MalwrAPI(True, "LOGIN_TO_MALWR.COM","PASSWORD_TO_MALWR.COM").search("STRING_TO_SEARCH")
print res 

Get Sample report

api = MalwrAPI(True, "LOGIN_TO_MALWR.COM","PASSWORD_TO_MALWR.COM")
report = api.getReport("/analysis/path/")
print(report)
>>> {"IP": ["192.168.1.1"], "Domain":["google.com"]}

This can be used with the search function to provide a nice little search-and-retrieve.

api = MalwrAPI(True, "LOGIN_TO_MALWR.COM","PASSWORD_TO_MALWR.COM")
search = api.search("google.com")
for search_result in search:
    this_report = api.getReport(search_result["submission_url"])

Improvements

So far, the API is pretty basic and submit files anonymously (not linked to your account). Next steps are: authentication on malwr.com, add search feature.

Contributing

Code was just a quick and dirty PoC, feel free to open issues, contribute and submit your Pull Requests. You can also ping me on Twitter (@PaulWebSec)

api-malwr.com's People

Contributors

dgolak avatar floatingghost avatar leonjza avatar mehgrmlhmpf avatar paulsec avatar te-k avatar the-useless-one avatar

Watchers

 avatar

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.