Syspeople / CodeNow

Empower your ServiceNow Development with no instance configuration.
MIT License
8 stars 7 forks source link

Wake DEV instance command #85

Open CGraabaek opened 5 years ago

CGraabaek commented 5 years ago

Find a way to wake a DEV instance from the extension.

ambsoerensen commented 5 years ago

reverse engineering ftw.

i think the same approach as with updates might be feasible.

assmuning they use servicenow themselves: apparantly all ajax calls are routed though a processor named xmlhhtp.do. taking a predefined set of parameters (defined in the script include) with the body being url-form-encoded. To invoke a processor you need to use cookie based authentication. which requires you to setup a persistent session using the api endpoint. (basically means storing and maintainig cookies on each request).

if we figure out the input parameters we might be able to set up a persistent session and invoke their endpoint.

  1. Authenticate with the dev site.
  2. find the endpoint
  3. invoke the endpoint.

have already implemented persistent sessions in the api manager class.

CGraabaek commented 5 years ago

There is this repo which does what we want, it is written in go though. https://github.com/0x111/servicenow-instance-wakeup

ambsoerensen commented 5 years ago

Not to fund of his idea.

It's basically ahk using Chrome. 😅

CGraabaek commented 5 years ago

Yeah I know, just to show what others have acheived.

ambsoerensen commented 5 years ago

we need to get smarter then. ;)

It is just not stable enough when we get end users onboard.