nil0x42/phpsploit

View on GitHub

Showing 269 of 269 total issues

Function _build_env has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

def _build_env(self, raw_vars):
"""collect the server related vars, usefull for further
plugins usage and framework management.
written at self.CNF['SRV'] on the interface's core.
"""
Severity: Minor
Found in src/core/tunnel/connector.py - About 3 hrs to fix

Cyclomatic complexity is too high in method build_multipart_request. (15)
Open

def build_multipart_request(self, method, php_payload):
"""build a multipart request for `php_payload` with HTTP `method`
 
For infos about return format, read build_request() docstring.
"""
Severity: Minor
Found in src/core/tunnel/handler.py by radon

Cyclomatic complexity is too high in method __setitem__. (14)
Open

def __setitem__(self, name, value):
# if the set value is a *LineBuffer instance, just do it!
if isinstance(value, linebuf.AbstractLineBuffer):
return super().__setitem__(name, value)
 
 
Severity: Minor
Found in src/core/session/settings/__init__.py by radon

Function run has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
Open

def run(self, argv):
"""run current plugin
"""
self.argv = argv
from api import server
Severity: Minor
Found in src/core/plugins/Plugin.py - About 3 hrs to fix

Similar blocks of code found in 2 locations. Consider refactoring.
Open

Severity: Major
Found in src/core/session/settings/BACKDOOR.py and 1 other location - About 3 hrs to fix
src/core/session/settings/REQ_HEADER_PAYLOAD.py on lines 0..33

Similar blocks of code found in 2 locations. Consider refactoring.
Open

Severity: Major
Found in src/core/session/settings/REQ_HEADER_PAYLOAD.py and 1 other location - About 3 hrs to fix
src/core/session/settings/BACKDOOR.py on lines 0..32

Cyclomatic complexity is too high in method complete_session. (13)
Open

@staticmethod
def complete_session(text, line, *_):
"""autocompletion for `session` command"""
argv = line.split()
if (len(argv) == 2 and line[-1] != " ") or len(argv) == 1:
Severity: Minor
Found in src/ui/interface.py by radon

Cyclomatic complexity is too high in function colorize. (13)
Open

def colorize(*args):
"""Takes single or multiple strings as argument, and colorize them.
 
Syntax:
* Ansi color/style can be defined by providing a CamelCase
Severity: Minor
Found in src/ui/color.py by radon

Similar blocks of code found in 2 locations. Consider refactoring.
Open

Severity: Major
Found in src/core/session/settings/REQ_MAX_HEADER_SIZE.py and 1 other location - About 2 hrs to fix
src/core/session/settings/REQ_MAX_POST_SIZE.py on lines 0..36

Similar blocks of code found in 2 locations. Consider refactoring.
Open

Severity: Major
Found in src/core/session/settings/REQ_MAX_POST_SIZE.py and 1 other location - About 2 hrs to fix
src/core/session/settings/REQ_MAX_HEADER_SIZE.py on lines 0..36

Identical blocks of code found in 2 locations. Consider refactoring.
Open

if (len(argv) == 2 and line[-1] == " ") \
or (len(argv) == 3 and line[-1] != " "):
Severity: Major
Found in src/ui/interface.py and 1 other location - About 2 hrs to fix
src/ui/interface.py on lines 428..429

Identical blocks of code found in 2 locations. Consider refactoring.
Open

if (len(argv) == 2 and line[-1] == " ") \
or (len(argv) == 3 and line[-1] != " "):
Severity: Major
Found in src/ui/interface.py and 1 other location - About 2 hrs to fix
src/ui/interface.py on lines 936..937

Cyclomatic complexity is too high in method do_exit. (12)
Open

def do_exit(self, argv):
"""Quit current shell interface
 
SYNOPSIS:
exit [--force]
Severity: Minor
Found in src/ui/interface.py by radon

Cyclomatic complexity is too high in method Read. (12)
Open

def Read(self, response):
"""Main request Reader
 
if takes the http response data as argument
and writes the __RESULT__'s php data into the self.response string,
Severity: Minor
Found in src/core/tunnel/handler.py by radon

Function do_exit has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

def do_exit(self, argv):
"""Quit current shell interface
 
SYNOPSIS:
exit [--force]
Severity: Minor
Found in src/ui/interface.py - About 2 hrs to fix

File linebuf.py has 278 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"""Provide advanced line-buffers for phpsploit session settings"""
 
import os
import hashlib
import random
Severity: Minor
Found in src/linebuf.py - About 2 hrs to fix

    Cyclomatic complexity is too high in method Send. (11)
    Open

    def Send(self, request):
    """Main request Sender:
     
    if takes the concerned request object as argument
    and returns the unparsed and decapsulated phpsploit response
    Severity: Minor
    Found in src/core/tunnel/handler.py by radon

    Cyclomatic complexity is too high in method __init__. (11)
    Open

    def __init__(self):
    """Get phpsploit configuration directory,
    by checking, in this order of preference:
    - $PHPSPLOIT_CONFIG_DIR/ (only if env var exists)
    - $XDG_CONFIG_HOME/phpsploit/ (only if env var exists)
    Severity: Minor
    Found in src/core/config.py by radon

    Cyclomatic complexity is too high in method run. (11)
    Open

    def run(self, argv):
    """run current plugin
    """
    self.argv = argv
    from api import server
    Severity: Minor
    Found in src/core/plugins/Plugin.py by radon

    Cyclomatic complexity is too high in class UserDir. (11)
    Open

    class UserDir: # pylint: disable=too-few-public-methods
    """PhpSploit Configuration Directory
    """
    path = None
    choices = ["~/.config/phpsploit", "~/.phpsploit"]
    Severity: Minor
    Found in src/core/config.py by radon
    Severity
    Category
    Status
    Source
    Language