Re: Post data encoding itself

Alo Yommist <[email protected]>
Newsgroups gmane.comp.security.nmap.devel
Message-ID <CAL59SMTL2EzP7A0NUUs-iaAjj1watTrmnR9zSNwkS+fWrtbvqQ@mail.gmail.com>
The attached code
On 7 Apr 2017 6:37 p.m., "Alo Yommist" <[email protected]> wrote:

> I'm trying to post this
>
> memberUsername=<USER>&memberPassword=<PASS>&sponsorID=S999-1907849208&
> visitorID=1907849208&cpSessionID=6b7e1ac2-7436-4c0f-b3b1-e7777dd33876&
> callbackmethod=jQuery191014485234646236567_1375786963488&_=1375786963490
>
> to a server by sending this POST request
>
> 208.83.241.14:443 l POST /Community/CommunityService.
> svc/JSON/AuthenticateMemberCP?authorization=TGFuZGluZ1BhZ2VfVXNlcjpecUFQeS
> 1iNWc1Zm96QDNh&communityNameOrID=105
> HTTP/1.1
> User-Agent: Mozilla/5.0 (compatible; Nmap Scripting Engine;
> http://nmap.org/book/nse.html)
> Connection: close
> Content-Length: 227
> Content-Type: application/json
> Host: host
>
> memberUsername=user&memberPassword=password&sponsorID=S999-1907849208&
> visitorID=1907849208&cpSessionID=6b7e1ac2-7436-4c0f-b3b1-e7777dd33876&
> callbackmethod=jQuery191014485234646236567_1375786963488&_=1375786963490
>
> But I kept on getting an encoded version of my postdata
>
> sponsorID=S999%2d1907849208&memberPassword=password&_=
> 1375786963490&memberUsername=username&visitorID=1907849208&callbackmethod=
> jQuery191014485234646236567_1375786963488&cpSessionID=
> 6b7e1ac2%2d7436%2d4c0f%2db3b1%2de7777dd33876
>
> How am I to solve this? my code is attached as well.
> Cheers
> Yomist
>

_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/
isee.txt (text/plain, 913 B)
local http = require "http"
local stdnse = require "stdnse"
local shortport = require "shortport"
local table = require "table"

portrule = shortport.port_or_service({80, 443}, {"http", "https"}, "tcp", "open" )

action = function(host, port)
    local response, uri, status
    uri = "/Community/CommunityService.svc/JSON/AuthenticateMemberCP?authorization=TGFuZGluZ1BhZ2VfVXNlcjpecUFQeS1iNWc1Zm96QDNh&communityNameOrID=105"
        response = http.post(host, port, uri, { header = {["Content-Type"] = "application/json"}, no_cache = true, no_cache_body = true }, nil, { memberUsername = "username", memberPassword = "password", sponsorID = "S999-1907849208",visitorID = "1907849208", cpSessionID = "p6b7e1ac2-7436-4c0f-b3b1-e7777dd33876", callbackmethod = "jQuery191014485234646236567_1375786963488",_ = "1375786963490" })
    stdnse.debug("Response: %s", response)
    return response.status
end
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.