Skip to content

Commit

Permalink
#604 force python3 in all analyzers and responders
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeleonard committed Feb 9, 2020
1 parent 8bc03a4 commit 5d49d28
Show file tree
Hide file tree
Showing 47 changed files with 47 additions and 47 deletions.
2 changes: 1 addition & 1 deletion analyzers/Autofocus/analyzer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8
from autofocus import AutoFocusAPI, AFSample, AFServerError, AFClientError, AFSampleAbsent
from cortexutils.analyzer import Analyzer
Expand Down
2 changes: 1 addition & 1 deletion analyzers/BackscatterIO/backscatter-io.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from backscatter import Backscatter
from collections import defaultdict, OrderedDict
Expand Down
2 changes: 1 addition & 1 deletion analyzers/C1fApp/cifquery.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8
import json
import requests
Expand Down
2 changes: 1 addition & 1 deletion analyzers/CIRCLPassiveDNS/circl_passivedns.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import pypdns
from cortexutils.analyzer import Analyzer

Expand Down
2 changes: 1 addition & 1 deletion analyzers/CIRCLPassiveSSL/circl_passivessl.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import pypssl
from cortexutils.analyzer import Analyzer

Expand Down
2 changes: 1 addition & 1 deletion analyzers/Crtsh/crtshquery.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8

import requests
Expand Down
2 changes: 1 addition & 1 deletion analyzers/CuckooSandbox/cuckoosandbox_analyzer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8

from cortexutils.analyzer import Analyzer
Expand Down
2 changes: 1 addition & 1 deletion analyzers/CyberCrime-Tracker/cct.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from cortexutils.analyzer import Analyzer
from cybercrimetracker.cybercrimeTrackerAPI import cybercrimeTrackerAPI
Expand Down
2 changes: 1 addition & 1 deletion analyzers/Cyberprotect/CyberprotectAnalyzer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8

import requests
Expand Down
2 changes: 1 addition & 1 deletion analyzers/DNSDB/dnsdb.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8
import datetime
from urllib2 import HTTPError
Expand Down
2 changes: 1 addition & 1 deletion analyzers/DNSSinkhole/dnssinkhole.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import dns.resolver
from cortexutils.analyzer import Analyzer

Expand Down
2 changes: 1 addition & 1 deletion analyzers/DomainTools/domaintools_analyzer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8

from domaintools.exceptions import NotFoundException
Expand Down
2 changes: 1 addition & 1 deletion analyzers/EmergingThreats/emergingthreats_analyzer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8

from cortexutils.analyzer import Analyzer
Expand Down
2 changes: 1 addition & 1 deletion analyzers/FireEyeiSight/fireeyeisight_lookup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8
import requests
import hashlib
Expand Down
2 changes: 1 addition & 1 deletion analyzers/FireHOLBlocklists/firehol_blocklists.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

import ipaddress
import os
Expand Down
2 changes: 1 addition & 1 deletion analyzers/Fortiguard/urlcategory.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8


Expand Down
2 changes: 1 addition & 1 deletion analyzers/GoogleSafebrowsing/safebrowsing_analyzer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

import safebrowsing
from cortexutils.analyzer import Analyzer
Expand Down
2 changes: 1 addition & 1 deletion analyzers/GreyNoise/greynoise.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import requests
Expand Down
2 changes: 1 addition & 1 deletion analyzers/Hashdd/Hashdd.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8
import requests
from cortexutils.analyzer import Analyzer
Expand Down
2 changes: 1 addition & 1 deletion analyzers/Hippocampe/hippo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8
import sys
import json
Expand Down
2 changes: 1 addition & 1 deletion analyzers/Hunterio/hunterio_analyzer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8

import requests
Expand Down
2 changes: 1 addition & 1 deletion analyzers/HybridAnalysis/HybridAnalysis_analyzer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
According to data from official site [1], VxStream Sandbox Public API allows you to analyze:
Expand Down
2 changes: 1 addition & 1 deletion analyzers/IBMXForce/ibmxforce_lookup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8
import requests
from datetime import datetime
Expand Down
2 changes: 1 addition & 1 deletion analyzers/MISPWarningLists/mispwarninglists.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import io
import json
import requests
Expand Down
2 changes: 1 addition & 1 deletion analyzers/Maltiverse/maltiverse-client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8
import sys
import time
Expand Down
2 changes: 1 addition & 1 deletion analyzers/MnemonicPDNS/pdns.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8

import requests
Expand Down
2 changes: 1 addition & 1 deletion analyzers/Nessus/nessus.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8

import time
Expand Down
2 changes: 1 addition & 1 deletion analyzers/OTXQuery/otxquery.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8
import json
import requests
Expand Down
2 changes: 1 addition & 1 deletion analyzers/PassiveTotal/passivetotal_analyzer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8

from cortexutils.analyzer import Analyzer
Expand Down
2 changes: 1 addition & 1 deletion analyzers/Patrowl/patrowl.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8
import requests
from cortexutils.analyzer import Analyzer
Expand Down
2 changes: 1 addition & 1 deletion analyzers/PayloadSecurity/payloadsecurity_analyzer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8

from cortexutils.analyzer import Analyzer
Expand Down
2 changes: 1 addition & 1 deletion analyzers/PhishTank/phishtank_checkurl.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8
import json
import requests
Expand Down
2 changes: 1 addition & 1 deletion analyzers/PhishingInitiative/phishinginitiative_lookup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8
from cortexutils.analyzer import Analyzer
from pyeupi import PyEUPI
Expand Down
2 changes: 1 addition & 1 deletion analyzers/Pulsedive/pulsedive.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import requests

from cortexutils.analyzer import Analyzer
Expand Down
2 changes: 1 addition & 1 deletion analyzers/Robtex/robtex.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import requests
import json

Expand Down
2 changes: 1 addition & 1 deletion analyzers/SinkDB/sinkdb.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import subprocess

from cortexutils.analyzer import Analyzer
Expand Down
2 changes: 1 addition & 1 deletion analyzers/SoltraEdge/soltra.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8

import json
Expand Down
2 changes: 1 addition & 1 deletion analyzers/Threatcrowd/threatcrowd_analyzer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8

import requests
Expand Down
2 changes: 1 addition & 1 deletion analyzers/VMRay/vmray.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from cortexutils.analyzer import Analyzer
from vmrayclient import VMRayClient
from time import sleep
Expand Down
2 changes: 1 addition & 1 deletion analyzers/VirusTotal/virustotal.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8

import time
Expand Down
2 changes: 1 addition & 1 deletion analyzers/Virusshare/virusshare.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from cortexutils.analyzer import Analyzer
import io
import os
Expand Down
2 changes: 1 addition & 1 deletion analyzers/WOT/WOT_lookup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8
import json
import requests
Expand Down
2 changes: 1 addition & 1 deletion analyzers/Yara/yara_analyzer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8
from cortexutils.analyzer import Analyzer

Expand Down
2 changes: 1 addition & 1 deletion analyzers/Yeti/yeti.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import pyeti
from cortexutils.analyzer import Analyzer
Expand Down
2 changes: 1 addition & 1 deletion responders/Mailer/mailer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8

from cortexutils.responder import Responder
Expand Down
2 changes: 1 addition & 1 deletion responders/QRadarAutoClose/QRadarAutoClose.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8

# QRadarAutoClose
Expand Down
2 changes: 1 addition & 1 deletion responders/UmbrellaBlacklister/UmbrellaBlacklister.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: utf-8

from cortexutils.responder import Responder
Expand Down

2 comments on commit 5d49d28

@milesflo
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeromeleonard Did you test them all?

@mback2k
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. Some analyzers are still using for example Python 2 try..except syntax.

Please sign in to comment.