It is possible to use the HttpMessage Lua Class to get your target URL, with this class you are able to perform the following:
Copy -- echo "http://target.com/?is_admin=true" | lotus urls script.lua -o out.json
local target_url = HttpMessage: Url ()
-- http://target.com
Copy -- echo "http://target.com/?is_admin=true&year=2023" | lotus urls script.lua -o out.json
local params = HttpMessage: TxtParams ()
-- "is_admin=true&year=2023"
Copy -- echo "http://target.com/?is_admin=true&year=2023" | lotus urls script.lua -o out.json
local iter_params = HttpMessage: Params ()
for param_name, param_value in ipairs (iter_params) do
-- param_name: is_admin
-- param_value: true
end
Copy -- URL = https://target.com/users?name=Mike&age=20
local new_url = HttpMessage: setParam ( "age" , "23" )
-- https://target.com/users?name=Mikehacker&age=2023
Copy -- URL = https://target.com/users?name=Mike&age=20
local new_params = HttpMessage: setAllParams ( "<h1>" , true ) -- true = remove the parameter value
for param_name,param_value in ipairs (new_params) do
-- param_name: name
-- param_value: <h1>
-- continue ..
end
make sure to make the global variable SCAN_TYPE
value to 3 to make lotus pass the full path instead of parameters to avoid dups inputs
Copy -- URL = https://target.com/users?name=Mike&age=20
local new_url = HttpMessage: urlJoin ( "/admin/login?login=true" )
-- URL = https://target.com/admin/login?login=true
Copy -- make sure that your path doesn't starts with /
local new_url = pathjoin (HttpMessage: Path (), "admin/login.php" )
-- http://target.com/index.php/admin.login.php