Function decrypt_url

Source
pub fn decrypt_url(
    encrypted_url: &str,
    login_resp: Option<&str>,
) -> Result<Command, SFError>
Expand description

This function is designed for reverse engineering encrypted commands from the S&F web client. It expects a login response, which is the ~3KB string response you can see in the network tab of your browser, that starts with serverversion after a login. After that, you can take any URL the client sends to the server and have it decoded into the actual string command, that was sent. Note that this function technically only needs the crypto key, not the full response, but it is way easier to just copy paste the full response. The command returned here will be Command::Custom

ยงErrors

If either the URL, or the response do not contain the necessary crypto values, an InvalidRequest error will be returned, that mentions the part, that is missing or malformed. The same goes for the necessary parts of the decrypted command