vt-py icon indicating copy to clipboard operation
vt-py copied to clipboard

patch modified_attributes_only prevent attributes from being sent

Open fcosantos opened this issue 2 years ago • 1 comments

if the object has been created locally instead of retrieved:

https://github.com/VirusTotal/vt-py/blob/master/vt/client.py#L586C33-L586C57

example: image rules attribute will not be uploaded.

fcosantos avatar Aug 04 '23 13:08 fcosantos

I tool at look at this, and there's no way to do fix it in a way that makes sense for the API user. Instead you could simply do this:

with vt.Client(...) as client:
   id = '11111111'
  ruleset = vt.Object('hunting_ruleset', obj_id=id)
  ruleset.rules = 'eso'
  client.patch(...)

plusvic avatar Sep 09 '23 07:09 plusvic