Hack Forums
[.NET] [Resolved] - Getting info from "Inspect Element" - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] [Resolved] - Getting info from "Inspect Element" (/showthread.php?tid=4523762)



[Resolved] - Getting info from "Inspect Element" - The-Noob - Nov 5, 2014

Hey guys.

So i am trying to grab specific things from a site that is protected by a user and password, now normally i use the web browser feature when handling sites in vb.net but i am not too sure how to go about this problem.

Currently i have
Code
Using wc As New WebClient
      html = wc.DownloadString("https://sitename.com/admin/products")
      End Using

      Dim regx As New Regex("name=([\w+?\.\w+])+([a-zA-Z0-9\~\!\@\#\$\%\^\&\*\(\)_\-\=\+\\\/\?\.\:\;\,]*)?", RegexOptions.IgnoreCase)
      Dim matches As MatchCollection = regx.Matches(html)

but using the above method just wants to jump right in there with out a pass or anything, how should i get around this?


* - Moen - Nov 5, 2014

I would login to the site using webrequest and the information you get when you inspect element and login.

Store the cookies in a cookiecontainer.

Navigate the product site with webrequest(using the captured cookies)


* - The-Noob - Nov 6, 2014

This problem has be taken and slapped around like a wet wish in a bears paws!

Massive thanks to idb. for helping me out and teaching me a few things, this guy is a genius!!