Skip to content

Commit

Permalink
refactor: remove __future__ imports (kevoreilly#879)
Browse files Browse the repository at this point in the history
* refactor: remove __future__ imports

* ci: run black
  • Loading branch information
TheMythologist authored Jun 8, 2022
1 parent 2b20d45 commit 5b3ceea
Show file tree
Hide file tree
Showing 246 changed files with 0 additions and 282 deletions.
1 change: 0 additions & 1 deletion agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import, print_function
import argparse
import cgi
import http.server
Expand Down
1 change: 0 additions & 1 deletion analyzer/linux/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import datetime
import logging
import os
Expand Down
1 change: 0 additions & 1 deletion analyzer/linux/lib/api/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import logging
import os
import subprocess
Expand Down
1 change: 0 additions & 1 deletion analyzer/linux/lib/api/screenshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import logging
import math

Expand Down
2 changes: 0 additions & 2 deletions analyzer/linux/lib/common/abstracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import

from lib.api.process import Process
from lib.common.exceptions import CuckooPackageError

Expand Down
1 change: 0 additions & 1 deletion analyzer/linux/lib/common/apicalls.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.

from __future__ import absolute_import
import logging
import os

Expand Down
1 change: 0 additions & 1 deletion analyzer/linux/lib/common/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import os
import tempfile

Expand Down
2 changes: 0 additions & 2 deletions analyzer/linux/lib/common/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import


class CuckooError(Exception):
pass
Expand Down
1 change: 0 additions & 1 deletion analyzer/linux/lib/common/hashing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import hashlib

BUFSIZE = 1024 * 1024
Expand Down
1 change: 0 additions & 1 deletion analyzer/linux/lib/common/rand.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import absolute_import
import random
import string

Expand Down
1 change: 0 additions & 1 deletion analyzer/linux/lib/common/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import logging
import os
import socket
Expand Down
1 change: 0 additions & 1 deletion analyzer/linux/lib/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import configparser


Expand Down
1 change: 0 additions & 1 deletion analyzer/linux/lib/core/packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.

from __future__ import absolute_import
import inspect
import logging
import subprocess
Expand Down
1 change: 0 additions & 1 deletion analyzer/linux/lib/core/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import logging
import os

Expand Down
1 change: 0 additions & 1 deletion analyzer/linux/modules/auxiliary/screenshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import logging
import time
from io import BytesIO
Expand Down
1 change: 0 additions & 1 deletion analyzer/linux/modules/auxiliary/stap.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import logging
import os
import subprocess
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# TODO
# https://github.com/cuckoosandbox/cuckoo/blob/ad5bf8939fb4b86d03c4d96014b174b8b56885e3/cuckoo/core/plugins.py#L29

from __future__ import absolute_import
import hashlib
import logging
import os
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/lib/api/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import base64
import contextlib
import logging
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/lib/api/screenshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import logging
import math

Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/lib/api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from __future__ import absolute_import
import logging
import socket
import subprocess
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/lib/common/abstracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import glob
import logging
import os
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/lib/common/common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import absolute_import
import logging
import os

Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/lib/common/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import os

from lib.common.rand import random_string
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/lib/common/defines.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
from ctypes import (
POINTER,
WINFUNCTYPE,
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/lib/common/rand.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import absolute_import
import random
import string

Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/lib/common/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import logging
import os
import socket
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/lib/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import configparser


Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/lib/core/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import logging
import socket
import traceback
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/lib/core/privileges.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
from ctypes import POINTER, wintypes

from lib.common.defines import (
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/lib/core/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import contextlib
import ctypes
import logging
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/modules/auxiliary/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import logging
import os
import time
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/modules/auxiliary/curtain.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import absolute_import
import logging
import os
import subprocess
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/modules/auxiliary/digisig.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import json
import locale
import logging
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/modules/auxiliary/disguise.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import io
import itertools
import logging
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/modules/auxiliary/evtx.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import absolute_import
import itertools
import logging
import os
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/modules/auxiliary/human.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import contextlib
import logging
import random
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/modules/auxiliary/screenshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import logging
import time
from io import BytesIO
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/modules/auxiliary/usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import logging
import time
from ctypes import byref, create_string_buffer, sizeof
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/modules/packages/Shellcode-Unpacker.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import logging
import os
import shutil
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/modules/packages/Shellcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import os
import shutil

Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/modules/packages/Shellcode_x64.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import os
import shutil

Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/modules/packages/UPX.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import os
import shutil

Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/modules/packages/UPX_dll.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import os
import shutil

Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/modules/packages/Unpacker_dll.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import os
import shutil

Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/modules/packages/Unpacker_js.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import os

from lib.common.abstracts import Package
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/modules/packages/Unpacker_zip.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import logging
import os
import shutil
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/modules/packages/applet.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import tempfile

from lib.common.abstracts import Package
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/modules/packages/dll.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import contextlib
import os
import shutil
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/modules/packages/exe.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import os
import shutil
from subprocess import call
Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/modules/packages/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import logging
import shutil

Expand Down
1 change: 0 additions & 1 deletion analyzer/windows/modules/packages/js.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

from __future__ import absolute_import
import os

from lib.common.abstracts import Package
Expand Down
Loading

0 comments on commit 5b3ceea

Please sign in to comment.