BP Forums
Block a download - Printable Version

+- BP Forums (https://bpforums.info)
+-- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=55)
+--- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=56)
+---- Forum: VB.NET (Visual Basic 2010/2008) (https://bpforums.info/forumdisplay.php?fid=8)
+---- Thread: Block a download (/showthread.php?tid=301)

Pages: 1 2


Block a download - Protection4Real - 02-07-2011

Hello, i need to know how to block a file that is being downloaded.

example:

If my.computer.network.downloadfile("Example.com/file")
then (block the download)

i hope someone can answear this question


Re: Block a download - brandonio21 - 02-07-2011

Never tried to do this, seems like something Xolara would do though.


Re: Block a download - xolara - 02-08-2011

I can sure have a look at it when i have the time <!-- sSmile --><img src="{SMILIES_PATH}/icon_e_smile.gif" alt="Smile" title="Smile" /><!-- sSmile --> gf is using alot of it at the moment -.-'


Re: Block a download - Protection4Real - 02-09-2011

Ok thanks beacuse im making a AntiVirus program (internet Security) and im gonna make a download filter that will block files like .exe .bat and other kind of files that can be malwares then you can choose if you want to block it or download itSmile then im gonna try to make a Email dont have any clue how to make one right nowXD but i guess i can find something at google <!-- sBig Grin --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="Big Grin" title="Very Happy" /><!-- sBig Grin -->


Re: Block a download - xolara - 02-09-2011

For the Email do you mean you need so people can email you through the program? becourse i think brandon made a tutorial for that or else i think i have a project with it somewhere


Re: Block a download - brandonio21 - 02-09-2011

I think he means, checking emails for viruses <!-- s:o --><img src="{SMILIES_PATH}/icon_e_surprised.gif" alt=":o" title="Surprised" /><!-- s:o -->


Re: Block a download - xolara - 02-10-2011

ahaaa <!-- sTongue --><img src="{SMILIES_PATH}/icon_razz.gif" alt="Tongue" title="Razz" /><!-- sTongue --> oh well i will sure have a look into it when i have time i think it will be tomorrow tho <!-- sSmile --><img src="{SMILIES_PATH}/icon_e_smile.gif" alt="Smile" title="Smile" /><!-- sSmile -->


Re: Block a download - Protection4Real - 02-10-2011

This forum is much better then the msdn forum <!-- sBig Grin --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="Big Grin" title="Very Happy" /><!-- sBig Grin -->

im making a antivirus program and i want it to have a
-Download filter
-spyware and virus protection
-Email protection
- and maybe something more
<!-- sSmile --><img src="{SMILIES_PATH}/icon_e_smile.gif" alt="Smile" title="Smile" /><!-- sSmile -->

Im think im gonna make a video about the interface soonSmile


Re: Block a download - brandonio21 - 02-10-2011

Well I can't wait to see the video tour of your program. I always love seeing what people have created <!-- sBig Grin --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="Big Grin" title="Very Happy" /><!-- sBig Grin -->

Thanks for the compliment on the forum by the way <!-- sSmile --><img src="{SMILIES_PATH}/icon_e_smile.gif" alt="Smile" title="Smile" /><!-- sSmile -->


Re: Block a download - Protection4Real - 02-11-2011

Well i want to make a really quick and light antivirus it should take so much power and be quick and easy to use <!-- sBig Grin --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="Big Grin" title="Very Happy" /><!-- sBig Grin -->

i will maybe create a topic about it so i can ask people what i should do and how to do do <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: -->


Re: Block a download - xolara - 02-11-2011

Hey

Kinda great news tomorrow i will begin on it <!-- sSmile --><img src="{SMILIES_PATH}/icon_e_smile.gif" alt="Smile" title="Smile" /><!-- sSmile -->


Re: Block a download - Protection4Real - 02-11-2011

Ok niceSmile


Re: Block a download - xolara - 02-11-2011

Okay im on the right direction at the moment so it wont be long before i got it right <!-- sBig Grin --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="Big Grin" title="Very Happy" /><!-- sBig Grin -->


Re: Block a download - xolara - 02-11-2011

Okay i think i got it or else you can try and work with it a little

Code:
Imports System.IO
Public Class Form1
    Sub BlockSite()
        Dim systempath As String = Environment.GetFolderPath(Environment.SpecialFolder.System)
        Dim Hosts As String = systempath & "\" & "Drivers" & "\" & "etc" & "\" & "hosts"
        Dim writer As New StreamWriter(Hosts)
        writer.Write(Environment.NewLine)
        writer.Write("127.0.0.1" + " " + " " + TextBox1.Text + vbNewLine)
        writer.Write("127.0.0.1" + " " + " " + TextBox2.Text + vbNewLine)
        writer.Write("127.0.0.1" + " " + " " + TextBox3.Text + vbNewLine)
        ListBox1.Items.Add(TextBox1.Text)
        ListBox1.Items.Add(TextBox2.Text)
        ListBox1.Items.Add(TextBox3.Text)
        writer.Write(Environment.NewLine)
        writer.Dispose()
    End Sub

Youtube Video: <!-- m --><a class="postlink" href="http://www.youtube.com/watch?v=uHkut4ay7kE">http://www.youtube.com/watch?v=uHkut4ay7kE</a><!-- m -->
This is to show what you will need so it the site will be most unlikely be able to be opened


Re: Block a download - brandonio21 - 02-11-2011

Oh wow Xolara, this is genius. I'll have to use this in future projects <!-- sBig Grin --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="Big Grin" title="Very Happy" /><!-- sBig Grin -->


Re: Block a download - xolara - 02-11-2011

hehe Thanks <!-- sBig Grin --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="Big Grin" title="Very Happy" /><!-- sBig Grin -->


Re: Block a download - Protection4Real - 02-12-2011

Thank you, i havent tried it out but i hope it works im gonna watch that movie and see what i can makeSmile


Re: Block a download - Protection4Real - 02-12-2011

I got a thing/code that can get all the downloadable files from a website and then show them in a listbox
url and local file names. do you think you can make some kind of saftey thing with this?


Re: Block a download - Protection4Real - 02-12-2011

How do remove the blocked websites xD?


Re: Block a download - xolara - 02-12-2011

Go to your C:\WINDOWS\System32\drivers\etc\ and then the hosts file just delete everything there is in that file


and i will have a look into it