File: test_generate_shellcode_list.py

package info (click to toggle)
pocsuite3 2.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,996 kB
  • sloc: python: 16,816; asm: 911; java: 66; makefile: 30
file content (18 lines) | stat: -rw-r--r-- 607 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import unittest

from pocsuite3.lib.core.enums import OS, OS_ARCH
from pocsuite3.lib.utils import generate_shellcode_list


class TestCase(unittest.TestCase):
    def setUp(self):
        pass

    def test_windows_shellcode(self):
        _list = generate_shellcode_list(listener_ip='127.0.0.1', listener_port=8088)
        self.assertTrue(len(_list) > 0)

    def test_linux_shellcode(self):
        _list = generate_shellcode_list(listener_ip='127.0.0.1', listener_port=8088, os_target=OS.LINUX,
                                        os_target_arch=OS_ARCH.X86)
        self.assertTrue(len(_list) > 0)