Commit Graph

541 Commits (744)

Author SHA1 Message Date
Tom King 394b7a545e Merge remote-tracking branch 'upstream/master' into feature/tagdelete_searchsg 2020-02-13 16:27:24 +00:00
Raphaël Vinot 3bfa202bfb new: Add decay score in search query 2020-01-30 14:05:02 +01:00
Raphaël Vinot 864d294294 chg: Support dict in tag/untag 2020-01-30 11:07:49 +01:00
Raphaël Vinot b0e95fd5af chg: Refactorize typing, validate 2020-01-23 10:27:40 +01:00
AaronK c0d375473a
Update api.py
minor typo, can;t help it noticing those. sorry,
2020-01-15 17:26:08 +01:00
Raphaël Vinot aa17663b58 chg: Add more typing information 2020-01-03 15:42:15 +01:00
Raphaël Vinot 24a8f90ea8 new: Remove python < 3.6 support. 2019-12-18 14:45:14 +01:00
Raphaël Vinot 11d7ede2a2 fix: remote_describe_types response was invalid 2019-10-17 10:53:07 +02:00
Marc Hoersken 1f4a475f48 Remove unused MISPFileCache from PyMISP class 2019-10-12 17:44:55 +02:00
Raphaël Vinot 82abf4c801 fix: Remove overwrite of remote_describe_types 2019-10-12 16:48:44 +02:00
Raphaël Vinot 2785d0027d fix: [Python2] Use LRU cache decorator, fix call to describe_types in PyMISP 2019-10-10 10:15:23 +02:00
Raphaël Vinot 02659a5782 chg: Add support for rapidjson, refactoring and code cleanup. 2019-10-09 16:07:40 +02:00
Raphaël Vinot f312f87072 fix: Objects helpers were broken, do not overwrite describe_types 2019-10-08 09:28:33 +02:00
Raphaël Vinot 3bb220c94b chg: Cleanups and improvements 2019-10-08 08:15:56 +02:00
Raphaël Vinot 6303c6c6a9 Merge branch 'template-cache' of https://github.com/mback2k/PyMISP into mback2k-template-cache 2019-10-06 13:08:39 -06:00
Marc Hoersken e05c7d9b4f Cache JSON definitions in memory LFU cache provided by cachetools
- Path and modified time of JSON file are used as the cache key
- Global state is hidden away inside a root-class for re-use
- Maximum size is 150 considering the number of JSON definitions

During my tests the memory usage of the test suites was halved.
2019-10-03 19:30:57 +02:00
Raphaël Vinot 7324ae72e6 new: Better handling of delete(d) attributes
* Hard delete on attribute
* Get the deleted attributes within an event
2019-09-13 16:12:45 +02:00
Raphaël Vinot a6dae9467b chg: Use default for warnings
fix: #453
2019-09-13 14:32:48 +02:00
Raphaël Vinot 4d45587dc5 fix: [deprecation] Wrong deprecation message
Also, deprecated method was broken.

Fix #424
2019-07-22 15:18:25 +02:00
Raphaël Vinot 9d0be8d3f0 new: Add option to locally expand malware samples with LIEF 2019-07-18 14:05:08 +02:00
Raphaël Vinot 2d0d36e578 chg: Improve deprecation message on PyMISP 2019-07-17 17:12:28 +02:00
Raphaël Vinot c9d58dad8a chg: Deprecate everything in PyMISP 2019-07-17 11:44:55 +02:00
Raphaël Vinot 9f53426202
Merge pull request #408 from tomking2/master
Introduce ability to create a sharing group
2019-07-04 10:59:33 +02:00
Tom King fcfe058509 chg: Allow for deletion of security group 2019-06-20 09:11:51 +01:00
Tom King 709ba2c29c chg: Remove roaming as it can't be set in this request 2019-06-19 10:40:15 +01:00
Tom King ffcc7e0631 new: Introduce ability to create a sharing group 2019-06-19 10:25:34 +01:00
mokaddem 98ce3f803e fix: [direct_call] Allows the response type to be something else than a
JSON (e.g. csv).
2019-05-22 11:55:03 +02:00
Jeroen Pinoy 309b767864 Added includeWarninglistHits as a possible filter for the event level restsearch. 2019-05-12 01:08:21 +02:00
hrifflet 56f80960f2 Resolve issue with change_sharing_group which do not update event successfully. 2019-04-30 15:12:08 +00:00
Christophe Vandeplas bd758f06c1 new: Allow custom user-agent 2019-04-30 11:42:46 +02:00
Steve Clement b6dc0a196b fix: [typo] Fixed a small typo I noticed in the docs. 2019-04-16 09:07:57 +09:00
Raphaël Vinot 633f75db24 new: Improve python3.6+ lib 2019-04-11 23:13:15 +02:00
Raphaël Vinot 3fb54e62b2 new: Default to "me" in the get_user method, update ExpandedPyMISP
Fix #377
2019-04-04 14:37:17 +02:00
Jacco Ligthart 00bce80bdb
fix for "'NoneType' object has no attribute 'setdefault'" 2019-03-11 13:12:29 +01:00
Raphaël Vinot ea6aeff4e1 fix: Allow to use global variables HTTP_PROXY and HTTPS_PROXY again
Fix #365
2019-03-11 11:56:56 +01:00
Raphaël Vinot ec6439ce34 fix: Slight changes in new .change_disable_correlation method 2019-03-11 11:32:54 +01:00
Raphaël Vinot e73bdc765e Merge branch 'master' of https://github.com/l3m0ntr33/PyMISP into l3m0ntr33-master 2019-03-11 11:07:47 +01:00
Raphaël Vinot c592bfcca9 fix: get_object_template_id was broken. Add test case.
Fix #361
2019-03-11 10:15:45 +01:00
hrifflet e91d4a7d2d Add new function PyMISP.change_disablecorrelation(attribute_uuid,disable_correlation) to be able to enable/disable correlation on attributes. 2019-03-08 11:33:33 +00:00
Raphaël Vinot e688a3e99f fix: properly pass the auth parameter to the request 2019-02-27 21:38:31 -08:00
Raphaël Vinot fc3958ace2 Merge branch 'master' of github.com:MISP/PyMISP 2019-02-27 11:14:14 -08:00
Raphaël Vinot 4d792bd7a5 new: add auth parameter to pass to python-requests 2019-02-27 11:13:43 -08:00
Hannah Ward c5e5ad5050
fix: URLJoin condition for double quotes 2019-02-21 13:15:24 +00:00
Hannah Ward 731acea4dc
fix: Do not override sub-path from root URL 2019-02-21 13:11:33 +00:00
Raphaël Vinot bd74a11e2f fix: Copy event dictionary when creating a MISPEvent
Fix #321
2019-02-13 00:12:49 +01:00
Raphaël Vinot 5afdcb5709 fix: Wrong documentation on PyMISP.search_sightings
Fix #336
2019-02-07 16:25:49 +01:00
Raphaël Vinot ec60442491 fix: Fix dependencies for py2 2019-02-06 11:53:37 +01:00
Armīns Palms feb13bb5f8 Search function fix to comply new version of MISP 2019-02-04 14:27:20 +02:00
Armīns Palms 13ffef2c6f Check if IOC values are in warninglist 2019-02-01 15:43:01 +02:00
Raphaël Vinot 91f3414cfe fix: Documentation error fix #278 2019-01-22 14:06:03 +01:00
Raphaël Vinot 362e324389 fix: Still support simple event dict content 2019-01-22 11:10:27 +01:00
Raphaël Vinot 4c60ed7e95 fix: Don't modify event passed to the add_attribute methods
fix #321
2019-01-22 11:07:06 +01:00
Tom King db7320ff03 chg: Add support for sharing group filter for search_index 2019-01-16 15:53:38 +00:00
Tom King 545d5cc1b7 Merge remote-tracking branch 'upstream/master' 2019-01-16 15:51:57 +00:00
Raphaël Vinot 9365f801d4
fix: Typo 2018-12-19 10:50:50 +01:00
Raphaël Vinot 5de57816dd chg: Pass all parameters to the search API. 2018-12-18 15:29:40 +01:00
Raphaël Vinot 8ead1bea5e Merge branch 'master' of github.com:MISP/PyMISP 2018-12-18 11:04:39 +01:00
Raphaël Vinot a09915d850 chg: Remove compat for MISP 2.4.52, cleanup. 2018-12-18 11:04:36 +01:00
Raphaël Vinot 14921ea30b
Merge pull request #257 from mokaddem/usersStatistics
new: [usersStats] Possibility to fetch users/statistics
2018-12-17 19:37:54 +01:00
Christophe Vandeplas 486017d345 fix: get_object_template_id 2018-12-09 13:26:43 +01:00
DragonDev1906 5c72dc9c33 dded get_object & get_attribute 2018-12-06 14:26:23 +01:00
Tom King d3f38ce092 chg: Support for Payload Delivery > Other attribute as PyMISP function 2018-11-28 14:27:16 +00:00
Dawid Czarnecki 7ea50075e4 chg: Include proposals in attributes search
Add includeProposals param to the search method
2018-11-28 10:05:26 +01:00
Raphaël Vinot 0770a15659 new: search_index in ExpandedPyMISP, cleanup, update jupyter 2018-11-22 14:29:07 +01:00
Raphaël Vinot 3113fcad55 chg: Fixes & update Jupyter 2018-11-20 01:39:20 +01:00
Raphaël Vinot 2c0da24437 new: Add log search 2018-11-20 01:21:06 +01:00
Raphaël Vinot 47229077f0 Merge branch 'master' of github.com:MISP/PyMISP 2018-11-09 10:56:08 +01:00
Raphaël Vinot bc8a397752 new: change_distribution method
Fix: #294
2018-11-09 10:55:27 +01:00
Nils Kuhnert a92e2a2d43
Fixes date parameters for search_index() function 2018-11-08 08:51:20 +01:00
Raphaël Vinot 8d33e20721 new: Add test cases for sightings, cleanup 2018-10-31 16:42:01 +01:00
Sami Mokaddem 7975c03774 new: [sighting] Added support of sighting REST API 2018-10-23 18:23:11 +02:00
Raphaël Vinot 220b7bffff new: direct_call without data means GET 2018-10-09 14:44:07 +02:00
Raphaël Vinot 6bf904f6ce chg: allow to pass a json string to direct_call 2018-10-09 14:28:50 +02:00
Raphaël Vinot af56ab6bb8 fix: direct call & add example 2018-10-09 14:19:07 +02:00
Raphaël Vinot 9a2610a61f chg: More test cases 2018-10-05 17:45:12 +02:00
netjinho 2fa56348e5 Fixed leaked taxonomy tags problem 2018-10-04 19:31:46 +02:00
netjinho cda68b3f44 Added some getters and setters for taxonomies, warninglists, noticelists and tags & documentation 2018-10-04 19:03:24 +02:00
Raphaël Vinot 1445a9908d new: Add direct call to just post data on a URL 2018-10-04 09:19:48 +02:00
Raphaël Vinot 1e7f7b783e Merge branch 'master' of https://github.com/netjinho/PyMISP into netjinho-master 2018-09-29 15:17:17 -04:00
netjinho ef087a9572 Added update_galaxies and update_taxonomies 2018-09-28 18:14:27 +02:00
root e3bd073be6 add: Advanced Extraction to upload_sample 2018-09-28 17:43:19 +02:00
Raphaël Vinot 6cee5ee66f add: update noticelists and object templates 2018-09-25 11:15:38 -04:00
Raphaël Vinot b95fdf9218 new: Update warninglists 2018-09-25 10:32:32 -04:00
Steffen Sauler d8ef2559c6
Fix #270 uniquely identifying sample 2018-09-05 15:29:26 +02:00
Raphaël Vinot f4c0b92305 fix: jerry rig support for old python 2018-08-28 16:30:34 -04:00
Raphaël Vinot 981e08a9ae new: Add helpers for new server related APIs
Fix #266
2018-08-26 23:41:59 -04:00
Sami Mokaddem 06b829e781 new: [usersStats] Possibility to fetch users/statistics data for all
context (usage, org, tags, ...)
2018-08-13 12:10:15 +02:00
Alexandre Dulaunoy 6aafda171a
Merge pull request #251 from tomking2/master
chg: Added email-header attribute
2018-08-09 22:55:51 +02:00
Raphaël Vinot fcb83f7318 new: Reworking the REST API (WiP) 2018-08-09 18:12:05 +02:00
Raphaël Vinot 3b42497967 fix: Opening the json blobs as bytes was buggy 2018-08-08 10:18:51 +02:00
Raphaël Vinot e2ddb48f18 chg: Open all json files as bytes before loading in json 2018-08-07 16:52:50 +02:00
Raphaël Vinot c2320404dd fix: Allow boolean parameters in search_index 2018-07-16 15:01:50 +02:00
Raphaël Vinot a81d2574fe fix: Bad URL in get_attachment
Fix #240
2018-07-16 13:46:29 +02:00
Tom King 10e880a469 chg: Added email-header attribute 2018-07-12 11:12:48 +01:00
Tobias Mainka 23b16e96b2 enabled published search parameter for attributes controler 2018-06-28 10:43:21 +02:00
Paul Stark e956860449 new:Add the ability to add Other attributes via the API 2018-06-20 09:54:00 -04:00
Steffen Sauler 26fa04428d
Added unzip-flag
added: download_samples(..., unzip=True)
2018-06-12 16:16:40 +02:00
Xavier Mehrenberger a5800f84db
chg: fix sample retrieval from new-style zips 2018-06-08 10:47:08 +02:00
Raphaël Vinot 558c692920 chg: Raise an exception if the response is not in JSON 2018-06-07 11:13:51 +02:00
Raphaël Vinot 977400b544 fix: index out of range in add_object 2018-06-05 17:37:49 +02:00
iso 20a3404144 fix: Correct docstring of search method 2018-06-03 22:54:27 +09:00
Raphaël Vinot 8c4889cc69 Fix issue when adding multiple attributes and the instance is too slow.
Fix: https://github.com/MISP/MISP/issues/3293
2018-05-30 15:41:09 +02:00
Raphaël Vinot c99fef2129 fix: Response data type mismatch in _send_attributes()
Fix #206
2018-05-30 15:27:20 +02:00
Raphaël Vinot e7359504f3 new: Add edit_object, simplify add_object 2018-05-08 11:43:27 +02:00
Raphaël Vinot e568a0cf00 fix: Typo in the *feed methods 2018-04-26 14:43:21 +02:00
Raphaël Vinot 21f1a64293 chg: normalize the RestResponse calls. 2018-04-25 16:44:00 +02:00
Raphaël Vinot c89d70140d new: Add more feed management methods
Fix #221
2018-04-25 11:06:07 +02:00
Raphaël Vinot 36e7e5aedd new: Add update_attribute method 2018-04-21 16:29:38 +02:00
Raphaël Vinot 5ca97d165c new: Add event_timestamp to REST search
Fix #220
2018-04-12 10:43:21 +02:00
Paul Stark 43f167d934 Add the ability to add an Autonomous System(AS) via the API 2018-03-30 11:33:30 -04:00
Raphaël Vinot 0a4860b481
Merge pull request #210 from mlodic/master
added change_analysis_status API
2018-03-27 10:04:02 +02:00
user 1503508c16 Fix add_named_attribute regression, update add_named_attribute.py example 2018-03-26 17:37:02 +02:00
Raphaël Vinot 9e44ec6616 fix: Properly create fail2ban object 2018-03-26 17:03:16 +02:00
Matteo Lodi 84adf0f708 added change_analysis_status API 2018-03-26 16:38:26 +02:00
Richard van den Berg 079048545c Point to right anchor for client side certificates 2018-02-26 17:04:38 +01:00
ANSSI-BSO-D 9087768b1d
add search on sighting
added the possibility to search sightings : 
Here some example : 
```python
print(misp.sighting_list(424242))
```
The answer will give a sighting list corresponding to the attribute 424242.
```python
print(misp.sighting_list(element_id=42, org_id=2, scope=event))
```
The return will be a sighting list of event 42 with a filter for organisation 2.
2018-02-21 15:12:26 +01:00
Raphaël Vinot cd6b596574 new: APIs to manage sharing groups
Fix #185
2018-02-13 11:25:05 +01:00
Raphaël Vinot 3e8e588846 new: returnMetaAttributes flag for freeTextImport API
Fix #188
2018-02-13 10:50:51 +01:00
Raphaël Vinot 05bbfac658 fix: Encode string in _encode_file_to_upload 2018-01-29 10:30:37 +01:00
Raphaël Vinot 837372cf3e fix: Allow to pass value, UUID, or ID to a sighting. 2018-01-25 16:24:24 +01:00
Raphaël Vinot 076393d55e add: Allow to fetch warninglists
Fix #180
2018-01-25 16:02:58 +01:00
Kory Kyzar 914ac84194 Linting 2018-01-19 15:44:10 -06:00
Kory Kyzar c797f4dfc4 Bug fix 2018-01-19 13:46:04 -06:00
Kory Kyzar 788a7842fa Change in add_attachment. Allow explicit attachment naming 2018-01-19 13:27:49 -06:00
Armīns Palms 9158985f3f Change in new_tag function. Added attributie 'hide_tag' 2018-01-19 16:57:40 +02:00
Armīns Palms aaf18fa3c8 Change the comment of attribute 2018-01-18 15:17:52 +02:00
Raphaël Vinot c862800df2 fix: add_hashes was broken
Fix #174
2018-01-12 18:47:50 +01:00
Raphaël Vinot baa617aae4 fix: Download old samples was broken. 2018-01-10 23:39:27 +01:00
AninaAntonie 72597c1b8a
set_sightings
Maybe I didn't use it correctly but the method set_sightings didn't work for me. It's working now but I'm not sure whether sending a request for every sighting in the list is the best solution.
2017-12-28 10:17:57 +01:00
Raphaël Vinot 8013e90e40 fix: Typo in set_sightings
Fix #161
2017-12-27 14:25:12 +01:00
Raphaël Vinot 4708786959 chg: Add MISPSighting class. 2017-12-26 17:13:57 +01:00
Raphaël Vinot e8e13f3218 chg: Update documentation 2017-12-22 17:22:07 +01:00
Raphaël Vinot a497613a85 chg: Update documentation, cleanup 2017-12-22 14:49:14 +01:00
Raphaël Vinot 9e9bad731d new: Add last field to get_csv 2017-12-21 17:25:12 +01:00
Raphaël Vinot 892ebbf077 chg: Add __repr__ methods (fix last commit) 2017-12-15 17:34:54 +01:00
Raphaël Vinot 19a50a7ba7 chg: Use new format for filtering. 2017-12-14 11:06:52 +01:00
Raphaël Vinot 6db31b397a new: Add methods to get taxonomy(ies)
Thanks to @truckydev
2017-12-13 16:43:21 +01:00
Raphaël Vinot 6c4e2b2861
Merge pull request #150 from sdrees/first-friendly-contribution-enhance-coverage
First friendly contribution enhance coverage
2017-12-13 15:47:43 +01:00
Raphaël Vinot 5cbcc09d7d new: Add method to get all the events modified in an interval 2017-12-11 15:01:25 +01:00
Raphaël Vinot 9f8f15fb2b Merge branch 'get_last_modified_event' of https://github.com/truckydev/PyMISP into truckydev-get_last_modified_event 2017-12-11 14:03:37 +01:00
Stefan Hagen (Individual) e7f395a92c enhance coverage and fix en passant with focus on api 2017-12-11 14:00:43 +01:00
StrayLightning 748be6a093 Improve the exception message for a server 500+ response with no response content 2017-12-05 18:04:11 +00:00
StrayLightning 8a8b0c113d Check for zero-length 500 response from the server and produce a suitable error message
In experimenting with PyMISP I am triggering problems on the server I
am using.  Occasionally the server will return a 500 response with a
message indicating an internal error, but more often than not it returns
a 500 response with no contents, and _check_response falls over itself,
generating hard-to-fathom exception from the json internals.

This commit hardens _check_response by detecting zero-length responses
and raising a suitable exception.

Also fix a missing bracket in one of the subsequent exception strings.
2017-12-05 17:44:15 +00:00
Raphaël Vinot 5e931ffde7
Merge pull request #144 from c-goes/objects_delete
allow deletion of objects and object references
2017-12-02 21:36:44 +01:00
Raphaël Vinot be65733d73 chg: Do not get the event from the server before publishing if PyMISP.publish gets an ID 2017-12-01 16:47:06 +01:00
Raphaël Vinot f4439ae970 chg: Add live tests for recommended pymisp version and describeTypes up-to-date 2017-12-01 16:15:46 +01:00
Raphaël Vinot 9a2b82a2ae chg: Add a way to check if the ACL is up-to-date 2017-12-01 14:35:19 +01:00
Raphaël Vinot eb5cf6c06c chg: Add validators for describeTypes on the live instance 2017-12-01 14:02:04 +01:00
Raphaël Vinot 9c7923fe0a new: Add get CSV method. 2017-12-01 12:01:42 +01:00
Tristan METAYER 60f3111f47 - Correction for 'last' param.
'last' gives the latest events that have been published
- add get_events_last_modified()
this function returns the modified events based on timestamp
2017-11-29 16:46:41 +01:00