@@ -0,0 +1,1747 @@
+#!/usr/local/bin/python%0A# -*- coding: utf-8 -*-%0A# Copyright %C2%A9 2019 The vt-py authors. All Rights Reserved.%0A# Licensed under the Apache License, Version 2.0 (the %22License%22);%0A# you may not use this file except in compliance with the License.%0A# You may obtain a copy of the License at%0A#%0A#     http://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Unless required by applicable law or agreed to in writing, software%0A# distributed under the License is distributed on an %22AS IS%22 BASIS,%0A# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A# See the License for the specific language governing permissions and%0A# limitations under the License.%0A%0A%22%22%22%0AThis example program shows how to make VirusTotal Intelligence searches, the%0Aprogram accepts a query a prints the matching files/URLs.%0A%0ANOTICE: In order to use this program you will need an API key that has%0Aprivileges for using VirusTotal Intelligence.%0A%22%22%22%0A%0Aimport argparse%0Aimport vt%0A%0A%0Adef main():%0A%0A  parser = argparse.ArgumentParser(%0A      description='Make a VirusTotal Intelligence search and prints the matching objects.')%0A%0A  parser.add_argument('query',%0A      type=str,%0A      nargs='+',%0A      help='a VirusTotal Intelligence search query.')%0A%0A  parser.add_argument('--apikey',%0A      required=True,%0A      help='your VirusTotal API key')%0A%0A  parser.add_argument('--limit',%0A      type=int,%0A      required=False,%0A      help='maximum number of objects that will be retrieved',%0A      default=50)%0A%0A  args = parser.parse_args()%0A%0A  with vt.Client(args.apikey) as client:%0A    it = client.iterator('/intelligence/search',%0A        params=%7B'query': ' '.join(args.query)%7D,%0A        limit=args.limit)%0A    for obj in it:%0A      print(%22%7B%7D:%7B%7D%22.format(obj.type, obj.id))%0A%0A%0Aif __name__ == '__main__':%0A  main()%0A

Add search example.