Skip to content

Instantly share code, notes, and snippets.

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
@riahc3
riahc3 / RawContent
Created November 13, 2015 15:49
RawContent
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>
@riahc3
riahc3 / Invoke-Webrequest.ps1
Created November 13, 2015 15:13
Invoke-Webrequest
# 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"