Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save marcelmaatkamp/339284 to your computer and use it in GitHub Desktop.
Save marcelmaatkamp/339284 to your computer and use it in GitHub Desktop.
def showMeTheJavascriptProperties() {
def http = new HTTPBuilder( 'https://www.google.com' )
http.request( GET, HTML ) { req ->
uri.path = "/"
response.success = { resp, page ->
def properties = new Properties()
properties.load(
new ByteArrayInputStream(
page.HEAD.SCRIPT.text().replace(',','').replace('"','').getBytes()
)
)
println "sid: "+properties.SID
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment