Skip to content

raw http how to use javascript output as a param?? #4453

Answered by ehsandeep
anquanscan asked this question in Q&A
Discussion options

You must be logged in to vote

@anquanscan this should work, variables are named after protocol name, so in this case it's should be javascript_response, numbered variables can be used in case of multiple requests.

id: need_to_change

info:
  name: need_to_change
  author: need_to_change
  severity: high

javascript:
  - code:
      function TJsEncrypt(str) {
        var o = new Date().getMilliseconds();
        var a = Math.round(Math.random() * 14) + 1;
        var s = o + '#|,|#' + str;
        var len = s.length;
        var buf = '';
        for (var i = 0; i < len; i++) {
        var x = (s.charCodeAt(i) ^ a).toString(16);
        if (x.length == 1)
            x = '000' + x;
        else if (x.length == 2)

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@anquanscan
Comment options

Answer selected by ehsandeep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Example-Template Useful Example Templates
3 participants