Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Grabbing a webpage/webpage's php/java script code

First have 1 textboxe and a richtextbox1, textbox1 for the url then have a button to display the code into richtextbox1.

Then import System.IO
Copy and paste this code into the button.


Dim Str As System.IO.Stream
Dim srRead As System.IO.StreamReader
Try
' make a Web request
Dim req As System.Net.WebRequest = System.Net.WebRequest.Create(TextBox1.Text)
Dim resp As System.Net.WebResponse = req.GetResponse
Str = resp.GetResponseStream
srRead = New System.IO.StreamReader(Str)
' read all the text
RichTextBox1.Text = srRead.ReadToEnd
Catch ex As Exception
RichTextBox1.Text = "Unable to download content"
Finally
' Close Stream and StreamReader when done
srRead.Close()
Str.Close()
End Try

Done! 🤝
So far it only get the the webpage's code from .com domains, I've just been messing around with this.., when I have time I'll try to implement .net and shit, I just wanted to share this because it's a little interesting. 😎

Right..., seems like some people here don't know what I meant by it can't grab the code from .net domains I'm not completely sure that it can grab code from other domains I haven't had enough time to mess around with it more, when you copy and paste an url that has a .net domain it'll give you an error so I just thought that this can only get the webpage's code from a .com domain, so everyone that says I don't know what I'm talking aboutyou are correct like I said "I'm messing around with it"
If you are importing System.io, then why not replace
Code
System.IO.Stream
System.IO.StreamReader
with
Code
Stream
StreamReader

And while your at it, why not import System.Net too.
Lotta blood to let, peace to make, give a fuk about a check
(Nov 18, 2016 07:40 PM)BahNahNah Wrote:  If you are importing System.io, then why not replace
Code
System.IO.Stream
System.IO.StreamReader
with
Code
Stream
StreamReader

And while your at it, why not import System.Net too.

Well, people have different ways of doing it don't they?
Anyway thanks for the help and I'm hangoverd as fuck so sorry for the fuck ups on my thread. 😊
> java script

please no
[Image: vjPWhyy.gif]
Why not use using statements or dispose instead of close to free resources.
Why not import namespaces so you dont have to write them out each time?
(Nov 18, 2016 10:05 PM)Ninja Wrote:  Why not use using statements or dispose instead of close to free resources.
Why not import namespaces so you dont have to write them out each time?

And..?, got a problem how I code?
and CUZ FUCK IT
You cant grab php code, its server sided.
For the rest, new WebClient().DownloadString(url); should work
(Nov 18, 2016 10:48 PM)Phoenix_101VB.NET_DUDE Wrote:  And..?, got a problem how I code?
and CUZ FUCK IT

Those are suggestions for you to improve yourself because don't seem to know what you're talking about.

(Nov 18, 2016 07:25 PM)Phoenix_101VB.NET_DUDE Wrote:  So far it only get the the webpage's code from .com domains, I've just been messing around with this.., when I have time I'll try to implement .net and shit

[Image: TD0b2ff.gif]

For the glory of humanity
"Grabbing a webpage/webpage's php"
You cannot grab the PHP code.
(Nov 18, 2016 07:25 PM)Phoenix_101VB.NET_DUDE Wrote:  So far it only get the the webpage's code from .com domains, I've just been messing around with this.., when I have time I'll try to implement .net and shit, I just wanted to share this because it's a little interesting. 😎

[Image: ZLqd6_s-200x150.gif]
(Nov 18, 2016 07:25 PM)Phoenix_101VB.NET_DUDE Wrote:  So far it only get the the webpage's code from .com domains, I've just been messing around with this.., when I have time I'll try to implement .net and shit,

[Image: d5ZcCV8.png]
[Image: vjPWhyy.gif]
(Nov 18, 2016 10:05 PM)Ninja Wrote:  Why not use using statements or dispose instead of close to free resources.
Why not import namespaces so you dont have to write them out each time?

Close() calls Dispose() on StreamReader and Dispose() & GC.SuppressFinalize(this) on StreamWriter.

His implementation of the streams is actually somewhat correct. Using statement will do the same job. It will create a try/finally block and close the streams accordingly.
Right..., seems like some people here don't know what I meant by it can't grab the code from .net domains I'm not completely sure that it can grab code from other domains I haven't had enough time to mess around with it more, when you copy and paste an url that has a .net domain it'll give you an error so I just thought that this can only get the webpage's code from a .com domain, so everyone that says I don't know what I'm talking aboutyou are correct like I said "I'm messing around with it"
(Nov 19, 2016 03:57 PM)Phoenix_101VB.NET_DUDE Wrote:  Right..., seems like some people here don't know what I meant by it can't grab the code from .net domains I'm not completely sure that it can grab code from other domains I haven't had enough time to mess around with it more, when you copy and paste an url that has a .net domain it'll give you an error so I just thought that this can only get the webpage's code from a .com domain, so everyone that says I don't know what I'm talking aboutyou are correct like I said "I'm messing around with it"

The TLD literally does not matter when using a webrequest...


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Lua] by dragontitanNov 4, 2022 11:01 AM 2 156 Nov 4, 2022 11:01 AM
Last Post: dragontitan
[Java] by shyamsssMar 15, 2017 08:22 AM 5 369 Mar 15, 2017 08:22 AM
Last Post: Mohinder
[Python] by SlimOct 26, 2015 11:48 PM 4 159 Oct 26, 2015 11:48 PM
Last Post: h0lyl337