id int64 0 458k | file_name stringlengths 4 119 | file_path stringlengths 14 227 | content stringlengths 24 9.96M | size int64 24 9.96M | language stringclasses 1
value | extension stringclasses 14
values | total_lines int64 1 219k | avg_line_length float64 2.52 4.63M | max_line_length int64 5 9.91M | alphanum_fraction float64 0 1 | repo_name stringlengths 7 101 | repo_stars int64 100 139k | repo_forks int64 0 26.4k | repo_open_issues int64 0 2.27k | repo_license stringclasses 12
values | repo_extraction_date stringclasses 433
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12,700 | test_favicon.py | buffer_thug/tests/functional/test_favicon.py | import os
import logging
from thug.ThugAPI.ThugAPI import ThugAPI
log = logging.getLogger("Thug")
class TestFavicon(object):
cwd_path = os.path.dirname(os.path.realpath(__file__))
misc_path = os.path.join(cwd_path, os.pardir, "samples/misc")
def do_perform_test(self, caplog, sample, expected):
... | 976 | Python | .py | 25 | 30.84 | 72 | 0.630458 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,701 | test_misc_ie60.py | buffer_thug/tests/functional/test_misc_ie60.py | import os
import logging
from thug.ThugAPI.ThugAPI import ThugAPI
log = logging.getLogger("Thug")
class TestMiscSamplesIE(object):
cwd_path = os.path.dirname(os.path.realpath(__file__))
misc_path = os.path.join(cwd_path, os.pardir, "samples/misc")
def do_perform_test(self, caplog, sample, expected):
... | 37,508 | Python | .py | 782 | 37.297954 | 153 | 0.600602 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,702 | test_webtracking.py | buffer_thug/tests/functional/test_webtracking.py | import os
import logging
from thug.ThugAPI.ThugAPI import ThugAPI
log = logging.getLogger("Thug")
class TestWebTracking(object):
cwd_path = os.path.dirname(os.path.realpath(__file__))
misc_path = os.path.join(cwd_path, os.pardir, "samples/misc")
def do_perform_test(self, caplog, url, expected, type_="r... | 1,871 | Python | .py | 43 | 34.534884 | 88 | 0.612796 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,703 | test_pyhooks.py | buffer_thug/tests/functional/test_pyhooks.py | import os
import logging
from thug.ThugAPI.ThugAPI import ThugAPI
log = logging.getLogger("Thug")
class TestPyHooks(object):
cwd_path = os.path.dirname(os.path.realpath(__file__))
misc_path = os.path.join(cwd_path, os.pardir, "samples/misc")
exploits_path = os.path.join(cwd_path, os.pardir, "samples/exp... | 2,647 | Python | .py | 62 | 33.645161 | 87 | 0.601715 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,704 | test_misc_ie90.py | buffer_thug/tests/functional/test_misc_ie90.py | import os
import logging
from thug.ThugAPI.ThugAPI import ThugAPI
log = logging.getLogger("Thug")
class TestMiscSamplesIE(object):
cwd_path = os.path.dirname(os.path.realpath(__file__))
misc_path = os.path.join(cwd_path, os.pardir, "samples/misc")
def do_perform_test(self, caplog, sample, expected, nof... | 66,213 | Python | .py | 1,351 | 38.569948 | 229 | 0.610621 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,705 | test_loop_detection.py | buffer_thug/tests/functional/test_loop_detection.py | import os
import logging
from thug.ThugAPI.ThugAPI import ThugAPI
log = logging.getLogger("Thug")
class TestLoopDetection(object):
cwd_path = os.path.dirname(os.path.realpath(__file__))
misc_path = os.path.join(cwd_path, os.pardir, "samples/misc")
def do_perform_test(self, caplog, sample, expected):
... | 950 | Python | .py | 25 | 29.6 | 72 | 0.629386 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,706 | test_misc_safari.py | buffer_thug/tests/functional/test_misc_safari.py | import os
import logging
from thug.ThugAPI.ThugAPI import ThugAPI
log = logging.getLogger("Thug")
class TestMiscSamplesSafari(object):
cwd_path = os.path.dirname(os.path.realpath(__file__))
misc_path = os.path.join(cwd_path, os.pardir, "samples/misc")
def do_perform_test(self, caplog, sample, expected,... | 29,110 | Python | .py | 641 | 35.046802 | 153 | 0.594254 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,707 | test_misc_ie100.py | buffer_thug/tests/functional/test_misc_ie100.py | import os
import logging
from thug.ThugAPI.ThugAPI import ThugAPI
log = logging.getLogger("Thug")
class TestMiscSamplesIE(object):
cwd_path = os.path.dirname(os.path.realpath(__file__))
misc_path = os.path.join(cwd_path, os.pardir, "samples/misc")
def do_perform_test(self, caplog, sample, expected):
... | 35,870 | Python | .py | 756 | 36.992063 | 201 | 0.600881 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,708 | test_disabled_activex.py | buffer_thug/tests/functional/test_disabled_activex.py | import os
import logging
from thug.ThugAPI.ThugAPI import ThugAPI
log = logging.getLogger("Thug")
class TestDisabledActiveX(object):
cwd_path = os.path.dirname(os.path.realpath(__file__))
misc_path = os.path.join(cwd_path, os.pardir, "samples/misc")
def do_perform_test(self, caplog, sample, expected):
... | 1,646 | Python | .py | 39 | 33.128205 | 75 | 0.639447 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,709 | test_image_processing.py | buffer_thug/tests/functional/test_image_processing.py | import logging
from thug.ThugAPI.ThugAPI import ThugAPI
log = logging.getLogger("Thug")
class TestImageProcessing(object):
def do_perform_test(self, caplog, url, expected, type_="remote"):
thug = ThugAPI()
thug.set_useragent("win7ie90")
thug.set_ssl_verify()
thug.reset_image_pro... | 1,124 | Python | .py | 28 | 31.392857 | 83 | 0.624192 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,710 | test_file_api.py | buffer_thug/tests/functional/test_file_api.py | import os
import logging
from thug.ThugAPI.ThugAPI import ThugAPI
log = logging.getLogger("Thug")
class TestFileAPI(object):
cwd_path = os.path.dirname(os.path.realpath(__file__))
misc_path = os.path.join(cwd_path, os.pardir, "samples/misc")
def do_perform_test(self, caplog, sample, expected):
... | 1,445 | Python | .py | 37 | 29.675676 | 74 | 0.58967 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,711 | test_silverlight.py | buffer_thug/tests/functional/test_silverlight.py | import os
import logging
from thug.ThugAPI.ThugAPI import ThugAPI
log = logging.getLogger("Thug")
class TestSilverLight(object):
cwd_path = os.path.dirname(os.path.realpath(__file__))
misc_path = os.path.join(cwd_path, os.pardir, "samples/misc")
def do_perform_test(self, caplog, sample, silverlight, ex... | 1,163 | Python | .py | 30 | 30.1 | 69 | 0.629133 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,712 | test_adobereader.py | buffer_thug/tests/functional/test_adobereader.py | import os
import logging
from thug.ThugAPI.ThugAPI import ThugAPI
log = logging.getLogger("Thug")
class TestAdobeReader(object):
cwd_path = os.path.dirname(os.path.realpath(__file__))
misc_path = os.path.join(cwd_path, os.pardir, "samples/misc")
def do_perform_test(self, caplog, sample, adobe, expected... | 1,693 | Python | .py | 40 | 33.575 | 80 | 0.616514 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,713 | test_extensive.py | buffer_thug/tests/functional/test_extensive.py | import os
import logging
from thug.ThugAPI.ThugAPI import ThugAPI
log = logging.getLogger("Thug")
class TestExtensive(object):
cwd_path = os.path.dirname(os.path.realpath(__file__))
misc_path = os.path.join(cwd_path, os.pardir, "samples/misc")
def do_perform_test(self, caplog, sample, expected):
... | 3,545 | Python | .py | 88 | 31.215909 | 137 | 0.616282 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,714 | test_brokenurl.py | buffer_thug/tests/functional/test_brokenurl.py | import logging
from thug.ThugAPI.ThugAPI import ThugAPI
log = logging.getLogger("Thug")
class TestBrokenURL(object):
def do_perform_test(self, caplog, url, expected):
thug = ThugAPI()
thug.set_useragent("win7ie90")
thug.set_broken_url()
thug.set_ssl_verify()
thug.log_ini... | 1,101 | Python | .py | 30 | 27.633333 | 83 | 0.599811 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,715 | test_mimehandler.py | buffer_thug/tests/functional/test_mimehandler.py | import os
from thug.ThugAPI.ThugAPI import ThugAPI
class TestMIMEHandler(object):
cwd_path = os.path.dirname(os.path.realpath(__file__))
misc_path = os.path.join(cwd_path, os.pardir, "samples/misc")
def do_perform_test(self, caplog, url, expected, type_="remote"):
thug = ThugAPI()
thug.... | 1,302 | Python | .py | 32 | 31.53125 | 85 | 0.609387 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,716 | test_asyncprefetch.py | buffer_thug/tests/functional/test_asyncprefetch.py | import os
import logging
from thug.ThugAPI.ThugAPI import ThugAPI
log = logging.getLogger("Thug")
class TestAsyncPrefetch:
cwd_path = os.path.dirname(os.path.realpath(__file__))
misc_path = os.path.join(cwd_path, os.pardir, "samples/misc")
def do_perform_test(self, caplog, url, expected, type_="remote"... | 1,282 | Python | .py | 36 | 27.055556 | 77 | 0.606969 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,717 | test_features.py | buffer_thug/tests/functional/test_features.py | import os
import json
import logging
from thug.ThugAPI.ThugAPI import ThugAPI
log = logging.getLogger("Thug")
class TestFeatures(object):
cwd_path = os.path.dirname(os.path.realpath(__file__))
features_path = os.path.join(cwd_path, os.pardir, "samples/features")
expected_path = os.path.join(cwd_path, "f... | 3,994 | Python | .py | 92 | 34.565217 | 73 | 0.638056 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,718 | test_misc_chrome.py | buffer_thug/tests/functional/test_misc_chrome.py | import os
import logging
from thug.ThugAPI.ThugAPI import ThugAPI
log = logging.getLogger("Thug")
class TestMiscSamplesChrome(object):
cwd_path = os.path.dirname(os.path.realpath(__file__))
misc_path = os.path.join(cwd_path, os.pardir, "samples/misc")
def do_perform_test(self, caplog, sample, expected)... | 30,026 | Python | .py | 662 | 35.009063 | 153 | 0.594854 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,719 | test_Encoding.py | buffer_thug/tests/Encoding/test_Encoding.py | # coding=utf-8
from thug.Encoding.Encoding import Encoding
encoding = Encoding()
class TestEncoding:
def test_string(self):
result = encoding.detect("sample-content")
assert result["encoding"] in ("ascii",)
def test_unicode(self):
result = encoding.detect("sample-content")
a... | 616 | Python | .py | 16 | 31.8125 | 51 | 0.650255 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,720 | test_BaseLogging.py | buffer_thug/tests/Logging/test_BaseLogging.py | import os
import shutil
import logging
import configparser
import pytest
import thug
from thug.Logging.BaseLogging import BaseLogging
from thug.ThugAPI.ThugOpts import ThugOpts
configuration_path = thug.__configuration_path__
config = configparser.ConfigParser()
conf_file = os.path.join(configuration_path, "thug.con... | 2,280 | Python | .py | 58 | 32.534483 | 84 | 0.692238 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,721 | test_LoggingModules.py | buffer_thug/tests/Logging/test_LoggingModules.py | import thug.Logging.LoggingModules as log_modules
class TestLoggingModules:
def test_json(self):
assert log_modules.LoggingModules["json"] is log_modules.JSON.JSON
def test_mongodb(self):
assert log_modules.LoggingModules["mongodb"] is log_modules.MongoDB.MongoDB
def test_elasticsearch(s... | 464 | Python | .py | 11 | 34.636364 | 83 | 0.714922 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,722 | test_ThugLogging.py | buffer_thug/tests/Logging/test_ThugLogging.py | import os
import logging
import thug
from thug.ThugAPI.ThugOpts import ThugOpts
from thug.DOM.HTTPSession import HTTPSession
from thug.Logging.ThugLogging import ThugLogging
from thug.Classifier.URLClassifier import URLClassifier
from thug.Classifier.SampleClassifier import SampleClassifier
configuration_path = thug.... | 5,111 | Python | .py | 118 | 35.872881 | 86 | 0.667743 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,723 | test_SampleLogging.py | buffer_thug/tests/Logging/test_SampleLogging.py | import os
from thug.Logging.SampleLogging import SampleLogging
sample_logging = SampleLogging()
class TestSampleLogging:
cwd_path = os.path.dirname(os.path.realpath(__file__))
samples_path = os.path.join(cwd_path, os.pardir, os.pardir, "tests/test_files")
pe_path = os.path.join(samples_path, "sample.ex... | 2,562 | Python | .py | 53 | 40.943396 | 88 | 0.649398 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,724 | test_Mapper.py | buffer_thug/tests/Logging/modules/test_Mapper.py | import os
import json
from thug.Logging.modules.Mapper import DictDiffer
from thug.Logging.modules.Mapper import Mapper
class TestDictDiffer:
"""
Unittests for the methods of class DictDiffer
@curr_dict: 1) Value for k1 key is changed from v2 to v1
2) k3 key is added
3) k... | 3,930 | Python | .py | 88 | 37.159091 | 81 | 0.636483 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,725 | test_JSON.py | buffer_thug/tests/Logging/modules/test_JSON.py | # coding=utf-8
import os
import io
import shutil
import logging
import thug
from thug.ThugAPI.ThugOpts import ThugOpts
from thug.Logging.modules.JSON import JSON
from thug.ThugAPI.ThugVulnModules import ThugVulnModules
from thug.Logging.ThugLogging import ThugLogging
from thug.Encoding.Encoding import Encoding
config... | 9,729 | Python | .py | 224 | 35.397321 | 85 | 0.644 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,726 | test_ElasticSearch.py | buffer_thug/tests/Logging/modules/test_ElasticSearch.py | import os
import logging
import configparser
from mock import patch
import pytest
import thug
from thug.Logging.modules.ElasticSearch import ElasticSearch
from thug.ThugAPI.ThugVulnModules import ThugVulnModules
from thug.ThugAPI.ThugOpts import ThugOpts
log = logging.getLogger("Thug")
cwd_path = os.path.dirname(o... | 3,511 | Python | .py | 82 | 36.158537 | 86 | 0.718612 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,727 | test_ExploitGraph.py | buffer_thug/tests/Logging/modules/test_ExploitGraph.py | import json
from thug.Logging.modules.ExploitGraph import ExploitGraph
class TestExploitGraph:
url = "www.example.com"
source = "www.ex1.com"
dest = "www.ex2.com"
method = "iframe"
exploit_graph = ExploitGraph(url)
def test_init(self):
assert self.exploit_graph.G.graph["url"] in (se... | 1,050 | Python | .py | 27 | 31.666667 | 78 | 0.659113 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,728 | test_MongoDB.py | buffer_thug/tests/Logging/modules/test_MongoDB.py | # coding=utf-8
import logging
import pymongo
from mock import patch
import mongomock
import thug
from thug.ThugAPI.ThugOpts import ThugOpts
from thug.Logging.modules.MongoDB import MongoDB
from thug.ThugAPI.ThugVulnModules import ThugVulnModules
from thug.Logging.ThugLogging import ThugLogging
from thug.Encoding.Enco... | 10,350 | Python | .py | 231 | 37.047619 | 85 | 0.662458 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,729 | test_ThugAPI.py | buffer_thug/tests/ThugAPI/test_ThugAPI.py | import os
import shutil
import logging
import pytest
from thug.ThugAPI.ThugAPI import ThugAPI
log = logging.getLogger("Thug")
class TestThugAPI:
thug_api = ThugAPI()
cwd_path = os.path.dirname(os.path.realpath(__file__))
samples_path = os.path.join(cwd_path, os.pardir, "test_files")
yara_file = o... | 13,174 | Python | .py | 320 | 32.075 | 88 | 0.639623 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,730 | test_Watchdog.py | buffer_thug/tests/ThugAPI/test_Watchdog.py | import logging
import time
from mock import patch
import thug
from thug.ThugAPI.ThugOpts import ThugOpts
from thug.ThugAPI.Watchdog import Watchdog
from thug.DOM.HTTPSession import HTTPSession
from thug.Logging.ThugLogging import ThugLogging
from thug.Classifier.URLClassifier import URLClassifier
from thug.Classifier... | 1,329 | Python | .py | 34 | 34.852941 | 84 | 0.75642 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,731 | test_ThugOpts.py | buffer_thug/tests/ThugAPI/test_ThugOpts.py | import pytest
import logging
import thug
from thug.ThugAPI.ThugOpts import ThugOpts
configuration_path = thug.__configuration_path__
log = logging.getLogger("Thug")
log.configuration_path = configuration_path
log.personalities_path = thug.__personalities_path__ if configuration_path else None
class TestThugOpts:
... | 5,904 | Python | .py | 151 | 30.900662 | 84 | 0.652021 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,732 | test_ThugVulnModules.py | buffer_thug/tests/ThugAPI/test_ThugVulnModules.py | from thug.ThugAPI.ThugVulnModules import ThugVulnModules
class TestThugVulnModules:
vuln_modules = ThugVulnModules()
def test_invalid_version(self):
assert not self.vuln_modules.invalid_version("1.6.0.32")
assert not self.vuln_modules.invalid_version("1")
assert self.vuln_modules.inva... | 3,144 | Python | .py | 66 | 39.666667 | 87 | 0.691225 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,733 | test_OpaqueFilter.py | buffer_thug/tests/ThugAPI/test_OpaqueFilter.py | from thug.ThugAPI.OpaqueFilter import OpaqueFilter
class TestOpaqueFilter:
opaque_filter = OpaqueFilter()
def test_filter(self):
assert not self.opaque_filter.filter("sample-record")
| 202 | Python | .py | 5 | 35.6 | 61 | 0.773196 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,734 | test_abstractmethod.py | buffer_thug/tests/ThugAPI/test_abstractmethod.py | import pytest
from thug.ThugAPI.abstractmethod import abstractmethod
class SampleClass:
@abstractmethod
def sample_method(self):
pass
def test_error():
sample = SampleClass()
with pytest.raises(NotImplementedError):
sample.sample_method()
| 276 | Python | .py | 10 | 22.9 | 54 | 0.750958 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,735 | test_java.py | buffer_thug/tests/Java/test_java.py | from thug.Java.java import java
from thug.Java.lang import lang
def test_java():
obj_java = java()
assert isinstance(obj_java.lang, lang)
| 148 | Python | .py | 5 | 26.6 | 42 | 0.744681 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,736 | test_System.py | buffer_thug/tests/Java/test_System.py | import logging
from thug.Java.System import System
from thug.ThugAPI.ThugVulnModules import ThugVulnModules
log = logging.getLogger("Thug")
log.ThugVulnModules = ThugVulnModules()
class TestSystem:
system = System()
def test_version(self):
version = self.system.getProperty("java.version")
a... | 487 | Python | .py | 13 | 32.615385 | 57 | 0.726496 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,737 | test_lang.py | buffer_thug/tests/Java/test_lang.py | from thug.Java.lang import lang
from thug.Java.System import System
def test_lang():
obj_lang = lang()
assert isinstance(obj_lang.System, System)
| 156 | Python | .py | 5 | 28.2 | 46 | 0.758389 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,738 | test_Classifiers.py | buffer_thug/tests/Classifier/test_Classifiers.py | import os
import hashlib
import logging
from thug.ThugAPI.ThugAPI import ThugAPI
log = logging.getLogger("Thug")
class TestClassifiers:
cwd_path = os.path.dirname(os.path.realpath(__file__))
samples_path = os.path.join(cwd_path, os.pardir, "samples/classifiers")
test_files_path = os.path.join(cwd_path, ... | 6,918 | Python | .py | 140 | 40.257143 | 120 | 0.653561 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,739 | thug.py | buffer_thug/thug/thug.py | #!/usr/bin/env python
#
# thug.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; with... | 19,877 | Python | .py | 492 | 26.754065 | 124 | 0.473774 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,740 | __init__.py | buffer_thug/thug/__init__.py | import os
import importlib.resources
import appdirs
__version__ = "6.9"
__jsengine__ = ""
__jsengine_version__ = ""
__global_configuration_path__ = "/etc/thug"
__user_configuration_path__ = f"{appdirs.user_config_dir()}/thug"
__package_configuration_path__ = os.path.join(importlib.resources.files("thug"), "conf")
__... | 2,203 | Python | .py | 41 | 51.902439 | 88 | 0.681691 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,741 | ContextAnalyzer.py | buffer_thug/thug/Analysis/context/ContextAnalyzer.py | #!/usr/bin/env python
#
# ContextAnalyzer.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOU... | 1,609 | Python | .py | 39 | 34.589744 | 82 | 0.689433 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,742 | Screenshot.py | buffer_thug/thug/Analysis/screenshot/Screenshot.py | import sys
import logging
import bs4
try:
import imgkit
IMGKIT_MODULE = True
except ImportError: # pragma: no cover
IMGKIT_MODULE = False
log = logging.getLogger("Thug")
class Screenshot:
content_types = ("text/html",)
def __init__(self):
self.enable = IMGKIT_MODULE
def run(self,... | 1,309 | Python | .py | 35 | 28.685714 | 78 | 0.605556 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,743 | HoneyAgent.py | buffer_thug/thug/Analysis/honeyagent/HoneyAgent.py | #!/usr/bin/env python
#
# HoneyAgent.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY... | 3,980 | Python | .py | 97 | 31.587629 | 91 | 0.608627 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,744 | Favicon.py | buffer_thug/thug/Analysis/favicon/Favicon.py | import io
import dhash
from PIL import Image
class Favicon:
@staticmethod
def eval_dhash(favicon):
try:
icon = io.BytesIO(favicon)
image = Image.open(icon)
row, col = dhash.dhash_row_col(image)
return dhash.format_hex(row, col)
except Exception... | 394 | Python | .py | 13 | 22.538462 | 73 | 0.625995 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,745 | AWIS.py | buffer_thug/thug/Analysis/awis/AWIS.py | #!/usr/bin/env python
import os
import logging
import configparser
from urllib.parse import urlparse
MYAWIS_MODULE = True
try:
import myawis
except ImportError:
MYAWIS_MODULE = False
log = logging.getLogger("Thug")
class AWIS:
def __init__(self):
self.enabled = MYAWIS_MODULE
self.__in... | 3,488 | Python | .py | 90 | 27.2 | 87 | 0.559382 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,746 | Shellcode.py | buffer_thug/thug/Analysis/shellcode/Shellcode.py | #!/usr/bin/env python
#
# Shellcode.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY;... | 8,118 | Python | .py | 213 | 27.323944 | 97 | 0.563903 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,747 | Magic.py | buffer_thug/thug/Magic/Magic.py | #!/usr/bin/env python
#
# Magic.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; wit... | 1,592 | Python | .py | 37 | 35.756757 | 128 | 0.660864 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,748 | Window.py | buffer_thug/thug/DOM/Window.py | #!/usr/bin/env python
#
# Window.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; wi... | 35,482 | Python | .py | 927 | 28.044229 | 104 | 0.596013 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,749 | ClipboardData.py | buffer_thug/thug/DOM/ClipboardData.py | #!/usr/bin/env python
#
# ClipboardData.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRA... | 1,302 | Python | .py | 36 | 31.027778 | 70 | 0.695306 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,750 | HTMLInspector.py | buffer_thug/thug/DOM/HTMLInspector.py | #!/usr/bin/env python
#
# HTMLInspector.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRA... | 2,831 | Python | .py | 74 | 29.554054 | 82 | 0.634538 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,751 | DFT.py | buffer_thug/thug/DOM/DFT.py | #!/usr/bin/env python
#
# DFT.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; witho... | 56,116 | Python | .py | 1,316 | 31.206687 | 132 | 0.577493 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,752 | Storage.py | buffer_thug/thug/DOM/Storage.py | #!/usr/bin/env python
#
# Storage.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; w... | 2,830 | Python | .py | 70 | 33.842857 | 83 | 0.675923 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,753 | Sidebar.py | buffer_thug/thug/DOM/Sidebar.py | #!/usr/bin/env python
#
# Sidebar.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; w... | 1,775 | Python | .py | 42 | 37.261905 | 88 | 0.715863 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,754 | JSEngine.py | buffer_thug/thug/DOM/JSEngine.py | #!/usr/bin/env python
#
# JSEngine.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; ... | 8,294 | Python | .py | 212 | 28.764151 | 86 | 0.564974 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,755 | Map.py | buffer_thug/thug/DOM/Map.py | #!/usr/bin/env python
#
# Map.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; witho... | 762 | Python | .py | 21 | 34.571429 | 70 | 0.765583 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,756 | JSClass.py | buffer_thug/thug/DOM/JSClass.py | import os
import collections.abc
class JSClass:
__properties__ = {}
__methods__ = {}
__watchpoints__ = {}
def __str__(self):
return self.toString()
def __getattr__(self, name):
if name == "constructor":
return JSClassConstructor(self.__class__)
if name == "pr... | 3,501 | Python | .py | 77 | 37.818182 | 115 | 0.63355 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,757 | SessionStorage.py | buffer_thug/thug/DOM/SessionStorage.py | #!/usr/bin/env python
#
# SessionStorage.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARR... | 756 | Python | .py | 20 | 36.45 | 70 | 0.785812 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,758 | History.py | buffer_thug/thug/DOM/History.py | #!/usr/bin/env python
#
# History.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; w... | 3,717 | Python | .py | 109 | 26.330275 | 87 | 0.618222 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,759 | Plugin.py | buffer_thug/thug/DOM/Plugin.py | #!/usr/bin/env python
#
# Plugin.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; wi... | 1,231 | Python | .py | 35 | 30.2 | 70 | 0.676793 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,760 | WebStore.py | buffer_thug/thug/DOM/WebStore.py | #!/usr/bin/env python
#
# WebStore.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; ... | 829 | Python | .py | 23 | 33.826087 | 70 | 0.75187 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,761 | UserProfile.py | buffer_thug/thug/DOM/UserProfile.py | #!/usr/bin/env python
#
# UserProfile.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANT... | 2,805 | Python | .py | 87 | 24.45977 | 89 | 0.619453 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,762 | SchemeHandler.py | buffer_thug/thug/DOM/SchemeHandler.py | import logging
log = logging.getLogger("Thug")
class SchemeHandler:
def __init__(self):
pass
def handle_hcp(self, window, url):
log.warning("Microsoft Internet Explorer HCP Scheme Detected")
hcp = url.split("svr=")
if len(hcp) < 2:
return
hcp = hcp[1].sp... | 1,064 | Python | .py | 28 | 28.821429 | 90 | 0.612903 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,763 | HTTPSession.py | buffer_thug/thug/DOM/HTTPSession.py | #!/usr/bin/env python
#
# HTTPSession.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANT... | 10,997 | Python | .py | 271 | 30.686347 | 87 | 0.598345 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,764 | Components.py | buffer_thug/thug/DOM/Components.py | #!/usr/bin/env python
#
# Components.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY... | 817 | Python | .py | 22 | 35.454545 | 70 | 0.768939 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,765 | AsyncPrefetcher.py | buffer_thug/thug/DOM/AsyncPrefetcher.py | #!/usr/bin/env python
#
# AsyncPrefetcher.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WAR... | 2,236 | Python | .py | 60 | 29.833333 | 87 | 0.63136 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,766 | External.py | buffer_thug/thug/DOM/External.py | #!/usr/bin/env python
#
# External.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; ... | 3,511 | Python | .py | 86 | 34.127907 | 100 | 0.696087 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,767 | LocalStorage.py | buffer_thug/thug/DOM/LocalStorage.py | #!/usr/bin/env python
#
# LocalStorage.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRAN... | 752 | Python | .py | 20 | 36.25 | 70 | 0.784636 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,768 | Chrome.py | buffer_thug/thug/DOM/Chrome.py | #!/usr/bin/env python
#
# Chrome.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; wi... | 878 | Python | .py | 24 | 34.416667 | 70 | 0.754118 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,769 | Screen.py | buffer_thug/thug/DOM/Screen.py | #!/usr/bin/env python
#
# Screen.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; wi... | 5,954 | Python | .py | 182 | 25.038462 | 81 | 0.625763 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,770 | CCInterpreter.py | buffer_thug/thug/DOM/CCInterpreter.py | #!/usr/bin/env python
#
# CCInterpreter.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRA... | 2,298 | Python | .py | 53 | 35.283019 | 86 | 0.602059 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,771 | Plugins.py | buffer_thug/thug/DOM/Plugins.py | #!/usr/bin/env python
#
# Plugins.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; w... | 1,469 | Python | .py | 45 | 26.488889 | 70 | 0.645892 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,772 | Navigator.py | buffer_thug/thug/DOM/Navigator.py | #!/usr/bin/env python
#
# Navigator.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY;... | 13,892 | Python | .py | 378 | 27.716931 | 96 | 0.617807 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,773 | Alexa.py | buffer_thug/thug/DOM/Alexa.py | #!/usr/bin/env python
#
# Alexa.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; wit... | 2,327 | Python | .py | 74 | 27.594595 | 70 | 0.647556 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,774 | JScriptEncode.py | buffer_thug/thug/DOM/JScriptEncode.py | #!/usr/bin/env python
# This code is derived from the awesome VBE Decoder authored by Didier Stevens
# and available at https://github.com/DidierStevens/DidierStevensSuite
import re
DDECODE = {}
DDECODE[9] = "\x57\x6e\x7b"
DDECODE[10] = "\x4a\x4c\x41"
DDECODE[11] = "\x0b\x0b\x0b"
DDECODE[12] = "\x0c\x0c\x0c"
DDECOD... | 5,971 | Python | .py | 213 | 25.774648 | 119 | 0.642982 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,775 | MimeType.py | buffer_thug/thug/DOM/MimeType.py | #!/usr/bin/env python
#
# MimeType.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; ... | 1,195 | Python | .py | 33 | 31.636364 | 70 | 0.689236 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,776 | w3c_bindings.py | buffer_thug/thug/DOM/w3c_bindings.py | #!/usr/bin/env python
#
# w3c_bindings.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRAN... | 4,750 | Python | .py | 108 | 39.796296 | 86 | 0.774903 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,777 | MIMEHandler.py | buffer_thug/thug/DOM/MIMEHandler.py | #!/usr/bin/env python
#
# MIMEHandler.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANT... | 18,644 | Python | .py | 472 | 29.633475 | 86 | 0.599723 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,778 | MimeTypes.py | buffer_thug/thug/DOM/MimeTypes.py | #!/usr/bin/env python
#
# MimeTypes.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY;... | 4,504 | Python | .py | 111 | 25.333333 | 86 | 0.47968 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,779 | MozConnection.py | buffer_thug/thug/DOM/MozConnection.py | #!/usr/bin/env python
#
# MozConnection.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRA... | 782 | Python | .py | 21 | 35.52381 | 70 | 0.771768 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,780 | JSInspector.py | buffer_thug/thug/DOM/JSInspector.py | #!/usr/bin/env python
#
# JSInspector.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANT... | 4,398 | Python | .py | 110 | 29.509091 | 82 | 0.590802 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,781 | Personality.py | buffer_thug/thug/DOM/Personality.py | #!/usr/bin/env python
#
# Personality.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANT... | 4,191 | Python | .py | 98 | 33.959184 | 90 | 0.637549 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,782 | Console.py | buffer_thug/thug/DOM/Console.py | #!/usr/bin/env python
#
# Console.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; w... | 5,685 | Python | .py | 142 | 31.21831 | 84 | 0.612252 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,783 | Crypto.py | buffer_thug/thug/DOM/Crypto.py | #!/usr/bin/env python
#
# Crypto.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; wi... | 1,113 | Python | .py | 33 | 30.060606 | 110 | 0.735075 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,784 | Location.py | buffer_thug/thug/DOM/Location.py | #!/usr/bin/env python
#
# Location.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; ... | 4,873 | Python | .py | 126 | 31.166667 | 98 | 0.647497 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,785 | HTTPSessionException.py | buffer_thug/thug/DOM/HTTPSessionException.py | #!/usr/bin/env python
#
# HTTPSession.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANT... | 932 | Python | .py | 26 | 33.884615 | 70 | 0.797101 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,786 | Utils.py | buffer_thug/thug/DOM/Utils.py | #!/usr/bin/env python
#
# Utils.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; wit... | 766 | Python | .py | 21 | 34.761905 | 70 | 0.766846 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,787 | DOMParser.py | buffer_thug/thug/DOM/W3C/DOMParser.py | #!/usr/bin/env python
import logging
log = logging.getLogger("Thug")
class DOMParser:
def parseFromString(self, s, type_):
parser = "lxml" if "xml" in type_ else "html.parser"
return log.DOMImplementation(log.HTMLInspector.run(s, parser))
| 274 | Python | .py | 7 | 33.142857 | 71 | 0.69112 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,788 | w3c.py | buffer_thug/thug/DOM/W3C/w3c.py | #!/usr/bin/env python
import logging
import bs4
log = logging.getLogger("Thug")
def getDOMImplementation(dom=None, **kwds):
return log.DOMImplementation(dom if dom else bs4.BeautifulSoup("", "lxml"), **kwds)
def parseString(html, **kwds):
soup = log.HTMLInspector.run(html, "html.parser")
... | 365 | Python | .py | 9 | 35.888889 | 88 | 0.723837 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,789 | DOMTokenList.py | buffer_thug/thug/DOM/W3C/DOMTokenList.py | #!/usr/bin/env python
import logging
log = logging.getLogger("Thug")
class DOMTokenList:
def __init__(self, supported, tokens=None):
self.tokens = [] if tokens is None else tokens
self.__init_supported(supported)
def __init_supported(self, supported):
self.supported = []
fo... | 1,453 | Python | .py | 41 | 27 | 82 | 0.630108 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,790 | CSSStyleDeclaration.py | buffer_thug/thug/DOM/W3C/Style/CSS/CSSStyleDeclaration.py | #!/usr/bin/env python
import logging
from thug.DOM.JSClass import JSClass
log = logging.getLogger("Thug")
class CSSStyleDeclaration(JSClass):
def __init__(self, style):
self.props = {}
for prop in [p for p in style.split(";") if p]:
k, v = prop.strip().split(":")
self.p... | 1,339 | Python | .py | 38 | 27 | 74 | 0.575428 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,791 | ElementCSSInlineStyle.py | buffer_thug/thug/DOM/W3C/Style/CSS/ElementCSSInlineStyle.py | #!/usr/bin/env python
class ElementCSSInlineStyle:
def __init__(self, doc, tag):
self.doc = doc
self.tag = tag
self._style = None
@property
def style(self):
if self._style is None:
from .CSSStyleDeclaration import CSSStyleDeclaration
self._style =... | 456 | Python | .py | 14 | 23.714286 | 71 | 0.587156 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,792 | File.py | buffer_thug/thug/DOM/W3C/File/File.py | #!/usr/bin/env python
#
# File.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; with... | 1,377 | Python | .py | 38 | 31.789474 | 77 | 0.688253 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,793 | __init__.py | buffer_thug/thug/DOM/W3C/File/__init__.py | __all__ = ["Blob", "File"]
from .Blob import Blob
from .File import File
| 74 | Python | .py | 3 | 23.333333 | 26 | 0.671429 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,794 | Blob.py | buffer_thug/thug/DOM/W3C/File/Blob.py | #!/usr/bin/env python
#
# Blob.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; with... | 2,380 | Python | .py | 62 | 32.693548 | 100 | 0.678121 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,795 | AbstractView.py | buffer_thug/thug/DOM/W3C/Views/AbstractView.py | #!/usr/bin/env python
import logging
log = logging.getLogger("Thug")
# Introduced in DOM Level 2
class AbstractView:
def __init__(self):
pass
@property
def document(self):
return None
| 217 | Python | .py | 10 | 17.4 | 31 | 0.678218 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,796 | DocumentView.py | buffer_thug/thug/DOM/W3C/Views/DocumentView.py | #!/usr/bin/env python
# Introduced in DOM Level 2
class DocumentView:
def __init__(self, doc):
self.doc = doc
@property
def defaultView(self):
return getattr(self, "window", None)
| 211 | Python | .py | 8 | 21.5 | 44 | 0.65 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,797 | Document.py | buffer_thug/thug/DOM/W3C/Core/Document.py | #!/usr/bin/env python
import copy
import logging
import bs4
from thug.DOM.W3C.Events.DocumentEvent import DocumentEvent
from thug.DOM.W3C.Views.DocumentView import DocumentView
from .Node import Node
log = logging.getLogger("Thug")
class Document(Node, DocumentEvent, DocumentView):
def __init__(self, doc, ta... | 8,842 | Python | .py | 209 | 33.272727 | 112 | 0.661796 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,798 | Notation.py | buffer_thug/thug/DOM/W3C/Core/Notation.py | #!/usr/bin/env python
from .Node import Node
class Notation(Node): # pragma: no cover
@property
def publicId(self):
return None
@property
def systemId(self):
return None
@property
def nodeName(self):
pass
@property
def nodeType(self):
return Node.NO... | 486 | Python | .py | 22 | 16.181818 | 41 | 0.640351 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,799 | DocumentFragment.py | buffer_thug/thug/DOM/W3C/Core/DocumentFragment.py | #!/usr/bin/env python
import logging
import bs4
from .Node import Node
log = logging.getLogger("Thug")
class DocumentFragment(Node):
def __init__(self, doc):
tag = bs4.Tag(parser=doc, name="documentfragment")
Node.__init__(self, doc, tag)
self.__init_documentfragment_personality()
... | 2,422 | Python | .py | 60 | 31.75 | 87 | 0.667236 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |