当前位置: 首页>>代码示例>>Python>>正文


Python static.Static类代码示例

本文整理汇总了Python中cuckoo.processing.static.Static的典型用法代码示例。如果您正苦于以下问题:Python Static类的具体用法?Python Static怎么用?Python Static使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Static类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_lnk2_generic

 def test_lnk2_generic(self):
     s = Static()
     s.set_task({
         "category": "file",
         "package": "generic",
         "target": "lnk_2.lnk",
     })
     s.file_path = "tests/files/lnk_2.lnk"
     assert "elf" not in s.run()
开发者ID:LetMeR00t,项目名称:cuckoo,代码行数:9,代码来源:test_processing.py

示例2: test_office

 def test_office(self):
     s = Static()
     s.set_task({
         "category": "file",
         "package": "doc",
         "target": "createproc1.docm",
     })
     s.file_path = "tests/files/createproc1.docm"
     r = s.run()["office"]
     assert "ThisDocument" in r["macros"][0]["orig_code"]
     assert "Sub AutoOpen" in r["macros"][1]["orig_code"]
     assert 'process.Create("notepad.exe"' in r["macros"][1]["orig_code"]
开发者ID:jgajek,项目名称:cuckoo,代码行数:12,代码来源:test_processing.py

示例3: init

def init(package, *filename):
    id_ = task_id()
    init_analysis(id_, package, *filename)
    init_yara()

    s = Static()
    s.set_task({
        "id": id_,
        "category": "file",
        "package": package,
        "target": filename[-1],
    })
    s.file_path = cwd("binary", analysis=id_)
    e = ExtractManager.for_task(id_)
    return s.run(), e.results()
开发者ID:LetMeR00t,项目名称:cuckoo,代码行数:15,代码来源:test_static.py

示例4: test_summary_office2

    def test_summary_office2(self, p, request):
        s = Static()
        s.set_task({
            "category": "file",
            "package": "doc",
            "target": "createproc1.docm",
        })
        s.file_path = "tests/files/createproc1.docm"

        p._get_report.return_value = {
            "static": s.run(),
        }
        r = AnalysisRoutes.detail(request, 1, "static").content
        assert "ThisDocument" in r
        assert "Sub AutoOpen" in r
        assert "process.Create" in r
        assert "notepad.exe" in r
开发者ID:ptcNOP,项目名称:cuckoo,代码行数:17,代码来源:test_web.py

示例5: test_pdf_metadata

    def test_pdf_metadata(self):
        set_cwd(tempfile.mkdtemp())

        s = Static()
        s.set_task({
            "category": "file",
            "package": "pdf",
            "target": "pdf-sample.pdf",
        })
        s.set_options({
            "pdf_timeout": 30,
        })
        s.file_path = "tests/files/pdf-sample.pdf"
        obj = s.run()["pdf"]
        assert len(obj) == 2
        assert obj[1] == {
            "author": "cdaily",
            "creation": "D:20000629102108+11'00'",
            "creator": "Microsoft Word 8.0",
            "javascript": [],
            "modification": "2013-10-28T15:24:13-04:00",
            "producer": "Acrobat Distiller 4.0 for Windows",
            "subject": "",
            "title": "This is a test PDF file",
            "urls": [],
            "version": 1,
        }
开发者ID:jgajek,项目名称:cuckoo,代码行数:27,代码来源:test_processing.py

示例6: test_lnk2

 def test_lnk2(self):
     s = Static()
     s.set_task({
         "category": "file",
         "package": "lnk",
         "target": "lnk_2.lnk",
     })
     s.file_path = "tests/files/lnk_2.lnk"
     obj = s.run()["lnk"]
     assert obj["basepath"] == "C:\\Windows\\System32\\cmd.exe"
     assert obj["flags"] == {
         "cmdline": True, "description": True, "icon": True,
         "references": True, "relapath": True, "shellidlist": True,
         "workingdir": True,
     }
     assert "digitale" in obj["description"]
     assert obj["icon"] == "C:\\Windows\\System32\\write.exe"
     assert "cmd.exe" in obj["relapath"]
     assert "bitsadmin.exe" in obj["cmdline"]
     assert "/transfer" in obj["cmdline"]
开发者ID:LetMeR00t,项目名称:cuckoo,代码行数:20,代码来源:test_processing.py

示例7: test_lnk1

 def test_lnk1(self):
     s = Static()
     s.set_task({
         "category": "file",
         "package": "lnk",
         "target": "lnk_1.lnk",
     })
     s.file_path = "tests/files/lnk_1.lnk"
     obj = s.run()["lnk"]
     assert obj["basepath"] == "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
     assert obj["flags"] == {
         "cmdline": True, "description": True, "icon": True,
         "references": True, "relapath": True, "shellidlist": True,
         "workingdir": False,
     }
     assert obj["description"] == "windows photo viewer"
     assert "shell32.dll" in obj["icon"]
     assert "powershell.exe" in obj["relapath"]
     assert "-NoProfile" in obj["cmdline"]
     assert "eABlACIA" in obj["cmdline"]
开发者ID:jgajek,项目名称:cuckoo,代码行数:20,代码来源:test_processing.py

示例8: test_phishing0_pdf

    def test_phishing0_pdf(self):
        set_cwd(tempfile.mkdtemp())

        s = Static()
        s.set_task({
            "category": "file",
            "package": "pdf",
            "target": "phishing0.pdf",
        })
        s.set_options({
            "pdf_timeout": 30,
        })
        s.file_path = "tests/files/phishing0.pdf"
        assert "googleattachmentsigned" in s.run()["pdf"][0]["urls"][0]
开发者ID:jgajek,项目名称:cuckoo,代码行数:14,代码来源:test_processing.py

示例9: test_pdf_stringjs

    def test_pdf_stringjs(self):
        set_cwd(tempfile.mkdtemp())

        s = Static()
        s.set_task({
            "category": "file",
            "package": "pdf",
            "target": "pdf1-stringjs.pdf",
        })
        s.set_options({
            "pdf_timeout": 30,
        })
        s.file_path = "tests/files/pdf1-stringjs.pdf"
        r = s.run()["pdf"][12]
        assert "app.alert({" in r["javascript"][0]["orig_code"]
开发者ID:LetMeR00t,项目名称:cuckoo,代码行数:15,代码来源:test_processing.py

示例10: test_pdf

    def test_pdf(self):
        set_cwd(tempfile.mkdtemp())

        s = Static()
        s.set_task({
            "category": "file",
            "package": "pdf",
            "target": "pdf0.pdf",
        })
        s.set_options({
            "pdf_timeout": 30,
        })
        s.file_path = "tests/files/pdf0.pdf"
        r = s.run()["pdf"][0]
        assert "var x = unescape" in r["javascript"][0]["orig_code"]
开发者ID:jgajek,项目名称:cuckoo,代码行数:15,代码来源:test_processing.py

示例11: test_pdf_ignorefake

    def test_pdf_ignorefake(self):
        set_cwd(tempfile.mkdtemp())

        s = Static()
        s.set_task({
            "category": "file",
            "package": "pdf",
            "target": "fakepdf.pdf",
        })
        s.set_options({
            "pdf_timeout": 30,
        })
        s.file_path = "tests/files/fakepdf.pdf"
        assert s.run() == {
            "pdf": [],
        }
开发者ID:LetMeR00t,项目名称:cuckoo,代码行数:16,代码来源:test_processing.py

示例12: test_pdf_workercrash

    def test_pdf_workercrash(self, md):
        set_cwd(tempfile.mkdtemp())
        md.return_value = None

        s = Static()
        s.set_task({
            "category": "file",
            "package": "pdf",
            "target": "pdf0.pdf",
        })
        s.set_options({
            "pdf_timeout": 30,
        })
        s.file_path = "tests/files/pdf0.pdf"
        r = s.run()
        assert r["pdf"] == []
开发者ID:LetMeR00t,项目名称:cuckoo,代码行数:16,代码来源:test_processing.py

示例13: test_archive_pdf

    def test_archive_pdf(self):
        set_cwd(tempfile.mkdtemp())

        s = Static()
        s.set_task({
            "category": "archive",
            "package": "pdf",
            "options": {
                "filename": "files/pdf0.pdf",
            },
        })
        s.set_options({
            "pdf_timeout": 30,
        })
        s.file_path = "tests/files/pdf0.zip"
        assert "%48%65" in s.run()["pdf"][0]["javascript"][0]["orig_code"]
开发者ID:jgajek,项目名称:cuckoo,代码行数:16,代码来源:test_processing.py

示例14: test_summary_pdf_nometadata

    def test_summary_pdf_nometadata(self, p, request):
        s = Static()
        s.set_task({
            "category": "file",
            "package": "pdf",
            "target": __file__,
        })
        s.set_options({
            "pdf_timeout": 10,
        })
        s.file_path = __file__

        p._get_report.return_value = {
            "static": s.run(),
        }
        r = AnalysisRoutes.detail(request, 1, "static").content
        assert "No PDF metadata could be extracted!" in r
开发者ID:consen,项目名称:cuckoo,代码行数:17,代码来源:test_web.py

示例15: test_pdf_endian

 def test_pdf_endian(self):
     s = Static()
     s.set_task({
         "category": "file",
         "package": "pdf",
         "target": "pdf-endianerror.pdf"
     })
     s.file_path = "tests/files/pdf-endianerror.pdf"
     s.set_options({
         "pdf_timeout": 30,
     })
     r = s.run()
     assert len(r["pdf"][0]["urls"]) == 63
     assert r["pdf"][0]["urls"][54] == (
         u"http://yourmirror.net/kali-security\u548c"
         u"http://yourmirror.net/kali-images"
     )
开发者ID:LetMeR00t,项目名称:cuckoo,代码行数:17,代码来源:test_processing.py


注:本文中的cuckoo.processing.static.Static类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。