def prepare_request(payload):
    """
    Prepares HTTP (GET or POST) request with proper payload
    """

    _ = re.sub(args.param % r"(?P<param>%s)=(?P<value>[^=&]*)",
               r"\1=%s" % (payload or ""), kb.request_params)

    request_args = {"url": "%s://%s%s" % (kb.parsed_target_url.scheme or "http", kb.parsed_target_url.netloc, kb.parsed_target_url.path)}

    if args.data:
        request_args["data"] = _
    else:
        request_args["url"] += "?%s" % _

    if args.header:
        request_args["header"] = args.header

    if args.cookie:
        request_args["cookie"] = args.cookie

    if args.user_agent:
        request_args["user_agent"] = args.user_agent

    request_args["verbose"] = args.verbose

    return request_args
dataset/ETHPy150Open lightos/Panoptic/panoptic.py/prepare_request/swapped operands of `%`