User:Trougnouf/sandbox

Results of:

require "mediawikiapi"

MediaWikiApi.login("Trougnouf","password")

tmpargs = { action = 'query', meta = 'userinfo', format = 'json'}

tmpjsonres = MediaWikiApi.performRequest(tmpargs)

using https://github.com/trougnouf/dtMediaWiki/blob/master/mediawikiapi.lua

Request body:

meta=userinfo&format=json&action=query

Request header:

{ ["Content-Type"] = "application/x-www-form-urlencoded", ["Content-Length"] = 38, ["User-Agent"] = "mediawikilua 0.1" }

Result body:

{"batchcomplete":"","query":{"userinfo":{"id":0,"name":"109.134.186.140","anon":""}}}

Result headers:

{ ["x-content-type-options"] = "nosniff", vary = "Accept-Encoding", ["x-frame-options"] = "DENY", ["x-varnish"] = "685200115, 288731128, 194942279", date = "Sat, 01 Sep 2018 21:01:48 GMT", ["content-type"] = "application/json; charset=utf-8", ["content-disposition"] = "inline; filename=api-result.json", age = "0", ["x-cache-status"] = "pass", ["accept-ranges"] = "bytes", ["backend-timing"] = "D=21214 t=1535835708397813", via = "1.1 varnish (Varnish/5.1), 1.1 varnish (Varnish/5.1), 1.1 varnish (Varnish/5.1)", connection = "close", p3p = "CP=\"This is not a P3P policy! See https://commons.wikimedia.org/wiki/Special:CentralAutoLogin/P3P for more info.\"", ["x-client-ip"] = "109.134.186.140", ["x-analytics"] = "ns=-1;special=Badtitle;https=1;nocookies=1", ["set-cookie"] = "WMF-Last-Access=01-Sep-2018;Path=/;HttpOnly;secure;Expires=Wed, 03 Oct 2018 12:00:00 GMT, GeoIP=BE:BRU:Brussels:50.85:4.35:v4; Path=/; secure; Domain=.wikimedia.org", ["strict-transport-security"] = "max-age=106384710; includeSubDomains; preload", ["x-cache"] = "cp1089 pass, cp3041 pass, cp3040 pass", ["x-powered-by"] = "HHVM/3.18.6-dev", ["cache-control"] = "private, must-revalidate, max-age=0", status = 200, server = "mw1221.eqiad.wmnet", ["transfer-encoding"] = "chunked" }

Request body:

type=login&meta=tokens&format=json&action=query

Request header:

{ ["User-Agent"] = "mediawikilua 0.1", ["Content-Type"] = "application/x-www-form-urlencoded", ["Content-Length"] = 47, Cookie = "WMF-Last-Access=01-Sep-2018;Path=/;HttpOnly;secure;Expires=Wed, 03 Oct 2018 12:00:00 GMT, GeoIP=BE:BRU:Brussels:50.85:4.35:v4; Path=/; secure; Domain=.wikimedia.org" }

Result body:

{"batchcomplete":"","query":{"tokens":{"logintoken":"52abbc638ab995058e2ad5c29675c0a05b8afe3c+\\"}}}

Result headers:

{ ["x-content-type-options"] = "nosniff", vary = "Accept-Encoding", ["x-frame-options"] = "DENY", ["x-varnish"] = "891754227, 340823428, 169069512", date = "Sat, 01 Sep 2018 21:01:48 GMT", ["content-type"] = "application/json; charset=utf-8", ["content-disposition"] = "inline; filename=api-result.json", age = "0", ["x-cache-status"] = "pass", connection = "close", ["backend-timing"] = "D=30101 t=1535835708666741", via = "1.1 varnish (Varnish/5.1), 1.1 varnish (Varnish/5.1), 1.1 varnish (Varnish/5.1)", ["set-cookie"] = "commonswikiSession=hl7dibo[...]; path=/; secure; httponly, forceHTTPS=true; path=/; httponly, GeoIP=BE:BRU:Brussels:50.85:4.35:v4; Path=/; secure; Domain=.wikimedia.org", p3p = "CP=\"This is not a P3P policy! See https://commons.wikimedia.org/wiki/Special:CentralAutoLogin/P3P for more info.\"", ["x-client-ip"] = "109.134.186.140", ["x-analytics"] = "ns=-1;special=Badtitle;WMF-Last-Access=01-Sep-2018;https=1", ["strict-transport-security"] = "max-age=106384710; includeSubDomains; preload", ["x-cache"] = "cp1075 pass, cp3030 pass, cp3040 pass", ["accept-ranges"] = "bytes", ["x-powered-by"] = "HHVM/3.18.6-dev", ["cache-control"] = "private, must-revalidate, max-age=0", status = 200, server = "mw1348.eqiad.wmnet", ["transfer-encoding"] = "chunked" }

Request body:

username=Trougnouf&loginreturnurl=https%3A%2F%2Fwww.mediawiki.org&action=clientlogin&logintoken=52abbc638ab995058e2ad5c29675c0a05b8afe3c%2B%5C&password=password&format=json

Request header:

{ ["User-Agent"] = "mediawikilua 0.1", ["Content-Type"] = "application/x-www-form-urlencoded", ["Content-Length"] = 172, Cookie = "commonswikiSession=hl7dibo[...]; path=/; secure; httponly, forceHTTPS=true; path=/; httponly, GeoIP=BE:BRU:Brussels:50.85:4.35:v4; Path=/; secure; Domain=.wikimedia.org" }

Result body:

{"clientlogin":{"status":"PASS","username":"Trougnouf"}}

Result headers:

{ ["x-content-type-options"] = "nosniff", vary = "Accept-Encoding", ["x-frame-options"] = "DENY", ["x-varnish"] = "893032282, 272651263, 181545277", date = "Sat, 01 Sep 2018 21:01:50 GMT", ["content-type"] = "application/json; charset=utf-8", ["content-disposition"] = "inline; filename=api-result.json", age = "0", ["x-cache-status"] = "pass", connection = "close", ["backend-timing"] = "D=1079278 t=1535835708947360", via = "1.1 varnish (Varnish/5.1), 1.1 varnish (Varnish/5.1), 1.1 varnish (Varnish/5.1)", ["set-cookie"] = "commonswikiSession=cp9efas[...]; path=/; secure; httponly, commonswikiUserID=5596623; expires=Mon, 01-Oct-2018 21:01:49 GMT; Max-Age=2592000; path=/; secure; httponly, commonswikiUserName=Trougnouf; expires=Mon, 01-Oct-2018 21:01:49 GMT; Max-Age=2592000; path=/; secure; httponly, forceHTTPS=true; path=/; domain=commons.wikimedia.org; httponly, centralauth_User=Trougnouf; expires=Mon, 01-Oct-2018 21:01:49 GMT; Max-Age=2592000; path=/; domain=commons.wikimedia.org; secure; httponly, centralauth_Session=23ac0f[...]; path=/; domain=commons.wikimedia.org; secure; httponly, loginnotify_prevlogins=2018-1mja5h6-negyqc1412qj17tr9jcw3gssdccd6y8; expires=Thu, 28-Feb-2019 21:01:50 GMT; Max-Age=15552000; path=/; secure; httponly, WMF-Last-Access=01-Sep-2018;Path=/;HttpOnly;secure;Expires=Wed, 03 Oct 2018 12:00:00 GMT, GeoIP=BE:BRU:Brussels:50.85:4.35:v4; Path=/; secure; Domain=.wikimedia.org", p3p = "CP=\"This is not a P3P policy! See https://commons.wikimedia.org/wiki/Special:CentralAutoLogin/P3P for more info.\"", ["x-client-ip"] = "109.134.186.140", ["x-analytics"] = "ns=-1;special=Badtitle;https=1", ["strict-transport-security"] = "max-age=106384710; includeSubDomains; preload", ["x-cache"] = "cp1075 pass, cp3041 pass, cp3040 pass", ["accept-ranges"] = "bytes", ["x-powered-by"] = "HHVM/3.18.6-dev", ["cache-control"] = "private, must-revalidate, max-age=0", status = 200, server = "mw1289.eqiad.wmnet", ["transfer-encoding"] = "chunked" }

Request body:

meta=userinfo&format=json&action=query

Request header:

{ ["User-Agent"] = "mediawikilua 0.1", ["Content-Type"] = "application/x-www-form-urlencoded", ["Content-Length"] = 38, Cookie = "commonswikiSession=cp9efas[...]; path=/; secure; httponly, commonswikiUserID=5596623; expires=Mon, 01-Oct-2018 21:01:49 GMT; Max-Age=2592000; path=/; secure; httponly, commonswikiUserName=Trougnouf; expires=Mon, 01-Oct-2018 21:01:49 GMT; Max-Age=2592000; path=/; secure; httponly, forceHTTPS=true; path=/; domain=commons.wikimedia.org; httponly, centralauth_User=Trougnouf; expires=Mon, 01-Oct-2018 21:01:49 GMT; Max-Age=2592000; path=/; domain=commons.wikimedia.org; secure; httponly, centralauth_Session=23ac0f[...]; path=/; domain=commons.wikimedia.org; secure; httponly, loginnotify_prevlogins=2018-1mja5h6-negyqc1412qj17tr9jcw3gssdccd6y8; expires=Thu, 28-Feb-2019 21:01:50 GMT; Max-Age=15552000; path=/; secure; httponly, WMF-Last-Access=01-Sep-2018;Path=/;HttpOnly;secure;Expires=Wed, 03 Oct 2018 12:00:00 GMT, GeoIP=BE:BRU:Brussels:50.85:4.35:v4; Path=/; secure; Domain=.wikimedia.org" }

Result body:

{"batchcomplete":"","query":{"userinfo":{"id":0,"name":"109.134.186.140","anon":""}}}

Result headers:

{ ["x-content-type-options"] = "nosniff", vary = "Accept-Encoding", ["x-frame-options"] = "DENY", ["x-varnish"] = "711918851, 643435702, 192293534", date = "Sat, 01 Sep 2018 21:01:51 GMT", ["content-type"] = "application/json; charset=utf-8", ["content-disposition"] = "inline; filename=api-result.json", age = "0", ["x-cache-status"] = "pass", connection = "close", ["backend-timing"] = "D=24798 t=1535835710999221", via = "1.1 varnish (Varnish/5.1), 1.1 varnish (Varnish/5.1), 1.1 varnish (Varnish/5.1)", ["set-cookie"] = "commonswikiSession=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/; secure; httponly, WMF-Last-Access=01-Sep-2018;Path=/;HttpOnly;secure;Expires=Wed, 03 Oct 2018 12:00:00 GMT, GeoIP=BE:BRU:Brussels:50.85:4.35:v4; Path=/; secure; Domain=.wikimedia.org", p3p = "CP=\"This is not a P3P policy! See https://commons.wikimedia.org/wiki/Special:CentralAutoLogin/P3P for more info.\"", ["x-client-ip"] = "109.134.186.140", ["x-analytics"] = "ns=-1;special=Badtitle;https=1", ["strict-transport-security"] = "max-age=106384710; includeSubDomains; preload", ["x-cache"] = "cp1089 pass, cp3033 pass, cp3040 pass", ["accept-ranges"] = "bytes", ["x-powered-by"] = "HHVM/3.18.6-dev", ["cache-control"] = "private, must-revalidate, max-age=0", status = 200, server = "mw1286.eqiad.wmnet", ["transfer-encoding"] = "chunked" }