This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Headers : {} | |
Cookies : System.Net.CookieContainer | |
UseDefaultCredentials : False | |
Credentials : | |
Certificates : | |
UserAgent : Mozilla/5.0 (Windows NT; Windows NT 6.2; es-ES) WindowsPowerShell/4.0 | |
Proxy : | |
MaximumRedirection : -1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTTP/1.0 200 OK | |
Pragma: no-cache | |
Connection: close | |
Cache-Control: no-cache | |
Content-Type: text/html; | |
Server: ZK Web Server | |
<HTML><HEAD><TITLE></TITLE><meta http-equiv='Content-Type' content='text/html;'><LINK href='../css/Secutime.css' type=text/css rel=stylesheet><LINK href='../css/list.css' type=text/css rel=stylesheet></SCRIPT><SCRIPT language=javascript src='../js/list.js'> | |
</SCRIPT></SCRIPT><SCRIPT language=javascript src='../js/gen.js'></SCRIPT></HEAD><BODY><SPAN class=HeaderText>TCP/IP</SPAN><BR><HR><table width=100% border=0 cellpadding=0 cellspacing=0 align=center> | |
<form name=mainform action='/form/Device?act=6' method=post> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# establish initial connection to website | |
$initialRequest = Invoke-WebRequest -Uri 'http://192.168.100.97/csl/login' -SessionVariable WebSession1 | |
#$initialrequest is now an object containing the html of the web request. get the form elements from the page | |
$form = $initialRequest.Forms[0] #outputting $form.fields to the screen will show you all the elements. Assuming 'username' and 'password'... | |
# update $form with username and password info and submit this back to the login webpage as POST | |
$form.fields.userpwd = "PASS" | |
$form.fields.username = "USER" |