{
  "llm": {
    "conf": 0.5785533,
    "error": "",
    "grade": "benign",
    "interpretation": "Legitimate radare2 Python interface",
    "model": "Qwen/Qwen3.8-27B",
    "outcome": "suspicious"
  },
  "ml": {
    "analyzed_at": "2026-11-20T21:30:40Z",
    "files": [
      {
        "lvl": 45,
        "prob": 0.86351246,
        "id": 0
      },
      {
        "lvl": -1,
        "id": 1
      },
      {
        "lvl": -1,
        "id": 2
      },
      {
        "lvl": -1,
        "id": 3
      },
      {
        "lvl": -1,
        "id": 4
      }
    ],
    "lvl": 45,
    "mods": [
      {
        "cls": 2
      }
    ],
    "prob": 0.86351246,
    "v": "7",
    "version": "v20.20"
  },
  "path": "r2pipe-0.9.7.tar.gz",
  "raw": {
    "files": [
      {
        "depth": 0,
        "facts": {
          "metrics": {
            "archive": {
              "directory_count": 2,
              "double_extension_count": 0,
              "executable_count": 0,
              "file_count": 6,
              "format.directory_count": 2,
              "format.regular_count": 6,
              "hidden_file_count": 0,
              "homoglyph_filename_count": 0,
              "max_filename_length": 31,
              "member_count": 8,
              "misplaced_executable_count": 0,
              "nested_archive_count": 0,
              "path_traversal_count": 0,
              "rtlo_filename_count": 0,
              "script_count": 3,
              "security.setgid_count": 0,
              "security.setuid_count": 0,
              "security.sticky_count": 0,
              "security.symlink_count": 0,
              "security.world_writable_count": 0,
              "symlink_escape_count": 0,
              "timing.mtime_spread_seconds": 38093591,
              "timing.mtime_unique_count": 6,
              "uncompressed_size": 15635,
              "unicode_filename_count": 0
            },
            "binary": {
              "peak_region_bytes": 5843,
              "peak_region_entropy": 7.83
            },
            "consistency": {
              "metadata_identity_mismatch": 0
            },
            "file": {
              "entropy": 7.96,
              "size": 5843
            }
          }
        },
        "id": 0,
        "ident": {
          "name": {
            "value": "r2pipe",
            "source": "python.name",
            "verified": false
          },
          "urls": [
            {
              "url": "http://rada.re",
              "kind": "homepage",
              "source": "python.homepage"
            }
          ],
          "trust": "unsigned",
          "emails": [
            "pancake@nopcode.org"
          ],
          "authors": [
            {
              "name": "pancake",
              "role": "author",
              "email": "pancake@nopcode.org",
              "source": "python.authors"
            }
          ],
          "version": {
            "value": "0.9.7",
            "source": "python.version",
            "verified": false
          },
          "identifier": {
            "value": "r2pipe",
            "source": "python.name",
            "verified": false
          },
          "description": {
            "value": "Pipe interface for radare2",
            "source": "python.description",
            "verified": false
          }
        },
        "mol": "O(C)H₈(Cm₁₂Db₄DsFOs₂Po₉Ti)Md₅(BkIn₂₁Pa₃Pt₃)",
        "path": "r2pipe-0.9.7.tar.gz",
        "risk": 26,
        "sha": "7d54766042ad59ada39b8c5ab713a5fece9721468804145ed3ce5e51556ae36e",
        "size": 5843,
        "traits": [
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "distutils packaging import",
            "from": [
              {
                "file": 4
              }
            ],
            "id": "metadata/build/pip::packaging-distutils-import"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "Packaging setup API import or call",
            "from": [
              {
                "file": 4,
                "line": 1,
                "off": 0
              }
            ],
            "id": "metadata/build/pip::packaging-setup-api-import",
            "uses": [
              0
            ]
          },
          {
            "conf": 0.98,
            "crit": 3,
            "desc": "Root Python setup.py packaging file",
            "from": [
              {
                "file": 4,
                "line": 1,
                "off": 0
              }
            ],
            "id": "metadata/build/pip::root-setup-py",
            "uses": [
              1,
              3
            ]
          },
          {
            "conf": 0.98,
            "crit": 3,
            "desc": "setup.py path outside vendored trees",
            "from": [
              {
                "file": 4
              }
            ],
            "id": "metadata/build/pip::root-setup-py-path"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "setup.py inside a versioned sdist root",
            "from": [
              {
                "file": 4
              }
            ],
            "id": "metadata/build/pip::versioned-sdist-root-setup-py"
          },
          {
            "conf": 1.0,
            "crit": 3,
            "desc": "Basename is uppercase README.md",
            "from": [
              {
                "file": 1
              }
            ],
            "id": "metadata/filename/identity::uppercase-readme-md-basename"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "Subprocess import outside excluded contexts",
            "from": [
              {
                "file": 2,
                "line": 35,
                "off": 760
              }
            ],
            "id": "metadata/import/builtin::python-subprocess-import",
            "uses": [
              21,
              22,
              23
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports addressof from ctypes",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/import/python/ctypes/addressof::addressof"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports byref from ctypes",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/python/ctypes/byref::byref"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports c_char_p from ctypes",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/import/python/ctypes/c_char_p::c_char_p"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports c_ulong from ctypes",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/python/ctypes/c_ulong::c_ulong"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports c_void_p from ctypes",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/import/python/ctypes/c_void_p::c_void_p"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports CDLL from ctypes",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/import/python/ctypes/cdll::cdll"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports create_string_buffer from ctypes",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/python/ctypes/create_string_buffer::create_string_buffer"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports Structure from ctypes",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/import/python/ctypes/structure::structure"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports find_library from ctypes.util",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/import/python/ctypes/util/find_library::find_library"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports ctypes.util",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/import/python/ctypes/util::ctypes/util"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports windll from ctypes",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/python/ctypes/windll::windll"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports ctypes",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/python/ctypes::ctypes"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports os",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/python/os::os"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports socket",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/python/socket::socket"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports PIPE from subprocess",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/python/subprocess/pipe::pipe"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports Popen from subprocess",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/python/subprocess/popen::popen"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports subprocess",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/python/subprocess::subprocess"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports urllib.error",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/python/urllib/error::urllib/error"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports urllib.request",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/python/urllib/request::urllib/request"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports urllib",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/python/urllib::urllib"
          },
          {
            "conf": 0.8,
            "crit": 3,
            "desc": "Python function accepts a command parameter",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/lang/source/naming/declaration::function-command-parameter"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "Python execution API call syntax",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/lang/source/syntax/call/invocation::python-execution-api-call-syntax"
          },
          {
            "conf": 0.98,
            "crit": 3,
            "desc": "Markdown-style heading precedes a code fence",
            "from": [
              {
                "file": 1
              }
            ],
            "id": "metadata/lang/source/syntax/markup/markdown::markdown-heading-before-fenced-block"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "README code fence opens with import",
            "from": [
              {
                "file": 1,
                "line": 21,
                "off": 277
              }
            ],
            "id": "metadata/package/documentation/package-metadata::readme-code-fence-opens-with-import",
            "uses": [
              94,
              105
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "Filename is setup.py",
            "from": [
              {
                "file": 4
              }
            ],
            "id": "metadata/package/files/included::setup-py-basename"
          },
          {
            "conf": 0.8,
            "crit": 3,
            "desc": "Python distutils setup or command import",
            "from": [
              {
                "file": 4
              }
            ],
            "id": "metadata/package/files/wheel-sdist::distutils-command-import-content"
          },
          {
            "conf": 0.7,
            "crit": 3,
            "desc": "References urllib.request.urlopen",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/communications/http/client/exchange::urllib-urlopen"
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "Calls function named urlopen",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/communications/http/client/exchange::urllib-urlopen-call-symbol"
          },
          {
            "conf": 0.75,
            "crit": 3,
            "desc": "References Python urllib HTTP client",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/communications/http/client/exchange::urllib-word"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Reads urllib response body",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/communications/http/client/response-body::urlopen-response-body-read"
          },
          {
            "conf": 0.75,
            "crit": 3,
            "desc": "urllib2 request client reference",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/communications/http/lib/urllib::urllib2-word"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "Call contains a loopback address argument",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/communications/ip/construct::loopback-address-call-argument"
          },
          {
            "conf": 0.7,
            "crit": 3,
            "desc": "Wait for named pipe server",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/communications/ipc/named-pipe::wait-named-pipe"
          },
          {
            "conf": 0.8,
            "crit": 3,
            "desc": "Tuple-address connect call text",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/communications/socket/connect/attempt::python-tuple-address-connect-call"
          },
          {
            "conf": 0.7,
            "crit": 3,
            "desc": "socket.socket() call",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/communications/socket/create::socket-socket-call",
            "mbc": "C0001"
          },
          {
            "atk": "T1071",
            "conf": 0.55,
            "crit": 3,
            "desc": "AF_INET constant name",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/communications/socket/family::socket-af-inet-name",
            "mbc": "C0001"
          },
          {
            "atk": "T1071",
            "conf": 0.55,
            "crit": 3,
            "desc": "SOCK_STREAM constant name",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/communications/socket/family::socket-sock-stream-name",
            "mbc": "C0001"
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "Assigns recv result from socket-named receiver",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/communications/socket/receive::python-socket-named-recv-assignment"
          },
          {
            "atk": "T1071",
            "conf": 0.7,
            "crit": 3,
            "desc": "socket.recv() call",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/communications/socket/receive::socket-recv-call",
            "mbc": "C0001"
          },
          {
            "atk": "T1071",
            "conf": 0.7,
            "crit": 3,
            "desc": "Python socket sendall() call",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/communications/socket/send/message::python-sendall",
            "mbc": "C0001"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "References a loopback HTTP URL",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/communications/url/host/http::loopback-http-url-reference"
          },
          {
            "conf": 1.0,
            "crit": 3,
            "desc": "Passes direct-IP URL to a call",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/communications/url/host/oob-http::direct-ip-url-call-argument"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Code embeds cleartext HTTP URL literal",
            "from": [
              {
                "file": 4
              }
            ],
            "id": "micro-behaviors/communications/url/scheme::cleartext-http-url-code-literal"
          },
          {
            "conf": 0.75,
            "crit": 3,
            "desc": "HTTP URL string literal",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/communications/url/scheme::http-url-literal"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Python cleartext HTTP URL literal",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/communications/url/scheme::python-cleartext-http-url-literal"
          },
          {
            "conf": 0.94,
            "crit": 3,
            "desc": "Handles HTTP, URL or connection errors",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/data/control-flow/error-handling/catch::network-error-handler",
            "mbc": "C0027"
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "exception suppression via try/except pass",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/data/control-flow/error-handling/suppress::silent-exception-pass",
            "mbc": "C0027"
          },
          {
            "conf": 0.98,
            "crit": 3,
            "desc": "URL-encodes data with urllib.parse",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/data/encode/url::urllib-quote-call"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Parses JSON data with Python",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/data/parse/json::json-loads-call"
          },
          {
            "conf": 0.7,
            "crit": 3,
            "desc": "CDLL( call pattern",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "micro-behaviors/dylib/load/runtime::cdll-paren"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Writes bytes through Python file descriptor",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/fs/write/file/descriptor::python-os-write-fd"
          },
          {
            "conf": 0.75,
            "crit": 3,
            "desc": "Python getattr dynamic attribute lookup",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/metaprogramming/reflection/inspect/member::python-getattr-call"
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "pip install command text",
            "from": [
              {
                "file": 1
              }
            ],
            "id": "micro-behaviors/os/package-manager/reference-install::pip-install-cli-text"
          },
          {
            "atk": "T1082",
            "conf": 0.8,
            "crit": 3,
            "desc": "Windows platform check via os.name == 'nt'",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/os/sysinfo/platform/runtime/platform::python-osname-nt-check",
            "mbc": "E1082"
          },
          {
            "atk": "T1059.006",
            "conf": 0.94,
            "crit": 3,
            "desc": "Python Popen launches through a shell",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/process/create/shell/command-mode::popen-shell-true",
            "mbc": "C0017"
          },
          {
            "atk": "T1059.006",
            "conf": 0.95,
            "crit": 3,
            "desc": "Executes shell commands via Python",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/process/create/shell/command-mode::python-os-system",
            "mbc": "E1059.006"
          },
          {
            "atk": "T1059",
            "conf": 0.9,
            "crit": 3,
            "desc": "os.system receives a literal command string",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/process/create/shell/command-mode::python-os-system-string-command"
          },
          {
            "atk": "T1059.006",
            "conf": 0.93,
            "crit": 3,
            "desc": "Popen runs a variable through the shell",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/process/create/shell/variable-command::python-popen-variable-shell"
          },
          {
            "atk": "T1059.006",
            "conf": 0.85,
            "crit": 3,
            "desc": "Launches a process with subprocess.Popen",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/process/create/subprocess/launch::popen-ast",
            "mbc": "C0017"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Python debugger tool string (radare2)",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/process/debug/tool-markers::python-debugger-tool-string--radare2"
          },
          {
            "atk": "T1059.006",
            "conf": 0.85,
            "crit": 3,
            "desc": "Python eval() built-in function",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "micro-behaviors/process/interpreter/eval/python-builtins::eval-builtin",
            "mbc": "E1059"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Reads or references standard input",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/process/stdio/read::stdin-read-or-reference"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Writes data to a child process stdin",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/process/stdio/write::python-child-stdin-write"
          },
          {
            "conf": 0.84,
            "crit": 3,
            "desc": "Python references the stderr stream",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/process/stdio/write::python-stderr-stream-name"
          },
          {
            "conf": 0.84,
            "crit": 3,
            "desc": "Python references the stdout stream",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/process/stdio/write::python-stdout-stream-name"
          },
          {
            "conf": 0.8,
            "crit": 3,
            "desc": "pkill process termination command",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/process/terminate/command::pkill"
          },
          {
            "conf": 0.75,
            "crit": 3,
            "desc": "Python sleep waits at least one second",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/time/sleep/interval::python-sleep-1s-plus-arg"
          },
          {
            "conf": 0.65,
            "crit": 3,
            "desc": "Calls a function named sleep in Python",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/time/sleep/interval::python-sleep-call"
          },
          {
            "atk": "T1071.001",
            "conf": 0.88,
            "crit": 3,
            "desc": "Hard-coded HTTP command endpoint URL",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "objectives/command-and-control/beacon/network/json::c2-command-result-endpoints",
            "mbc": "B0030"
          },
          {
            "conf": 0.9,
            "crit": 2,
            "desc": "Versioned source-tree archive member",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/build/archive::versioned-source-tree-archive-member"
          },
          {
            "conf": 1.0,
            "crit": 2,
            "desc": "Python setup.py or setup.cfg file",
            "from": [
              {
                "file": 4
              }
            ],
            "id": "metadata/build/pip::setup-py"
          },
          {
            "conf": 1.0,
            "crit": 2,
            "desc": "File uses a Python artifact extension",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/file/extension/identity::py"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports setup from distutils.core",
            "from": [
              {
                "file": 4
              }
            ],
            "id": "metadata/import/python/distutils/core/setup::setup"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports distutils.core",
            "from": [
              {
                "file": 4
              }
            ],
            "id": "metadata/import/python/distutils/core::distutils/core"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports fcntl",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/python/fcntl::fcntl"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports TextIOWrapper from io",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/python/io/textiowrapper::textiowrapper"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports io",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/python/io::io"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports json",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/python/json::json"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports r2lang",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/python/r2lang::r2lang"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports r2pipe",
            "from": [
              {
                "file": 4
              }
            ],
            "id": "metadata/import/python/r2pipe::r2pipe"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports re",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/python/re::re"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports .native.RCore from .native",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/python/relative/1/native/rcore::rcore"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports .native",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/python/relative/1/native::relative/1/native"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports sys",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/python/sys::sys"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports time",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/python/time::time"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports urllib2",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/python/urllib2::urllib2"
          },
          {
            "conf": 0.9,
            "crit": 2,
            "desc": "Declares Python package summary",
            "from": [],
            "id": "metadata/package/description/presence::pkginfo-summary-field"
          },
          {
            "conf": 0.99,
            "crit": 2,
            "desc": "README Markdown basename",
            "from": [
              {
                "file": 1
              }
            ],
            "id": "metadata/package/documentation/source::readme-markdown-basename"
          },
          {
            "conf": 1.0,
            "crit": 2,
            "desc": "Declares Python Core Metadata version",
            "from": [],
            "id": "metadata/package/ecosystem::pkginfo-core-metadata"
          },
          {
            "conf": 0.9,
            "crit": 2,
            "desc": "Declares Python package name",
            "from": [],
            "id": "metadata/package/name/presence::pkginfo-name-field"
          },
          {
            "conf": 0.9,
            "crit": 2,
            "desc": "Declares Python package version",
            "from": [],
            "id": "metadata/package/version::pkginfo-version-field"
          },
          {
            "conf": 0.3,
            "crit": 2,
            "desc": "While-loop control flow",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "micro-behaviors/data/control-flow/loop/conditional::while-loop"
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"the\"",
            "from": [],
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-1"
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"and\"",
            "from": [],
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-2"
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"that\"",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-3"
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"for\"",
            "from": [],
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-5"
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"with\"",
            "from": [],
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-6"
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"this\"",
            "from": [],
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-7"
          },
          {
            "conf": 0.9,
            "crit": 1,
            "desc": "Markdown code fence opens with import",
            "from": [
              {
                "file": 1
              }
            ],
            "id": "metadata/package/documentation/package-metadata::code-fence-opens-with-import"
          },
          {
            "conf": 0.75,
            "crit": 1,
            "desc": "Python one-second-plus sleep",
            "from": [
              {
                "file": 2,
                "line": 321,
                "off": 8590
              }
            ],
            "id": "micro-behaviors/time/sleep/interval::python-sleep-1s-plus",
            "uses": [
              73,
              74
            ]
          },
          {
            "conf": 0.92,
            "crit": 3,
            "desc": "Reads a remote HTTP response body",
            "from": [
              {
                "file": 2,
                "line": 248,
                "off": 6753
              }
            ],
            "id": "micro-behaviors/communications/http/client/response-body::remote-response-body-read",
            "uses": [
              36
            ]
          },
          {
            "atk": "T1059",
            "conf": 0.9,
            "crit": 3,
            "desc": "Executes commands through a shell",
            "from": [
              {
                "file": 2,
                "line": 318,
                "off": 8497
              }
            ],
            "id": "micro-behaviors/process/create/shell/interpreter::shell-execution-capability",
            "mbc": "E1059",
            "uses": [
              62
            ]
          }
        ],
        "type": "python_sdist"
      },
      {
        "ctx": [
          {
            "col": 1,
            "line": 1,
            "ln": 0,
            "s": "r2pipe for Python\n=================\n\nInteract with radare2 using the #!pipe command or in standalone scripts\nthat communicate with local or remote r2 via pipe, tcp or http.\n\n### Installation\n\n```\n$ pip install r2pipe\n```\n\nor\n\n```\n$ pip3 install r2pipe\n```\n\n### Usage example:\n\n```python\nimport r2pipe\n\nr2 = r2pipe.open(\"/bin/ls\")\nr2.cmd('aa')\nprint(r2.cmd(\"afl\"))\nprint(r2.cmdj(\"aflj\"))  # evaluates JSONs and returns an object\nr2.quit()\n```\n"
          }
        ],
        "depth": 1,
        "facts": {
          "metrics": {
            "binary": {
              "peak_region_bytes": 442,
              "peak_region_entropy": 4.82
            },
            "file": {
              "entropy": 4.82,
              "size": 442
            },
            "text": {
              "avg_line_length": 14.24,
              "char_entropy": 4.82,
              "digit_ratio": 0.04,
              "empty_line_ratio": 0.28,
              "last_line_length": 3,
              "line_length_stddev": 19.25,
              "lines": 29,
              "max_line_length": 71,
              "max_whitespace_run": 2,
              "repeated_char_sequences": 1,
              "space_count": 43,
              "top_char": 116,
              "top_char_null": 0,
              "top_char_ratio": 0.06,
              "unique_chars": 48,
              "whitespace_ratio": 0.16
            }
          }
        },
        "id": 1,
        "mol": "H(Os)Md₃(PaPt)",
        "path": "r2pipe-0.9.7.tar.gz!!r2pipe-0.9.7/README.md",
        "pid": 0,
        "risk": 4,
        "sha": "d5a587c4de3e3855ec1cf31f93b4d77316afb463010940e1dc47dff857333c0f",
        "sid": 10810561363,
        "size": 442,
        "traits": [
          {
            "conf": 1.0,
            "crit": 3,
            "desc": "Basename is uppercase README.md",
            "id": "metadata/filename/identity::uppercase-readme-md-basename"
          },
          {
            "conf": 0.98,
            "crit": 3,
            "desc": "Markdown-style heading precedes a code fence",
            "id": "metadata/lang/source/syntax/markup/markdown::markdown-heading-before-fenced-block",
            "spans": [
              [
                174,
                21
              ],
              [
                257,
                23
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "README code fence opens with import",
            "id": "metadata/package/documentation/package-metadata::readme-code-fence-opens-with-import",
            "spans": [
              [
                277,
                17
              ]
            ],
            "uses": [
              4,
              10
            ]
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "pip install command text",
            "id": "micro-behaviors/os/package-manager/reference-install::pip-install-cli-text",
            "spans": [
              [
                198,
                18
              ],
              [
                232,
                19
              ]
            ]
          },
          {
            "conf": 0.99,
            "crit": 2,
            "desc": "README Markdown basename",
            "id": "metadata/package/documentation/source::readme-markdown-basename"
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"the\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-1",
            "spans": [
              [
                65,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"and\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-2",
            "spans": [
              [
                406,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"that\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-3",
            "spans": [
              [
                109,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"for\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-5",
            "spans": [
              [
                7,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"with\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-6",
            "spans": [
              [
                46,
                0
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 1,
            "desc": "Markdown code fence opens with import",
            "id": "metadata/package/documentation/package-metadata::code-fence-opens-with-import",
            "spans": [
              [
                277,
                0
              ]
            ]
          }
        ],
        "type": "markdown"
      },
      {
        "analysis_gaps": [
          "flow-field-unavailable",
          "flow-query-incomplete"
        ],
        "ctx": [
          {
            "col": 1,
            "line": 1,
            "ln": 0,
            "s": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"r2pipe\n\nThis module provides an API to interact with the radare2\ncommandline interface from Python using a pipe.\n\nThe pipe can be connected to the parent process to run\nPython scripts from the radare2 shell itself, or it can\nspawn a new process, connect via HTTP to a remote r2 http\nserver, etc.\n\nSome r2 commands display the information in JSON, that's\nwhy r2pipe provides `-j` methods to directly parse it\nand return a native Python object.\n\nExample:\n  $ python\n  \u003e import r2pipe\n  \u003e r = r2pipe.open(\"/bin/ls\")\n  \u003e print(r.cmd(\"pd 10\"))\n  \u003e print(r.cmdj(\"aoj\")[0]['size'])\n  \u003e r.quit()\n\"\"\"\n\nimport os\nimport re\nimport sys\nimport time\nimport json\nimport socket\nimport urllib\nfrom io import TextIOWrapper\nfrom subprocess import Popen, PIPE\ntry:\n\timport r2lang\nexcept:\n\tr2lang = None\ntry:\n\timport fcntl\nexcept:\n\tfcntl = None\ntry:\n\tfrom .native import RCore\n\thas_native = True\nexcept:\n\thas_native = False\n\nVERSION = \"0.9.7\"\n\nif sys.version_info \u003e= (3, 0):\n\timport urllib.request\n\turlopen = urllib.request.urlopen\n\timport urllib.error\n\tURLError = urllib.error.URLError\nelse:\n\timport urllib2\n\turlopen = urllib2.urlopen\n\tURLError = urllib2.URLError\nif os.name == \"nt\":\n\tfrom ctypes import byref, c_ulong, create_string_buffer, windll\n\tGENERIC_READ = 0x80000000\n\tGENERIC_WRITE = 0x40000000\n\tOPEN_EXISTING = 0x3\n\tINVALID_HANDLE_VALUE = -1\n\tPIPE_READMODE_MESSAGE ="
          },
          {
            "col": 6,
            "line": 83,
            "ln": 1689,
            "s": "n_rlang():\n\treturn r2lang is not None and r2lang.cmd is not None\n\n\nclass open:\n\t\"\"\"Class representing an r2pipe connection with a running radare2 ins"
          },
          {
            "col": 2,
            "line": 90,
            "ln": 1850,
            "s": "def __init__(self, filename='', flags=[]):\n\t\t\"\"\"Open a new r2 pipe\n\t\tThe 'filename' can be one of the following:\n\n\t\t* absolute or relative path to file\n\t\t* http://\u003chost\u003e:\u003cport\u003e/cmd to connect to an r2 webserver\n\t\t* tcp://\u003chost\u003e:\u003cport\u003e to connect to an r2 tcp server\n\t\t* #!pipe when launching it from r2 via RL"
          },
          {
            "col": 10,
            "line": 108,
            "ln": 2490,
            "s": "\n\t\ttry:\n\t\t\tif os.name == \"nt\":\n\t\t\t\tmypipename = os.environ['r2pipe_path']\n\t\t\t\twhile 1:\n\t\t\t\t\thPipe = windll.kernel32.CreateFileA(szPipename + mypipename, GENERIC_READ | GENERIC_WRITE,"
          },
          {
            "col": 58,
            "line": 118,
            "ln": 2863,
            "s": "Y):\n\t\t\t\t\t\tprint(\"Could not open pipe\")\n\t\t\t\t\t\treturn\n\t\t\t\t\telif ((windll.kernel32.WaitNamedPipeA(szPipename, 20000)) == 0):\n\t\t\t\t\t\tprint(\"Could not open pipe\\n\")\n\t\t\t\t\t\treturn\n\t\t\t\twindll.kernel32.WriteFile(hPipe, \"e scr.color="
          },
          {
            "col": 1,
            "line": 130,
            "ln": 3345,
            "s": "\t\t\t\tself._cmd = self._cmd_pipe\n\t\t\tself.url = \"#!pipe\"\n\t\t\treturn\n\t\texcept:\n\t\t\tpass\n\t\tif filename.startswith(\"#!pipe\"):\n\t\t\traise Exception(\"ERROR: Cannot use #!pipe without R2PIPE_{IN|OUT} env\")\n\t\tif filename.st"
          },
          {
            "col": 25,
            "line": 138,
            "ln": 3596,
            "s": "_http\n\t\t\tself.uri = filename + \"/cmd\"\n\t\telif filename.startswith(\"ccall://\"):\n\t\t\tself._cmd = self._c"
          },
          {
            "col": 36,
            "line": 146,
            "ln": 3879,
            "s": " match tcp format\")\n\t\t\tself._cmd = self._cmd_tcp\n\t\t\tself.conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n\t\t\tself.conn.connect((r.group(1), int(r.group(2))))\n\t\telse:\n\t\t\tself._cmd = self._cmd_process\n\t\t\tcmd = [\"radare2\", \"-q0\", filename]\n\t\t\tcmd = cmd[:1] + flags + cmd[1:]\n\t\t\ttry:\n\t\t\t\tself.process = Popen(cmd, shell=False, stdin=PIPE, stdout=PIPE)\n\t\t\texcept:\n\t\t\t\traise Exception(\"ERROR: Cannot find radare2 in PATH\")\n\t\t\tself.process.stdout.read(1)  # Reads initial \\x00\n\t\t\t# make it non-blocking to speedup reading\n\t\t\tself.nonblocking = False\n\t\t\tif fcntl is not None:\n\t\t\t\ts"
          },
          {
            "col": 34,
            "line": 165,
            "ln": 4580,
            "s": "_GETFL)\n\t\t\t\t\tfcntl.fcntl(fd, fcntl.F_SETFL, fl | os.O_NONBLOCK)\n\n\tdef _cmd_process(self, cmd):\n\t\tcmd = cmd.strip().replace(\"\\n\", \";\")\n\t\tif sys.version_info \u003e= (3, 0):\n\t\t\tself.process.stdin.write(bytes(cmd + '\\n', 'utf-8'))\n\t\t\t# XXX: Use the TextIOWrapper or we can get stuck in an endless loop!\n\t\t\tr = getattr(self, '_process_stdout_wrapper', None)\n\t\t\tif r is None:\n\t\t\t\tr = TextIOWrapper(self.process.stdout, encoding='utf8')\n\t\t\t\tself._p"
          },
          {
            "col": 20,
            "line": 179,
            "ln": 5110,
            "s": ".stdout\n\t\tself.process.stdin.flush()\n\t\tout = ''\n\t\twhile True:\n\t\t\tif self.nonblocking:\n\t\t\t\ttry:\n\t\t\t\t\tfoo = r.read(4096)\n\t\t\t\texcept:\n\t\t\t\t\tcontinue\n\t\t\telse:\n\t\t\t\tfoo = r.read(1)\n\t\t\tif len(foo) \u003e 0 and foo[-1] == '\\x00':\n\t\t\t\tout += foo[0:-1]\n\t\t\t\tbreak\n\t\t\tout += foo\n\t\treturn out\n\n\tdef _cmd_tcp(self, cmd):\n\t\tres = b''\n\t\tself.conn.sendall(str.encode(cmd, 'utf-8'))\n\t\tdata = self.conn.recv(512)\n\t\twhile data:\n\t\t\tres += data\n\t\t\tdata = self.conn.recv(512)\n\t\treturn res.decode('utf-8')\n\n\tdef _cmd_pipe(self, cmd):\n\t\tout = ''\n\t\tcmd = cmd.strip().replace(\"\\n\", \";\")\n\t\tif os.name == \"nt\":\n\t\t\twindll.kernel32.WriteFile(self.pipe[1], cmd, len(cmd), byref(cbWritten), None)\n\t\t\twhile True:\n\t\t\t\twindll.kernel32.ReadFile(self.pipe[1], chBuf, BUFSIZE, byref(cbRead), None)\n\t\t\t\tout += chBu"
          },
          {
            "col": 22,
            "line": 213,
            "ln": 5907,
            "s": "ad.value - 1]) == 0:\n\t\t\t\t\tout = out[0:-1]\n\t\t\t\t\tbreak\n\t\telse:\n\t\t\tos.write(self.pipe[1], cmd)\n\t\t\twhile True:\n\t\t\t\tres = os.read(self.pipe[0], 4096)\n\t\t\t\tif res[-1] == b'\\x00':\n\t\t\t\t\tres = res[0:-1]\n\t\t\t\tif "
          },
          {
            "col": 3,
            "line": 225,
            "ln": 6151,
            "s": "\t\tif (len(res) \u003c 4096):\n\t\t\t\t\tbreak\n\t\treturn out.decode('utf-8')\n\n\tdef _cmd_native(self, cmd):\n\t\tcmd = cmd.strip().replace(\"\\n\", \";\")\n\t\tif not has_native:\n\t\t\traise Exception('No native ctypes connector available')\n\t\tif not hasattr(self, 'native'):\n\t\t\tself.native = RCore()\n\t\t"
          },
          {
            "col": 11,
            "line": 235,
            "ln": 6433,
            "s": "tive.cmd_str(\"o \" + self.uri)\n\t\treturn self.native.cmd_str(cmd)\n\n\tdef _cmd_rlang(self, cmd):\n\t\treturn r2lang.cmd(cmd)\n\n\tdef _cmd_http(self, cmd):\n\t\ttry:\n\t\t\ttry:\n\t\t\t\tquocmd = urllib.parse.quote(cmd)\n\t\t\texcept:\n\t\t\t\tquocmd = urllib.quote(cmd)\n\t\t\tresponse = urlopen('{uri}/{cmd}'.format(uri=self.uri, cmd=quocmd))\n\t\t\treturn response.read().decode('utf-8')\n\t\texcept URLError:\n\t\t\tpass\n\t\treturn None\n\n\tdef quit(self):\n\t\t\"\"\"Quit current r2pipe session and kill\n\t\t\"\"\"\n\t\tself.cmd(\"q\")\n\t\tif hasattr(self, 'pr"
          },
          {
            "col": 4,
            "line": 259,
            "ln": 6972,
            "s": "self.process.terminate()\n\t\t\tself.process.wait()\n\n\t# r2 commands\n\tdef cmd(self, cmd):\n\t\t\"\"\"Run an r2 command return string with result\n\t\tArgs:\n\t\t\tcmd (str): r2 command\n\t\tReturns:\n\t\t\tReturns an string with the res"
          },
          {
            "col": 18,
            "line": 270,
            "ln": 7226,
            "s": "(cmd)\n\t\tif res is not None:\n\t\t\treturn res.strip()\n\t\treturn None\n\n\tdef cmdj(self, cmd):\n\t\t\"\"\"Same as cmd() but evaluates JSONs and returns an object\n\t\tArgs:\n\t\t\tcmd (str): r2 command\n\t\tReturns:\n\t\t\tReturns a Python object respresenting the parsed JSON\n\t\t\"\"\"\n\t\ttry:\n\t\t\tdata = json.loads(self.cmd(cmd).replace('\\n', ''), strict=False)\n\t\texcept (ValueError, KeyError, TypeError) as e:\n\t\t\tsys.stderr.write(\"r2pipe.cmdj.Error: %s\\n\" % (e))\n\t\t\tdata = None\n\t\treturn data\n\n\tdef syscmd(self, cmd):\n\t\t\"\"\"Executes a program and returns the output (stdout only)\n\t\tArgs:\n\t\t\tcmd (str): commandline shell command\n\t\tReturns:\n\t\t\tReturns a string with the output\n\t\t\"\"\"\n\t\tp = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE)\n\t\tout, err = p.communicate()\n\t\treturn out\n\n\tdef syscmdj(self, cmd):\n\t\t\"\"\"Executes a program and returns an object representing "
          },
          {
            "col": 53,
            "line": 310,
            "ln": 8374,
            "s": "))\n\t\t\tdata = None\n\t\treturn data\n\n\n# Hello World\nif __name__ == \"__main__\":\n\tprint(\"[+] Spawning r2 tcp and http servers\")\n\tos.system(\"pkill r2\")\n\tos.system(\"r2 -qc.:9080 /bin/ls \u0026\")\n\tos.system(\"r2 -qc=h /bin/ls \u0026\")\n\ttime.sleep(1)\n\t# Test r2pipe with local process\n\tprint(\"[+] Testing python r2pipe local\")\n\trlocal = open(\"/bin/ls\")\n\tprint(rlocal.cmd(\"pi 5\"))\n\t# print rlocal.cmd(\"pn\")\n\tinfo = rlocal.cmdj(\"ij\")\n\tprint(\"Archite"
          },
          {
            "col": 69,
            "line": 330,
            "ln": 8904,
            "s": " myfile\")\n\tprint(\"[+] Testing python r2pipe tcp://\")\n\trremote = open(\"tcp://127.0.0.1:9080\")\n\tdisas = rremote.cmd(\"pi 5\")\n\tif not disas:\n\t\tprint(\"Error with remote tcp conection\")\n\telse:\n\t\tprint(disas)\n\n\t# Test r2pipe wi"
          },
          {
            "col": 67,
            "line": 339,
            "ln": 9173,
            "s": "myfile\")\n\tprint(\"[+] Testing python r2pipe http://\")\n\trremote = open(\"http://127.0.0.1:9090\")\n\tdisas = rremote.cmd(\"pi 5\")\n\tif not disas:\n\t\tprint(\"Error with remote http conection\")\n\telse:\n\t\tprint(disas)\n\tos.system(\"pkill -INT r2\")\n"
          }
        ],
        "depth": 1,
        "facts": {
          "funcs": [
            [
              "version",
              1589
            ],
            [
              "in_rlang",
              1684
            ],
            [
              "__init__",
              1850
            ],
            [
              "_cmd_process",
              4646
            ],
            [
              "_cmd_tcp",
              5386
            ],
            [
              "_cmd_pipe",
              5588
            ],
            [
              "_cmd_native",
              6217
            ],
            [
              "_cmd_rlang",
              6499
            ],
            [
              "_cmd_http",
              6553
            ],
            [
              "quit",
              6828
            ],
            [
              "cmd",
              7037
            ],
            [
              "cmdj",
              7292
            ],
            [
              "syscmd",
              7689
            ],
            [
              "syscmdj",
              7972
            ]
          ],
          "imp": [
            [
              "",
              "create_string_buffer"
            ],
            [
              "",
              "c_ulong"
            ],
            [
              "",
              "c_ulong"
            ],
            [
              "",
              "in_rlang"
            ],
            [
              "",
              "windll.kernel32.CreateFileA"
            ],
            [
              "",
              "print"
            ],
            [
              "",
              "windll.kernel32.GetLastError"
            ],
            [
              "",
              "print"
            ],
            [
              "",
              "windll.kernel32.WaitNamedPipeA"
            ],
            [
              "",
              "print"
            ],
            [
              "",
              "windll.kernel32.WriteFile"
            ],
            [
              "",
              "byref"
            ],
            [
              "",
              "windll.kernel32.ReadFile"
            ],
            [
              "",
              "byref"
            ],
            [
              "",
              "int"
            ],
            [
              "",
              "int"
            ],
            [
              "",
              "filename.startswith"
            ],
            [
              "",
              "Exception"
            ],
            [
              "",
              "filename.startswith"
            ],
            [
              "",
              "filename.startswith"
            ],
            [
              "",
              "filename.startswith"
            ],
            [
              "",
              "re.match"
            ],
            [
              "",
              "Exception"
            ],
            [
              "",
              "socket.socket"
            ],
            [
              "",
              "self.conn.connect"
            ],
            [
              "",
              "r.group"
            ],
            [
              "",
              "int"
            ],
            [
              "",
              "r.group"
            ],
            [
              "",
              "Popen"
            ],
            [
              "",
              "Exception"
            ],
            [
              "",
              "self.process.stdout.read"
            ],
            [
              "",
              "self.process.stdout.fileno"
            ],
            [
              "",
              "fcntl.fcntl"
            ],
            [
              "",
              "fcntl.fcntl"
            ],
            [
              "",
              "cmd.strip.replace"
            ],
            [
              "",
              "cmd.strip"
            ],
            [
              "",
              "self.process.stdin.write"
            ],
            [
              "",
              "bytes"
            ],
            [
              "",
              "getattr"
            ],
            [
              "",
              "TextIOWrapper"
            ],
            [
              "",
              "self.process.stdin.write"
            ],
            [
              "",
              "self.process.stdin.flush"
            ],
            [
              "",
              "r.read"
            ],
            [
              "",
              "r.read"
            ],
            [
              "",
              "len"
            ],
            [
              "",
              "self.conn.sendall"
            ],
            [
              "",
              "str.encode"
            ],
            [
              "",
              "self.conn.recv"
            ],
            [
              "",
              "self.conn.recv"
            ],
            [
              "",
              "res.decode"
            ],
            [
              "",
              "cmd.strip.replace"
            ],
            [
              "",
              "cmd.strip"
            ],
            [
              "",
              "windll.kernel32.WriteFile"
            ],
            [
              "",
              "len"
            ],
            [
              "",
              "byref"
            ],
            [
              "",
              "windll.kernel32.ReadFile"
            ],
            [
              "",
              "byref"
            ],
            [
              "",
              "ord"
            ],
            [
              "",
              "os.write"
            ],
            [
              "",
              "os.read"
            ],
            [
              "",
              "len"
            ],
            [
              "",
              "len"
            ],
            [
              "",
              "out.decode"
            ],
            [
              "",
              "cmd.strip.replace"
            ],
            [
              "",
              "cmd.strip"
            ],
            [
              "",
              "Exception"
            ],
            [
              "",
              "hasattr"
            ],
            [
              "",
              "RCore"
            ],
            [
              "",
              "self.native.cmd_str"
            ],
            [
              "",
              "self.native.cmd_str"
            ],
            [
              "",
              "r2lang.cmd"
            ],
            [
              "",
              "urllib.parse.quote"
            ],
            [
              "",
              "urllib.quote"
            ],
            [
              "",
              "urlopen"
            ],
            [
              "",
              "response.read.decode"
            ],
            [
              "",
              "response.read"
            ],
            [
              "",
              "self.cmd"
            ],
            [
              "",
              "hasattr"
            ],
            [
              "",
              "self.process.stdin.flush"
            ],
            [
              "",
              "self.process.terminate"
            ],
            [
              "",
              "self.process.wait"
            ],
            [
              "",
              "self._cmd"
            ],
            [
              "",
              "res.strip"
            ],
            [
              "",
              "json.loads"
            ],
            [
              "",
              "self.cmd.replace"
            ],
            [
              "",
              "self.cmd"
            ],
            [
              "",
              "sys.stderr.write"
            ],
            [
              "",
              "Popen"
            ],
            [
              "",
              "p.communicate"
            ],
            [
              "",
              "json.loads"
            ],
            [
              "",
              "self.syscmd"
            ],
            [
              "",
              "sys.stderr.write"
            ],
            [
              "",
              "print"
            ],
            [
              "",
              "os.system"
            ],
            [
              "",
              "os.system"
            ],
            [
              "",
              "os.system"
            ],
            [
              "",
              "time.sleep"
            ],
            [
              "",
              "print"
            ],
            [
              "",
              "open"
            ],
            [
              "",
              "print"
            ],
            [
              "",
              "rlocal.cmd"
            ],
            [
              "",
              "rlocal.cmdj"
            ],
            [
              "",
              "print"
            ],
            [
              "",
              "print"
            ],
            [
              "",
              "open"
            ],
            [
              "",
              "rremote.cmd"
            ],
            [
              "",
              "print"
            ],
            [
              "",
              "print"
            ],
            [
              "",
              "print"
            ],
            [
              "",
              "open"
            ],
            [
              "",
              "rremote.cmd"
            ],
            [
              "",
              "print"
            ],
            [
              "",
              "print"
            ],
            [
              "",
              "os.system"
            ],
            [
              "",
              ".native"
            ],
            [
              ".native",
              ".native.RCore"
            ],
            [
              "subprocess",
              "PIPE"
            ],
            [
              "subprocess",
              "Popen"
            ],
            [
              "io",
              "TextIOWrapper"
            ],
            [
              "ctypes",
              "byref"
            ],
            [
              "ctypes",
              "c_ulong"
            ],
            [
              "ctypes",
              "create_string_buffer"
            ],
            [
              "",
              "ctypes"
            ],
            [
              "",
              "fcntl"
            ],
            [
              "",
              "io"
            ],
            [
              "",
              "json"
            ],
            [
              "",
              "os"
            ],
            [
              "",
              "r2lang"
            ],
            [
              "",
              "re"
            ],
            [
              "",
              "socket"
            ],
            [
              "",
              "subprocess"
            ],
            [
              "",
              "sys"
            ],
            [
              "",
              "time"
            ],
            [
              "",
              "urllib"
            ],
            [
              "",
              "urllib.error"
            ],
            [
              "",
              "urllib.request"
            ],
            [
              "",
              "urllib2"
            ],
            [
              "ctypes",
              "windll"
            ]
          ],
          "mbr": [
            "cbRead.value",
            "chBuf.value",
            "cmd.strip",
            "cmd.strip.replace",
            "fcntl.F_GETFL",
            "fcntl.F_SETFL",
            "fcntl.fcntl",
            "filename.startswith",
            "info.bin",
            "info.bin.machine",
            "json.loads",
            "os.O_NONBLOCK",
            "os.environ",
            "os.environ.R2PIPE_IN",
            "os.environ.R2PIPE_OUT",
            "os.environ.r2pipe_path",
            "os.name",
            "os.read",
            "os.system",
            "os.write",
            "out.decode",
            "p.communicate",
            "r.group",
            "r.read",
            "r2lang.cmd",
            "re.match",
            "res.decode",
            "res.strip",
            "response.read",
            "response.read.decode",
            "rlocal.cmd",
            "rlocal.cmdj",
            "rremote.cmd",
            "self._cmd",
            "self._cmd_http",
            "self._cmd_native",
            "self._cmd_pipe",
            "self._cmd_process",
            "self._cmd_rlang",
            "self._cmd_tcp",
            "self._process_stdout_wrapper",
            "self.cmd",
            "self.cmd.replace",
            "self.conn",
            "self.conn.connect",
            "self.conn.recv",
            "self.conn.sendall",
            "self.native",
            "self.native.cmd_str",
            "self.nonblocking",
            "self.pipe",
            "self.process",
            "self.process.stdin",
            "self.process.stdin.flush",
            "self.process.stdin.write",
            "self.process.stdout",
            "self.process.stdout.fileno",
            "self.process.stdout.read",
            "self.process.terminate",
            "self.process.wait",
            "self.syscmd",
            "self.uri",
            "self.url",
            "socket.AF_INET",
            "socket.SOCK_STREAM",
            "socket.socket",
            "str.encode",
            "sys.stderr",
            "sys.stderr.write",
            "sys.version_info",
            "time.sleep",
            "urllib.error",
            "urllib.error.URLError",
            "urllib.parse",
            "urllib.parse.quote",
            "urllib.quote",
            "urllib.request",
            "urllib.request.urlopen",
            "urllib2.URLError",
            "urllib2.urlopen",
            "windll.kernel32",
            "windll.kernel32.CreateFileA",
            "windll.kernel32.GetLastError",
            "windll.kernel32.ReadFile",
            "windll.kernel32.WaitNamedPipeA",
            "windll.kernel32.WriteFile"
          ],
          "metrics": {
            "ast": {
              "call_count": 115,
              "infinite_loop_count": 4,
              "max_array_length": 3,
              "max_concat_chain": 3,
              "max_depth": 19,
              "max_member_depth": 4,
              "max_numeric_array": 2,
              "member_count": 86,
              "node_count": 2887,
              "op.add": 13,
              "op.bor": 2,
              "op.land": 3,
              "op.mod": 2,
              "op.sub": 7,
              "op_density.add": 0,
              "op_density.bor": 0,
              "op_density.land": 0,
              "op_density.mod": 0,
              "op_density.sub": 0
            },
            "binary": {
              "peak_region_bytes": 8192,
              "peak_region_entropy": 5.35
            },
            "binds": {
              "count": 82
            },
            "comments": {
              "chars": 393,
              "count": 11,
              "lines": 11,
              "to_code_ratio": 0.03,
              "xxx_count": 1
            },
            "file": {
              "entropy": 5.24,
              "size": 9405
            },
            "functions": {
              "avg_length_lines": 15.5,
              "avg_name_length": 7.57,
              "avg_param_name_length": 3.79,
              "avg_params": 1.71,
              "code_ratio": 0.63,
              "count": 15,
              "density": 4.03,
              "length_stddev": 18.36,
              "max_length_lines": 77,
              "max_params": 3,
              "min_length_lines": 2,
              "no_params_count": 2
            },
            "identifiers": {
              "all_lowercase_ratio": 0.75,
              "all_uppercase_ratio": 0.11,
              "avg_entropy": 2.31,
              "avg_length": 6.88,
              "count": 562,
              "double_underscore_count": 2,
              "has_digit_ratio": 0.02,
              "high_entropy_count": 1,
              "high_entropy_ratio": 0.01,
              "length_stddev": 3.79,
              "max_length": 23,
              "min_length": 1,
              "numeric_suffix_count": 2,
              "reuse_ratio": 0.25,
              "sequential_names": 3,
              "single_char_count": 3,
              "single_char_ratio": 0.02,
              "underscore_prefix_count": 10,
              "unique": 142
            },
            "imports": {
              "count": 24,
              "relative": 2,
              "relative_ratio": 0.08,
              "stdlib_count": 13,
              "stdlib_ratio": 0.54,
              "third_party_count": 11,
              "third_party_ratio": 0.46
            },
            "references": {
              "declared_count": 2,
              "security_hold_count": 0,
              "unavailable_browser_script_count": 0,
              "unavailable_command_count": 0,
              "unavailable_vsix_url_count": 0,
              "unresolved_count": 2,
              "unresolved_extension_count": 0,
              "unresolved_required_extension_count": 0
            },
            "source": {
              "class_count": 1,
              "function_count": 14
            },
            "strings": {
              "avg_entropy": 2.52,
              "avg_length": 32.75,
              "bytes": 2784,
              "count": 85,
              "embedded_code_candidates": 2,
              "empty_count": 5,
              "entropy_stddev": 1.43,
              "max_length": 588,
              "path_count": 5,
              "shell": 1,
              "sql": 2,
              "url_count": 1
            },
            "text": {
              "avg_line_length": 26.1,
              "char_entropy": 5.24,
              "digit_ratio": 0.03,
              "empty_line_ratio": 0.09,
              "escape_density": 0.03,
              "hex_escape_count": 3,
              "identifier_density": 1.62,
              "identifiers_to_functions_ratio": 10.14,
              "import_density": 6.92,
              "imports_to_functions_ratio": 1.71,
              "last_line_length": 27,
              "line_length_stddev": 20.36,
              "lines": 347,
              "max_line_length": 128,
              "max_whitespace_run": 2,
              "mixed_indent": 1,
              "normalized_function_count": 0.75,
              "normalized_import_count": 1.29,
              "normalized_string_count": 4.56,
              "normalized_unique_identifiers": 16.83,
              "space_count": 820,
              "string_density": 0.24,
              "strings_to_functions_ratio": 6.07,
              "suspicious_identifier_ratio": 0.02,
              "suspicious_string_ratio": 0.06,
              "tab_count": 675,
              "top_char": 101,
              "top_char_null": 0,
              "top_char_ratio": 0.07,
              "unique_chars": 94,
              "whitespace_ratio": 0.2
            }
          },
          "tgt": [
            "Exception",
            "Popen",
            "RCore",
            "TextIOWrapper",
            "byref",
            "bytes",
            "c_ulong",
            "cmd.strip",
            "cmd.strip.replace",
            "create_string_buffer",
            "fcntl.fcntl",
            "filename.startswith",
            "getattr",
            "hasattr",
            "in_rlang",
            "int",
            "json.loads",
            "len",
            "open",
            "ord",
            "os.read",
            "os.system",
            "os.write",
            "out.decode",
            "p.communicate",
            "print",
            "r.group",
            "r.read",
            "r2lang.cmd",
            "re.match",
            "res.decode",
            "res.strip",
            "response.read",
            "response.read.decode",
            "rlocal.cmd",
            "rlocal.cmdj",
            "rremote.cmd",
            "self._cmd",
            "self.cmd",
            "self.cmd.replace",
            "self.conn.connect",
            "self.conn.recv",
            "self.conn.sendall",
            "self.native.cmd_str",
            "self.process.stdin.flush",
            "self.process.stdin.write",
            "self.process.stdout.fileno",
            "self.process.stdout.read",
            "self.process.terminate",
            "self.process.wait",
            "self.syscmd",
            "socket.socket",
            "str.encode",
            "sys.stderr.write",
            "time.sleep",
            "urllib.parse.quote",
            "urllib.quote",
            "urlopen",
            "windll.kernel32.CreateFileA",
            "windll.kernel32.GetLastError",
            "windll.kernel32.ReadFile",
            "windll.kernel32.WaitNamedPipeA",
            "windll.kernel32.WriteFile"
          ]
        },
        "id": 2,
        "mol": "O₂(CXe)H₇(Cm₁₄Db₅FOsPo₉Ti)Md₂(In₁₅Pt₂)",
        "path": "r2pipe-0.9.7.tar.gz!!r2pipe-0.9.7/r2pipe/__init__.py",
        "pid": 0,
        "risk": 23,
        "sha": "5e9d536d9eabe00b971922a822c5a096be5a73d2c98b5d577c4d745b5d27272e",
        "sid": 10810561361,
        "size": 9405,
        "supp": [
          {
            "by": [
              {
                "id": "micro-behaviors/process/create/shell/command-mode::python-os-system",
                "spans": [
                  [
                    8497,
                    9
                  ],
                  [
                    8520,
                    9
                  ],
                  [
                    8557,
                    9
                  ],
                  [
                    9378,
                    9
                  ]
                ]
              }
            ],
            "crit": "notable",
            "id": "micro-behaviors/process/create/shell/command-mode::python-os-system-text",
            "kind": "unless"
          }
        ],
        "traits": [
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "Subprocess import outside excluded contexts",
            "id": "metadata/import/builtin::python-subprocess-import",
            "spans": [
              [
                760,
                10
              ],
              [
                778,
                5
              ],
              [
                785,
                4
              ]
            ],
            "uses": [
              8,
              9,
              10
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports byref from ctypes",
            "id": "metadata/import/python/ctypes/byref::byref",
            "spans": [
              [
                1234,
                5
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports c_ulong from ctypes",
            "id": "metadata/import/python/ctypes/c_ulong::c_ulong",
            "spans": [
              [
                1241,
                7
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports create_string_buffer from ctypes",
            "id": "metadata/import/python/ctypes/create_string_buffer::create_string_buffer",
            "spans": [
              [
                1250,
                20
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports windll from ctypes",
            "id": "metadata/import/python/ctypes/windll::windll",
            "spans": [
              [
                1272,
                6
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports ctypes",
            "id": "metadata/import/python/ctypes::ctypes",
            "spans": [
              [
                1220,
                6
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports os",
            "id": "metadata/import/python/os::os",
            "spans": [
              [
                650,
                2
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports socket",
            "id": "metadata/import/python/socket::socket",
            "spans": [
              [
                705,
                6
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports PIPE from subprocess",
            "id": "metadata/import/python/subprocess/pipe::pipe",
            "spans": [
              [
                785,
                4
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports Popen from subprocess",
            "id": "metadata/import/python/subprocess/popen::popen",
            "spans": [
              [
                778,
                5
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports subprocess",
            "id": "metadata/import/python/subprocess::subprocess",
            "spans": [
              [
                760,
                10
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports urllib.error",
            "id": "metadata/import/python/urllib/error::urllib/error",
            "spans": [
              [
                1069,
                12
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports urllib.request",
            "id": "metadata/import/python/urllib/request::urllib/request",
            "spans": [
              [
                1012,
                14
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports urllib",
            "id": "metadata/import/python/urllib::urllib",
            "spans": [
              [
                719,
                6
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 3,
            "desc": "Python function accepts a command parameter",
            "id": "metadata/lang/source/naming/declaration::function-command-parameter",
            "spans": [
              [
                4644,
                29
              ],
              [
                5384,
                25
              ],
              [
                5586,
                26
              ],
              [
                6215,
                28
              ],
              [
                6497,
                27
              ],
              [
                6551,
                26
              ],
              [
                7036,
                19
              ],
              [
                7290,
                21
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "Python execution API call syntax",
            "id": "metadata/lang/source/syntax/call/invocation::python-execution-api-call-syntax",
            "spans": [
              [
                8497,
                9
              ]
            ]
          },
          {
            "conf": 0.7,
            "crit": 3,
            "desc": "References urllib.request.urlopen",
            "id": "micro-behaviors/communications/http/client/exchange::urllib-urlopen",
            "spans": [
              [
                1038,
                22
              ]
            ]
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "Calls function named urlopen",
            "id": "micro-behaviors/communications/http/client/exchange::urllib-urlopen-call-symbol",
            "spans": [
              [
                6687,
                7
              ]
            ]
          },
          {
            "conf": 0.75,
            "crit": 3,
            "desc": "References Python urllib HTTP client",
            "id": "micro-behaviors/communications/http/client/exchange::urllib-word",
            "spans": [
              [
                1012,
                14
              ],
              [
                1038,
                22
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Reads urllib response body",
            "id": "micro-behaviors/communications/http/client/response-body::urlopen-response-body-read",
            "spans": [
              [
                6753,
                13
              ]
            ]
          },
          {
            "conf": 0.75,
            "crit": 3,
            "desc": "urllib2 request client reference",
            "id": "micro-behaviors/communications/http/lib/urllib::urllib2-word",
            "spans": [
              [
                1149,
                15
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "Call contains a loopback address argument",
            "id": "micro-behaviors/communications/ip/construct::loopback-address-call-argument",
            "spans": [
              [
                8968,
                28
              ],
              [
                9237,
                29
              ]
            ]
          },
          {
            "conf": 0.7,
            "crit": 3,
            "desc": "Wait for named pipe server",
            "id": "micro-behaviors/communications/ipc/named-pipe::wait-named-pipe",
            "spans": [
              [
                2927,
                30
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 3,
            "desc": "Tuple-address connect call text",
            "id": "micro-behaviors/communications/socket/connect/attempt::python-tuple-address-connect-call",
            "spans": [
              [
                4005,
                10
              ]
            ]
          },
          {
            "conf": 0.7,
            "crit": 3,
            "desc": "socket.socket() call",
            "id": "micro-behaviors/communications/socket/create::socket-socket-call",
            "mbc": "C0001",
            "spans": [
              [
                3943,
                13
              ]
            ]
          },
          {
            "atk": "T1071",
            "conf": 0.55,
            "crit": 3,
            "desc": "AF_INET constant name",
            "id": "micro-behaviors/communications/socket/family::socket-af-inet-name",
            "mbc": "C0001",
            "spans": [
              [
                3964,
                7
              ]
            ]
          },
          {
            "atk": "T1071",
            "conf": 0.55,
            "crit": 3,
            "desc": "SOCK_STREAM constant name",
            "id": "micro-behaviors/communications/socket/family::socket-sock-stream-name",
            "mbc": "C0001",
            "spans": [
              [
                3980,
                11
              ]
            ]
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "Assigns recv result from socket-named receiver",
            "id": "micro-behaviors/communications/socket/receive::python-socket-named-recv-assignment",
            "spans": [
              [
                5476,
                17
              ]
            ]
          },
          {
            "atk": "T1071",
            "conf": 0.7,
            "crit": 3,
            "desc": "socket.recv() call",
            "id": "micro-behaviors/communications/socket/receive::socket-recv-call",
            "mbc": "C0001",
            "spans": [
              [
                5478,
                14
              ]
            ]
          },
          {
            "atk": "T1071",
            "conf": 0.7,
            "crit": 3,
            "desc": "Python socket sendall() call",
            "id": "micro-behaviors/communications/socket/send/message::python-sendall",
            "mbc": "C0001",
            "spans": [
              [
                5434,
                9
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "References a loopback HTTP URL",
            "id": "micro-behaviors/communications/url/host/http::loopback-http-url-reference",
            "spans": [
              [
                9243,
                17
              ]
            ]
          },
          {
            "conf": 1.0,
            "crit": 3,
            "desc": "Passes direct-IP URL to a call",
            "id": "micro-behaviors/communications/url/host/oob-http::direct-ip-url-call-argument",
            "spans": [
              [
                9237,
                23
              ]
            ]
          },
          {
            "conf": 0.75,
            "crit": 3,
            "desc": "HTTP URL string literal",
            "id": "micro-behaviors/communications/url/scheme::http-url-literal",
            "spans": [
              [
                9243,
                16
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Python cleartext HTTP URL literal",
            "id": "micro-behaviors/communications/url/scheme::python-cleartext-http-url-literal",
            "spans": [
              [
                9243,
                21
              ]
            ]
          },
          {
            "conf": 0.94,
            "crit": 3,
            "desc": "Handles HTTP, URL or connection errors",
            "id": "micro-behaviors/data/control-flow/error-handling/catch::network-error-handler",
            "mbc": "C0027",
            "spans": [
              [
                6787,
                15
              ]
            ]
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "exception suppression via try/except pass",
            "id": "micro-behaviors/data/control-flow/error-handling/suppress::silent-exception-pass",
            "mbc": "C0027",
            "spans": [
              [
                3409,
                17
              ]
            ]
          },
          {
            "conf": 0.98,
            "crit": 3,
            "desc": "URL-encodes data with urllib.parse",
            "id": "micro-behaviors/data/encode/url::urllib-quote-call",
            "spans": [
              [
                6607,
                18
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Parses JSON data with Python",
            "id": "micro-behaviors/data/parse/json::json-loads-call",
            "spans": [
              [
                7498,
                10
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Writes bytes through Python file descriptor",
            "id": "micro-behaviors/fs/write/file/descriptor::python-os-write-fd",
            "spans": [
              [
                5971,
                8
              ]
            ]
          },
          {
            "conf": 0.75,
            "crit": 3,
            "desc": "Python getattr dynamic attribute lookup",
            "id": "micro-behaviors/metaprogramming/reflection/inspect/member::python-getattr-call",
            "spans": [
              [
                4882,
                7
              ]
            ]
          },
          {
            "atk": "T1082",
            "conf": 0.8,
            "crit": 3,
            "desc": "Windows platform check via os.name == 'nt'",
            "id": "micro-behaviors/os/sysinfo/platform/runtime/platform::python-osname-nt-check",
            "mbc": "E1082",
            "spans": [
              [
                1197,
                15
              ]
            ]
          },
          {
            "atk": "T1059.006",
            "conf": 0.94,
            "crit": 3,
            "desc": "Python Popen launches through a shell",
            "id": "micro-behaviors/process/create/shell/command-mode::popen-shell-true",
            "mbc": "C0017",
            "spans": [
              [
                7880,
                47
              ]
            ]
          },
          {
            "atk": "T1059.006",
            "conf": 0.95,
            "crit": 3,
            "desc": "Executes shell commands via Python",
            "id": "micro-behaviors/process/create/shell/command-mode::python-os-system",
            "mbc": "E1059.006",
            "spans": [
              [
                8497,
                9
              ]
            ]
          },
          {
            "atk": "T1059",
            "conf": 0.9,
            "crit": 3,
            "desc": "os.system receives a literal command string",
            "id": "micro-behaviors/process/create/shell/command-mode::python-os-system-string-command",
            "spans": [
              [
                8497,
                9
              ]
            ]
          },
          {
            "atk": "T1059.006",
            "conf": 0.93,
            "crit": 3,
            "desc": "Popen runs a variable through the shell",
            "id": "micro-behaviors/process/create/shell/variable-command::python-popen-variable-shell",
            "spans": [
              [
                7880,
                47
              ]
            ]
          },
          {
            "atk": "T1059.006",
            "conf": 0.85,
            "crit": 3,
            "desc": "Launches a process with subprocess.Popen",
            "id": "micro-behaviors/process/create/subprocess/launch::popen-ast",
            "mbc": "C0017",
            "spans": [
              [
                4186,
                5
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Python debugger tool string (radare2)",
            "id": "micro-behaviors/process/debug/tool-markers::python-debugger-tool-string--radare2",
            "spans": [
              [
                107,
                7
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Reads or references standard input",
            "id": "micro-behaviors/process/stdio/read::stdin-read-or-reference",
            "spans": [
              [
                4755,
                13
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Writes data to a child process stdin",
            "id": "micro-behaviors/process/stdio/write::python-child-stdin-write",
            "spans": [
              [
                4762,
                13
              ]
            ]
          },
          {
            "conf": 0.84,
            "crit": 3,
            "desc": "Python references the stderr stream",
            "id": "micro-behaviors/process/stdio/write::python-stderr-stream-name",
            "spans": [
              [
                7612,
                6
              ]
            ]
          },
          {
            "conf": 0.84,
            "crit": 3,
            "desc": "Python references the stdout stream",
            "id": "micro-behaviors/process/stdio/write::python-stdout-stream-name",
            "spans": [
              [
                4222,
                6
              ],
              [
                4320,
                6
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 3,
            "desc": "pkill process termination command",
            "id": "micro-behaviors/process/terminate/command::pkill",
            "spans": [
              [
                8508,
                9
              ],
              [
                9389,
                14
              ]
            ]
          },
          {
            "conf": 0.75,
            "crit": 3,
            "desc": "Python sleep waits at least one second",
            "id": "micro-behaviors/time/sleep/interval::python-sleep-1s-plus-arg",
            "spans": [
              [
                8594,
                9
              ]
            ]
          },
          {
            "conf": 0.65,
            "crit": 3,
            "desc": "Calls a function named sleep in Python",
            "id": "micro-behaviors/time/sleep/interval::python-sleep-call",
            "spans": [
              [
                8590,
                10
              ]
            ]
          },
          {
            "atk": "T1071.001",
            "conf": 0.88,
            "crit": 3,
            "desc": "Hard-coded HTTP command endpoint URL",
            "id": "objectives/command-and-control/beacon/network/json::c2-command-result-endpoints",
            "mbc": "B0030",
            "spans": [
              [
                2006,
                25
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 2,
            "desc": "Versioned source-tree archive member",
            "id": "metadata/build/archive::versioned-source-tree-archive-member"
          },
          {
            "conf": 1.0,
            "crit": 2,
            "desc": "File uses a Python artifact extension",
            "id": "metadata/file/extension/identity::py"
          },
          {
            "conf": 0.3,
            "crit": 2,
            "desc": "Python package __init__.py file",
            "id": "metadata/file/size::init-py-file"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports fcntl",
            "id": "metadata/import/python/fcntl::fcntl",
            "spans": [
              [
                846,
                0
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports TextIOWrapper from io",
            "id": "metadata/import/python/io/textiowrapper::textiowrapper",
            "spans": [
              [
                741,
                0
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports io",
            "id": "metadata/import/python/io::io",
            "spans": [
              [
                731,
                0
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports json",
            "id": "metadata/import/python/json::json",
            "spans": [
              [
                693,
                0
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports r2lang",
            "id": "metadata/import/python/r2lang::r2lang",
            "spans": [
              [
                803,
                0
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports re",
            "id": "metadata/import/python/re::re",
            "spans": [
              [
                660,
                0
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports .native.RCore from .native",
            "id": "metadata/import/python/relative/1/native/rcore::rcore",
            "spans": [
              [
                900,
                0
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports .native",
            "id": "metadata/import/python/relative/1/native::relative/1/native",
            "spans": [
              [
                885,
                0
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports sys",
            "id": "metadata/import/python/sys::sys",
            "spans": [
              [
                670,
                0
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports time",
            "id": "metadata/import/python/time::time",
            "spans": [
              [
                681,
                0
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports urllib2",
            "id": "metadata/import/python/urllib2::urllib2",
            "spans": [
              [
                1130,
                0
              ]
            ]
          },
          {
            "conf": 0.5,
            "crit": 2,
            "desc": "Python write method call",
            "id": "micro-behaviors/data/control-flow/dispatch/named::python-write-method-call",
            "spans": [
              [
                7608,
                0
              ]
            ]
          },
          {
            "conf": 0.3,
            "crit": 2,
            "desc": "While-loop control flow",
            "id": "micro-behaviors/data/control-flow/loop/conditional::while-loop",
            "spans": [
              [
                2564,
                0
              ]
            ]
          },
          {
            "conf": 1.0,
            "crit": 2,
            "desc": "Python unconditional while-loop header",
            "id": "micro-behaviors/data/control-flow/loop/unconditional::python-unconditional-while-header",
            "spans": [
              [
                5160,
                0
              ]
            ]
          },
          {
            "conf": 0.78,
            "crit": 2,
            "desc": "Python stream-named write call text",
            "id": "micro-behaviors/data/stream/write::python-named-stream-write",
            "spans": [
              [
                7612,
                0
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 2,
            "desc": "Python open() expression reference",
            "id": "micro-behaviors/fs/file/open/unspecified::python-open-reference",
            "spans": [
              [
                547,
                0
              ]
            ]
          },
          {
            "conf": 0.5,
            "crit": 2,
            "desc": ".cmd extension reference",
            "id": "micro-behaviors/fs/path/extension::cmd-dup",
            "spans": [
              [
                1737,
                0
              ]
            ]
          },
          {
            "atk": "T1005",
            "conf": 0.86,
            "crit": 2,
            "desc": "Opens file in default read mode",
            "id": "micro-behaviors/fs/read/file/handle::file-open-content",
            "mbc": "E1005",
            "spans": [
              [
                8973,
                0
              ]
            ]
          },
          {
            "conf": 0.88,
            "crit": 1,
            "desc": "Natural-language command word",
            "id": "metadata/lang/natural/vocabulary/content-word::command-word-token",
            "spans": [
              [
                354,
                0
              ]
            ]
          },
          {
            "conf": 0.88,
            "crit": 1,
            "desc": "Control-action verb followed by alphabetic text",
            "id": "metadata/lang/natural/vocabulary/content-word::control-action-prose-fragment",
            "spans": [
              [
                7062,
                0
              ]
            ]
          },
          {
            "conf": 0.88,
            "crit": 1,
            "desc": "Data-access verb token",
            "id": "metadata/lang/natural/vocabulary/content-word::data-access-verb-token",
            "spans": [
              [
                567,
                0
              ]
            ]
          },
          {
            "conf": 0.88,
            "crit": 1,
            "desc": "English edit-action verb token",
            "id": "metadata/lang/natural/vocabulary/content-word::english-edit-verb-token",
            "spans": [
              [
                4695,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"the\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-1",
            "spans": [
              [
                103,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"and\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-2",
            "spans": [
              [
                458,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"that\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-3",
            "spans": [
              [
                397,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"with\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-6",
            "spans": [
              [
                98,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"this\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-7",
            "spans": [
              [
                58,
                0
              ]
            ]
          },
          {
            "conf": 0.6,
            "crit": 1,
            "desc": "Python stdin keyword argument",
            "id": "metadata/lang/source/syntax/argument::py-stdin-argument",
            "spans": [
              [
                4210,
                0
              ]
            ]
          },
          {
            "conf": 0.4,
            "crit": 1,
            "desc": "Python stdout keyword argument",
            "id": "metadata/lang/source/syntax/argument::py-stdout-argument",
            "spans": [
              [
                4222,
                0
              ]
            ]
          },
          {
            "conf": 0.88,
            "crit": 1,
            "desc": "31-bit signed integer maximum literal",
            "id": "micro-behaviors/crypto/key/recover::int31-max-keyspace-literal",
            "mbc": "C0029",
            "spans": [
              [
                1295,
                0
              ]
            ]
          },
          {
            "conf": 0.75,
            "crit": 1,
            "desc": "Python one-second-plus sleep",
            "id": "micro-behaviors/time/sleep/interval::python-sleep-1s-plus",
            "spans": [
              [
                8590,
                0
              ],
              [
                8594,
                0
              ]
            ],
            "uses": [
              52,
              53
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "Imports a Python network client library",
            "id": "metadata/import/package::python-network-client-imports",
            "spans": [
              [
                1012,
                14
              ],
              [
                1069,
                12
              ]
            ],
            "uses": [
              7,
              11,
              12,
              13
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Source calls an HTTP client API",
            "id": "micro-behaviors/communications/http/client/exchange::source-http-client-call",
            "spans": [
              [
                6687,
                7
              ]
            ],
            "uses": [
              17
            ]
          },
          {
            "conf": 0.92,
            "crit": 3,
            "desc": "Reads a remote HTTP response body",
            "id": "micro-behaviors/communications/http/client/response-body::remote-response-body-read",
            "spans": [
              [
                6753,
                13
              ]
            ],
            "uses": [
              19
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "References HTTP client request operations",
            "id": "micro-behaviors/communications/http/request/client::http-request-operation",
            "spans": [
              [
                6687,
                7
              ]
            ],
            "uses": [
              17
            ]
          },
          {
            "conf": 1.0,
            "crit": 3,
            "desc": "Python socket creation or socket-type constants",
            "id": "micro-behaviors/communications/socket/create::socket-creation",
            "mbc": "C0001",
            "spans": [
              [
                3943,
                13
              ]
            ],
            "uses": [
              24,
              25,
              26
            ]
          },
          {
            "atk": "T1071",
            "conf": 0.85,
            "crit": 3,
            "desc": "Python receives data from a socket",
            "id": "micro-behaviors/communications/socket/receive::socket-receive",
            "mbc": "C0001",
            "spans": [
              [
                5478,
                14
              ]
            ],
            "uses": [
              28
            ]
          },
          {
            "conf": 1.0,
            "crit": 3,
            "desc": "Python JSON parsing or serialization reference",
            "id": "micro-behaviors/data/codec::python-json-transform-reference",
            "spans": [
              [
                7498,
                10
              ]
            ],
            "uses": [
              37
            ]
          },
          {
            "atk": "T1059",
            "conf": 0.9,
            "crit": 3,
            "desc": "Executes commands through a shell",
            "id": "micro-behaviors/process/create/shell/interpreter::shell-execution-capability",
            "mbc": "E1059",
            "spans": [
              [
                8497,
                9
              ]
            ],
            "uses": [
              42
            ]
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "Python command call or call-like text",
            "id": "micro-behaviors/process/create/subprocess/launch::python-command-exec-any",
            "spans": [
              [
                8497,
                9
              ]
            ],
            "uses": [
              42
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "Python process-launch evidence",
            "id": "micro-behaviors/process/create/subprocess/launch::python-process-launch-evidence",
            "spans": [
              [
                4186,
                5
              ]
            ],
            "uses": [
              45
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Python subprocess launch call sites",
            "id": "micro-behaviors/process/create/subprocess/launch::python-subprocess-launch-calls",
            "spans": [
              [
                4186,
                5
              ]
            ],
            "uses": [
              45
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Python debugger tool string",
            "id": "micro-behaviors/process/debug/tool-markers::python-debugger-tool-string",
            "spans": [
              [
                107,
                7
              ]
            ],
            "uses": [
              46
            ]
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "Runs pkill or a forced kill command",
            "id": "micro-behaviors/process/terminate/command::pkill-or-force-kill",
            "spans": [
              [
                8508,
                14
              ]
            ],
            "uses": [
              51
            ]
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "HTTP client evidence or Python response streaming",
            "id": "micro-behaviors/communications/http/client/exchange::http-client-markers-or-response-stream",
            "spans": [
              [
                6687,
                7
              ]
            ],
            "uses": [
              92
            ]
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "HTTP request evidence or Python response streaming",
            "id": "micro-behaviors/communications/http/client/exchange::http-request-markers-or-response-stream",
            "spans": [
              [
                6687,
                7
              ]
            ],
            "uses": [
              92
            ]
          },
          {
            "conf": 0.94,
            "crit": 3,
            "desc": "Child process execution or API evidence",
            "id": "micro-behaviors/process/create/exec::child-process-execution",
            "spans": [
              [
                8497,
                9
              ]
            ],
            "uses": [
              96
            ]
          },
          {
            "atk": "T1105,T1027.009",
            "conf": 0.9,
            "crit": 3,
            "desc": "Fetches a remote body over HTTP",
            "id": "objectives/execution/staging/http::remote-fetch-alternative",
            "spans": [
              [
                6753,
                13
              ]
            ],
            "uses": [
              91
            ]
          },
          {
            "conf": 0.82,
            "crit": 3,
            "desc": "Python urllib urlopen reference or call",
            "id": "micro-behaviors/communications/http/client/exchange::urllib-urlopen-call",
            "spans": [
              [
                1038,
                22
              ],
              [
                6687,
                7
              ]
            ],
            "uses": [
              16,
              17
            ]
          },
          {
            "conf": 0.7,
            "crit": 3,
            "desc": "Uses common HTTP client APIs",
            "id": "micro-behaviors/communications/http/request/client::http-client",
            "spans": [
              [
                1012,
                14
              ],
              [
                1038,
                22
              ]
            ],
            "uses": [
              18
            ]
          },
          {
            "atk": "T1071",
            "conf": 0.7,
            "crit": 3,
            "desc": "Socket data transfer operations",
            "id": "micro-behaviors/communications/socket/receive::socket-data-transfer",
            "mbc": "C0001",
            "spans": [
              [
                5434,
                9
              ],
              [
                5478,
                14
              ]
            ],
            "uses": [
              28,
              29
            ]
          },
          {
            "atk": "T1059.006",
            "conf": 0.8,
            "crit": 3,
            "desc": "Python subprocess API launches a child process",
            "id": "micro-behaviors/process/create/subprocess/launch::process-execution",
            "spans": [
              [
                4186,
                5
              ]
            ],
            "uses": [
              45
            ]
          },
          {
            "conf": 0.8,
            "crit": 3,
            "desc": "Python process execution capability",
            "id": "micro-behaviors/process/create/subprocess/launch::python-exec-capability",
            "spans": [
              [
                8497,
                9
              ]
            ],
            "uses": [
              42
            ]
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "File can issue HTTP requests",
            "id": "micro-behaviors/communications/http/request/client::http-request-capability",
            "spans": [
              [
                1012,
                14
              ],
              [
                1038,
                22
              ]
            ],
            "uses": [
              107
            ]
          },
          {
            "conf": 0.92,
            "crit": 3,
            "desc": "Child-process call or call-like text",
            "id": "micro-behaviors/process/create/subprocess/launch::process-launch-call-text",
            "spans": [
              [
                4186,
                5
              ]
            ],
            "uses": [
              109
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Sends an HTTP request with a Python client library",
            "id": "micro-behaviors/communications/http/request/client::request-python",
            "spans": [
              [
                1038,
                22
              ],
              [
                6687,
                7
              ]
            ],
            "uses": [
              106
            ]
          },
          {
            "conf": 0.8,
            "crit": 3,
            "desc": "Python HTTP client or socket I/O",
            "id": "micro-behaviors/communications/transfer::python-http-or-socket-io",
            "spans": [
              [
                1038,
                22
              ],
              [
                5434,
                9
              ],
              [
                5478,
                14
              ],
              [
                6687,
                7
              ]
            ],
            "uses": [
              106,
              108
            ]
          }
        ],
        "type": "python"
      },
      {
        "analysis_gaps": [
          "flow-graph-limited",
          "flow-query-incomplete"
        ],
        "ctx": [
          {
            "col": 1,
            "line": 1,
            "ln": 0,
            "s": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport sys\nfrom ctypes import CDLL, Structure, WinDLL, addressof, c_char_p, c_void_p\nfrom ctypes.util import find_library\n\nif sys.platform.startswith('win'):\n        lib = WinDLL(find_library('r_core'))\nelse:\n        lib = CDLL(find_library('r_core'))\n\n\nclass AddressHolder(object):\n        def __get__(self, obj, type_):\n                if getattr(obj, '_address', None) is None:\n                        obj._address = addressof(obj)\n                return obj._address\n\n    "
          },
          {
            "col": 31,
            "line": 34,
            "ln": 961,
            "s": "f.args:\n                                self.method.argtypes = [eval(x.strip()) for x in self.args.split(',')]\n                        self.method.restype = eval(self.ret) if self.ret else None\n  "
          },
          {
            "col": 17,
            "line": 54,
            "ln": 1770,
            "s": "ll__(self, *a):\n                result = self.method(self._o, *a)\n                if self.ret2:\n        "
          },
          {
            "col": 2,
            "line": 72,
            "ln": 2340,
            "s": "       if ret:\n                if ret[0] \u003e= 'A' and ret[0] \u003c= 'Z':\n                        x = ret.find('\u003c')\n                        if x != -1:\n  "
          },
          {
            "col": 13,
            "line": 100,
            "ln": 3318,
            "s": "()\n#  c.cmd_str(\"o /bin/ls\")\n#  print(c)\n#  print(c.cmd_str(\"s entry0;pd 20\"))\n#  c.free();\n"
          }
        ],
        "depth": 1,
        "facts": {
          "funcs": [
            [
              "__get__",
              338
            ],
            [
              "__set__",
              527
            ],
            [
              "__init__",
              635
            ],
            [
              "__call__",
              869
            ],
            [
              "__init__",
              1579
            ],
            [
              "__call__",
              1762
            ],
            [
              "__get__",
              2186
            ],
            [
              "register",
              2280
            ],
            [
              "__init__",
              2913
            ]
          ],
          "imp": [
            [
              "",
              "sys.platform.startswith"
            ],
            [
              "",
              "WinDLL"
            ],
            [
              "",
              "find_library"
            ],
            [
              "",
              "CDLL"
            ],
            [
              "",
              "find_library"
            ],
            [
              "",
              "getattr"
            ],
            [
              "",
              "addressof"
            ],
            [
              "",
              "getattr"
            ],
            [
              "",
              "eval"
            ],
            [
              "",
              "x.strip"
            ],
            [
              "",
              "self.args.split"
            ],
            [
              "",
              "eval"
            ],
            [
              "",
              "list"
            ],
            [
              "",
              "enumerate"
            ],
            [
              "",
              "self.method.decode"
            ],
            [
              "",
              "self.method"
            ],
            [
              "",
              "self.method"
            ],
            [
              "",
              "self.method"
            ],
            [
              "",
              "eval"
            ],
            [
              "",
              "eval"
            ],
            [
              "",
              "getattr"
            ],
            [
              "",
              "ret.find"
            ],
            [
              "",
              "WrappedRMethod"
            ],
            [
              "",
              "WrappedApiMethod"
            ],
            [
              "",
              "Structure.__init__"
            ],
            [
              "",
              "r_core_new"
            ],
            [
              "",
              "AddressHolder"
            ],
            [
              "",
              "register"
            ],
            [
              "",
              "register"
            ],
            [
              "ctypes",
              "CDLL"
            ],
            [
              "ctypes",
              "Structure"
            ],
            [
              "ctypes",
              "WinDLL"
            ],
            [
              "ctypes",
              "addressof"
            ],
            [
              "ctypes",
              "c_char_p"
            ],
            [
              "ctypes",
              "c_void_p"
            ],
            [
              "",
              "ctypes"
            ],
            [
              "",
              "ctypes.util"
            ],
            [
              "ctypes.util",
              "find_library"
            ],
            [
              "",
              "sys"
            ]
          ],
          "mbr": [
            "Structure.__init__",
            "lib.r_core_new",
            "obj._address",
            "obj._o",
            "r_core_new.restype",
            "ret.find",
            "self._o",
            "self.args",
            "self.args.split",
            "self.args_set",
            "self.cname",
            "self.last",
            "self.method",
            "self.method.argtypes",
            "self.method.decode",
            "self.method.restype",
            "self.ret",
            "self.ret2",
            "sys.platform",
            "sys.platform.startswith",
            "x.strip"
          ],
          "metrics": {
            "ast": {
              "call_count": 30,
              "max_concat_chain": 3,
              "max_depth": 16,
              "max_member_depth": 3,
              "member_count": 21,
              "node_count": 945,
              "op.add": 2,
              "op.land": 1,
              "op.sub": 1,
              "op_density.add": 0,
              "op_density.land": 0,
              "op_density.sub": 0
            },
            "binary": {
              "peak_region_bytes": 1362,
              "peak_region_entropy": 4.45
            },
            "binds": {
              "count": 34
            },
            "comments": {
              "chars": 138,
              "count": 8,
              "lines": 8,
              "to_code_ratio": 0.08
            },
            "file": {
              "entropy": 3.97,
              "size": 3410
            },
            "functions": {
              "avg_length_lines": 7.11,
              "avg_name_length": 7.67,
              "avg_param_name_length": 3.84,
              "avg_params": 2.78,
              "code_ratio": 0.62,
              "count": 9,
              "density": 8.65,
              "length_stddev": 4.53,
              "max_length_lines": 16,
              "max_params": 4,
              "min_length_lines": 2,
              "single_char_params": 2
            },
            "identifiers": {
              "all_lowercase_ratio": 0.86,
              "all_uppercase_ratio": 0.02,
              "avg_entropy": 2.18,
              "avg_length": 6.57,
              "count": 229,
              "double_underscore_count": 4,
              "has_digit_ratio": 0.02,
              "length_stddev": 3.37,
              "max_length": 16,
              "min_length": 1,
              "numeric_suffix_count": 1,
              "reuse_ratio": 0.25,
              "sequential_names": 3,
              "single_char_count": 3,
              "single_char_ratio": 0.05,
              "underscore_prefix_count": 6,
              "unique": 58
            },
            "imports": {
              "count": 10,
              "stdlib_count": 3,
              "stdlib_ratio": 0.3,
              "third_party_count": 7,
              "third_party_ratio": 0.7
            },
            "source": {
              "class_count": 4,
              "function_count": 5
            },
            "strings": {
              "avg_entropy": 1.88,
              "avg_length": 6.53,
              "bytes": 124,
              "count": 19,
              "entropy_stddev": 1.17,
              "max_length": 18
            },
            "text": {
              "avg_line_length": 31.79,
              "char_entropy": 3.97,
              "digit_ratio": 0.01,
              "empty_line_ratio": 0.19,
              "identifier_density": 2.2,
              "identifiers_to_functions_ratio": 6.44,
              "import_density": 9.62,
              "imports_to_functions_ratio": 1.11,
              "last_line_length": 12,
              "line_length_stddev": 21.61,
              "lines": 104,
              "max_line_length": 102,
              "max_whitespace_run": 2,
              "normalized_function_count": 0.88,
              "normalized_import_count": 0.98,
              "normalized_string_count": 1.86,
              "normalized_unique_identifiers": 8.66,
              "repeated_char_sequences": 49,
              "space_count": 1336,
              "string_density": 0.18,
              "strings_to_functions_ratio": 2.11,
              "suspicious_identifier_ratio": 0.05,
              "top_char": 101,
              "top_char_null": 0,
              "top_char_ratio": 0.06,
              "unique_chars": 66,
              "whitespace_ratio": 0.42
            }
          },
          "tgt": [
            "AddressHolder",
            "CDLL",
            "Structure.__init__",
            "WinDLL",
            "WrappedApiMethod",
            "WrappedRMethod",
            "addressof",
            "enumerate",
            "eval",
            "find_library",
            "getattr",
            "list",
            "r_core_new",
            "register",
            "ret.find",
            "self.args.split",
            "self.method",
            "self.method.decode",
            "sys.platform.startswith",
            "x.strip"
          ]
        },
        "id": 3,
        "mol": "H₃(DsPo)Md₂(In₉Pt)",
        "path": "r2pipe-0.9.7.tar.gz!!r2pipe-0.9.7/r2pipe/native.py",
        "pid": 0,
        "risk": 5,
        "sha": "557f18c4db7709991d1ead64a164e6a70ef7c80445a5a6be03e9b1501428eac6",
        "sid": 10810561360,
        "size": 3410,
        "traits": [
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports addressof from ctypes",
            "id": "metadata/import/python/ctypes/addressof::addressof",
            "spans": [
              [
                102,
                9
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports c_char_p from ctypes",
            "id": "metadata/import/python/ctypes/c_char_p::c_char_p",
            "spans": [
              [
                113,
                8
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports c_void_p from ctypes",
            "id": "metadata/import/python/ctypes/c_void_p::c_void_p",
            "spans": [
              [
                123,
                8
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports CDLL from ctypes",
            "id": "metadata/import/python/ctypes/cdll::cdll",
            "spans": [
              [
                77,
                4
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports Structure from ctypes",
            "id": "metadata/import/python/ctypes/structure::structure",
            "spans": [
              [
                83,
                9
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports find_library from ctypes.util",
            "id": "metadata/import/python/ctypes/util/find_library::find_library",
            "spans": [
              [
                156,
                12
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports ctypes.util",
            "id": "metadata/import/python/ctypes/util::ctypes/util",
            "spans": [
              [
                137,
                11
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports WinDLL from ctypes",
            "id": "metadata/import/python/ctypes/windll::windll",
            "spans": [
              [
                94,
                6
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "imports ctypes",
            "id": "metadata/import/python/ctypes::ctypes",
            "spans": [
              [
                63,
                6
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "Python execution API call syntax",
            "id": "metadata/lang/source/syntax/call/invocation::python-execution-api-call-syntax",
            "spans": [
              [
                1025,
                4
              ]
            ]
          },
          {
            "conf": 0.7,
            "crit": 3,
            "desc": "CDLL( call pattern",
            "id": "micro-behaviors/dylib/load/runtime::cdll-paren",
            "spans": [
              [
                270,
                4
              ]
            ]
          },
          {
            "conf": 0.75,
            "crit": 3,
            "desc": "Python getattr dynamic attribute lookup",
            "id": "micro-behaviors/metaprogramming/reflection/inspect/member::python-getattr-call",
            "spans": [
              [
                388,
                7
              ]
            ]
          },
          {
            "atk": "T1059.006",
            "conf": 0.85,
            "crit": 3,
            "desc": "Python eval() built-in function",
            "id": "micro-behaviors/process/interpreter/eval/python-builtins::eval-builtin",
            "mbc": "E1059",
            "spans": [
              [
                1025,
                4
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 2,
            "desc": "Versioned source-tree archive member",
            "id": "metadata/build/archive::versioned-source-tree-archive-member"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports sys",
            "id": "metadata/import/python/sys::sys",
            "spans": [
              [
                54,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"and\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-2",
            "spans": [
              [
                2388,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"for\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-5",
            "spans": [
              [
                1041,
                0
              ]
            ]
          }
        ],
        "type": "python"
      },
      {
        "analysis_gaps": [
          "flow-query-incomplete"
        ],
        "ctx": [
          {
            "col": 1,
            "line": 1,
            "ln": 0,
            "s": "from distutils.core import setup\nimport r2pipe\n\nwith open('README.md') as readme_file:\n    readme = readme_file.read()\n\nsetup(\n    name='r2pipe',\n    version=r2pipe.version(),\n    license='MIT',\n    description='Pipe interface for radare2',\n    long_description=readme,\n    author='pancake',\n    author_email='pancake@nopcode.org',\n    url='http://rada.re',\n    package_dir={'r2pipe': 'r2pipe'},\n    packages=['r2pipe']\n)\n"
          }
        ],
        "depth": 1,
        "facts": {
          "imp": [
            [
              "",
              "open"
            ],
            [
              "",
              "readme_file.read"
            ],
            [
              "",
              "setup"
            ],
            [
              "",
              "r2pipe.version"
            ],
            [
              "",
              "distutils.core"
            ],
            [
              "",
              "r2pipe"
            ],
            [
              "distutils.core",
              "setup"
            ]
          ],
          "mbr": [
            "r2pipe.version",
            "readme_file.read"
          ],
          "metrics": {
            "ast": {
              "call_count": 4,
              "max_array_length": 1,
              "max_depth": 8,
              "max_member_depth": 2,
              "member_count": 2,
              "node_count": 143
            },
            "binary": {
              "peak_region_bytes": 422,
              "peak_region_entropy": 4.67
            },
            "binds": {
              "count": 1
            },
            "file": {
              "entropy": 4.67,
              "size": 422
            },
            "identifiers": {
              "all_lowercase_ratio": 0.94,
              "avg_entropy": 2.57,
              "avg_length": 7.44,
              "count": 23,
              "has_digit_ratio": 0.06,
              "high_entropy_count": 1,
              "high_entropy_ratio": 0.06,
              "length_stddev": 3.45,
              "max_length": 16,
              "min_length": 3,
              "reuse_ratio": 0.78,
              "unique": 18
            },
            "imports": {
              "count": 3,
              "third_party_count": 3,
              "third_party_ratio": 1
            },
            "references": {
              "declared_count": 1,
              "security_hold_count": 0,
              "unavailable_browser_script_count": 0,
              "unavailable_command_count": 0,
              "unavailable_vsix_url_count": 0,
              "unresolved_count": 0,
              "unresolved_extension_count": 0,
              "unresolved_required_extension_count": 0
            },
            "strings": {
              "avg_entropy": 2.63,
              "avg_length": 10.2,
              "bytes": 102,
              "count": 10,
              "email_count": 1,
              "entropy_stddev": 0.61,
              "max_length": 26,
              "url_count": 1
            },
            "text": {
              "avg_line_length": 22.44,
              "char_entropy": 4.67,
              "digit_ratio": 0.03,
              "empty_line_ratio": 0.11,
              "identifier_density": 1.28,
              "import_density": 16.67,
              "last_line_length": 1,
              "line_length_stddev": 13.64,
              "lines": 18,
              "max_line_length": 45,
              "max_whitespace_run": 1,
              "normalized_import_count": 0.71,
              "normalized_string_count": 2.36,
              "normalized_unique_identifiers": 4.32,
              "space_count": 57,
              "string_density": 0.56,
              "top_char": 101,
              "top_char_null": 0,
              "top_char_ratio": 0.09,
              "unique_chars": 45,
              "whitespace_ratio": 0.18
            }
          },
          "tgt": [
            "open",
            "r2pipe.version",
            "readme_file.read",
            "setup"
          ]
        },
        "id": 4,
        "mol": "H₂(CmPo)Md₂(BkPa₂)",
        "path": "r2pipe-0.9.7.tar.gz!!r2pipe-0.9.7/setup.py",
        "pid": 0,
        "risk": 5,
        "sha": "221a95c57390d658341002845780b8f6387de75e55b4603709fd2dec13d80d35",
        "sid": 10810561359,
        "size": 422,
        "supp": [
          {
            "by": [
              {
                "id": "text",
                "spans": [
                  [
                    20,
                    7
                  ]
                ]
              }
            ],
            "crit": "notable",
            "id": "metadata/file/size::small-no-imports",
            "kind": "unless"
          }
        ],
        "traits": [
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "distutils packaging import",
            "id": "metadata/build/pip::packaging-distutils-import",
            "spans": [
              [
                0,
                14
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "Packaging setup API import or call",
            "id": "metadata/build/pip::packaging-setup-api-import",
            "spans": [
              [
                0,
                14
              ]
            ],
            "uses": [
              0
            ]
          },
          {
            "conf": 0.98,
            "crit": 3,
            "desc": "Root Python setup.py packaging file",
            "id": "metadata/build/pip::root-setup-py",
            "spans": [
              [
                0,
                14
              ]
            ],
            "uses": [
              1,
              3
            ]
          },
          {
            "conf": 0.98,
            "crit": 3,
            "desc": "setup.py path outside vendored trees",
            "id": "metadata/build/pip::root-setup-py-path"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "setup.py inside a versioned sdist root",
            "id": "metadata/build/pip::versioned-sdist-root-setup-py"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "Filename is setup.py",
            "id": "metadata/package/files/included::setup-py-basename"
          },
          {
            "conf": 0.8,
            "crit": 3,
            "desc": "Python distutils setup or command import",
            "id": "metadata/package/files/wheel-sdist::distutils-command-import-content",
            "spans": [
              [
                0,
                32
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Code embeds cleartext HTTP URL literal",
            "id": "micro-behaviors/communications/url/scheme::cleartext-http-url-code-literal",
            "spans": [
              [
                341,
                14
              ]
            ]
          },
          {
            "conf": 0.75,
            "crit": 3,
            "desc": "HTTP URL string literal",
            "id": "micro-behaviors/communications/url/scheme::http-url-literal",
            "spans": [
              [
                341,
                14
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Python cleartext HTTP URL literal",
            "id": "micro-behaviors/communications/url/scheme::python-cleartext-http-url-literal",
            "spans": [
              [
                341,
                14
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Python debugger tool string (radare2)",
            "id": "micro-behaviors/process/debug/tool-markers::python-debugger-tool-string--radare2",
            "spans": [
              [
                231,
                7
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 2,
            "desc": "Versioned source-tree archive member",
            "id": "metadata/build/archive::versioned-source-tree-archive-member"
          },
          {
            "conf": 0.99,
            "crit": 2,
            "desc": "Xcode or Python build entry filename",
            "id": "metadata/build/config::canonical-build-entry-basename"
          },
          {
            "conf": 1.0,
            "crit": 2,
            "desc": "Python setup.py or setup.cfg file",
            "id": "metadata/build/pip::setup-py"
          },
          {
            "conf": 1.0,
            "crit": 2,
            "desc": "File uses a Python artifact extension",
            "id": "metadata/file/extension/identity::py"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports setup from distutils.core",
            "id": "metadata/import/python/distutils/core/setup::setup",
            "spans": [
              [
                27,
                0
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports distutils.core",
            "id": "metadata/import/python/distutils/core::distutils/core",
            "spans": [
              [
                5,
                0
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports r2pipe",
            "id": "metadata/import/python/r2pipe::r2pipe",
            "spans": [
              [
                40,
                0
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 2,
            "desc": "Python open() expression reference",
            "id": "micro-behaviors/fs/file/open/unspecified::python-open-reference",
            "spans": [
              [
                53,
                0
              ]
            ]
          },
          {
            "atk": "T1005",
            "conf": 0.6,
            "crit": 2,
            "desc": "Reads file content (Python)",
            "id": "micro-behaviors/fs/read/file/content/unspecified::file-read-content",
            "mbc": "E1005",
            "spans": [
              [
                74,
                0
              ]
            ]
          },
          {
            "atk": "T1005",
            "conf": 0.86,
            "crit": 2,
            "desc": "Opens file in default read mode",
            "id": "micro-behaviors/fs/read/file/handle::file-open-content",
            "mbc": "E1005",
            "spans": [
              [
                53,
                0
              ]
            ]
          },
          {
            "conf": 0.88,
            "crit": 1,
            "desc": "Data-access verb token",
            "id": "metadata/lang/natural/vocabulary/content-word::data-access-verb-token",
            "spans": [
              [
                112,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"for\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-5",
            "spans": [
              [
                227,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"with\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-6",
            "spans": [
              [
                48,
                0
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 1,
            "desc": "Shallow agent skill bundle script file",
            "id": "metadata/package/agent-skill::agent-skill-bundle-script-file"
          },
          {
            "conf": 0.9,
            "crit": 1,
            "desc": "Nested agent skill bundle script file",
            "id": "metadata/package/agent-skill::agent-skill-nested-bundle-script-file"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Python debugger tool string",
            "id": "micro-behaviors/process/debug/tool-markers::python-debugger-tool-string",
            "spans": [
              [
                231,
                7
              ]
            ],
            "uses": [
              10
            ]
          }
        ],
        "type": "python"
      }
    ],
    "v": 8
  }
}