EMO Style ForumPro - Hos Geldiniz
[Tutorial]Editing hosts file in C# (blocking them from sites) Uyeols10

Join the forum, it's quick and easy

EMO Style ForumPro - Hos Geldiniz
[Tutorial]Editing hosts file in C# (blocking them from sites) Uyeols10
EMO Style ForumPro - Hos Geldiniz
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Giriş yap

Şifremi unuttum

Istatistikler
Toplam 203 kayıtlı kullanıcımız var
Son kaydolan kullanıcımız: crayzboy76

Kullanıcılarımız toplam 1186 mesaj attılar bunda 862 konu
Tarıyıcı
 Kapı
 Indeks
 Üye Listesi
 Profil
 SSS
 Arama
Arama
 
 

Sonuç :
 


Rechercher çıkıntı araştırma

RSS akısı


Yahoo! 
MSN 
AOL 
Netvibes 
Bloglines 


Anahtar-kelime

kutu  loot  pointer  

Kimler hatta?
Toplam 3 kullanıcı online :: 0 Kayıtlı, 0 Gizli ve 3 Misafir

Yok

[ Bütün listeye bak ]


Sitede bugüne kadar en çok 217 kişi C.tesi Tem. 29, 2017 1:46 am tarihinde online oldu.
En son konular
» İnternetten Para Kazandıran Oyun ! Ödeme Alt Limiti Yok ! DEV KONU
[Tutorial]Editing hosts file in C# (blocking them from sites) I_icon_minitimeCuma Ağus. 29, 2014 8:33 am tarafından Hello EMO

» goldenchase.net maden yaparak para kazanma
[Tutorial]Editing hosts file in C# (blocking them from sites) I_icon_minitimeCuma Ağus. 29, 2014 8:18 am tarafından Hello EMO

» etichal hacker görsel egitim seti
[Tutorial]Editing hosts file in C# (blocking them from sites) I_icon_minitimeÇarş. Ağus. 06, 2014 4:57 am tarafından Hello EMO

» KO TBL Source C#
[Tutorial]Editing hosts file in C# (blocking them from sites) I_icon_minitimePtsi Ara. 09, 2013 6:36 am tarafından Hello EMO

» x86 Registers
[Tutorial]Editing hosts file in C# (blocking them from sites) I_icon_minitimeC.tesi Ağus. 24, 2013 5:02 am tarafından Hello EMO

» [Tutorial] Pegando Address, Pointers de WYD
[Tutorial]Editing hosts file in C# (blocking them from sites) I_icon_minitimeÇarş. Tem. 10, 2013 7:25 am tarafından Hello EMO

» [Tutorial] Pegando Address, Pointers de CS Metodo²
[Tutorial]Editing hosts file in C# (blocking them from sites) I_icon_minitimeÇarş. Tem. 10, 2013 7:23 am tarafından Hello EMO

» [Tutorial] Aprendendo basico deASM OLLYDBG
[Tutorial]Editing hosts file in C# (blocking them from sites) I_icon_minitimeÇarş. Tem. 10, 2013 7:22 am tarafından Hello EMO

» Basic C# DLL injector
[Tutorial]Editing hosts file in C# (blocking them from sites) I_icon_minitimePtsi Tem. 08, 2013 7:48 am tarafından Hello EMO

Reklam

[Tutorial]Editing hosts file in C# (blocking them from sites)

Aşağa gitmek

[Tutorial]Editing hosts file in C# (blocking them from sites) Empty [Tutorial]Editing hosts file in C# (blocking them from sites)

Mesaj tarafından EMO Perş. Mayıs 19, 2011 10:37 pm

[quote='sebsOS' pid='62' dateline='1288956732']
C#

Kod:
using System.IO;

Kod:
string system = Environment.GetFolderPath(Environment.SpecialFolder.System);
            //^ Above creates the string system, and stores the system folder path in it

            string hosts = system + "\\" + "drivers" + "\\" + "etc" + "\\" + "hosts";
            //^ In VB.NET you would only need one slash, but in C# you need two
            // ^ basically this takes the string system and adds the path to it

            StreamWriter writer = new StreamWriter(hosts);
            // ^ Creates a new StreamWriter with the path of our hosts string

            writer.Write("##Hosts file edit");
            //^ Writes ##Hosts file edit in our hosts file

            writer.Write(Environment.NewLine);
            //^ Creates a new line, important so text is not all in 1 line

            writer.Write("127.0.0.1 www.google.ca");
            //^ Writes 127.0.0.1 www.google.ca in our hosts file, redirecting anybody who
            //^ goes to google to 127.0.0.1 which is localhost

            writer.Write(Environment.NewLine);
            //^ See above               

            writer.Write("127.0.0.1 google.ca");
            //^ This is important, because the user cannot go to www.google.ca, but he will
            //^ be able to go to google.ca!!

            writer.Write(Environment.NewLine);
            //^ See above

            writer.Write("127.0.0.1 209.85.135.99");
            //^ Okay, 209.85.135.99 is the IP address of google. 
            //^ if you redirect google.ca and www.google.ca then the user will still
            //^ be able to go to 209.85.135.99, which is google so we want to block that
            //^ Now, if the user tries to go to www.google.ca he will be redirected to
            //^ localhost, if he goes to google.ca he will be redirected to localhost
            //^ and finally, if he is smart and pings google then he will
            //^ get the address 209.85.135.99, but when he tries to go to that he will be
            //^ redirected to localhost bwahahahahah

            writer.Dispose();
            //^ This is important, it closes our streamwriter and saves the data, please
            //^ remember writer.Write will clear everything in the hosts file if the style
            //^ is not append, but I will not get into that now.

            //^ if we did not have our newline this is what our hosts file would look like
            //^ ##Hosts file edit127.0.0.1 www.google.ca127.0.0.1 google.ca127.0.0.1 209.85.135.99
            //^ but our hosts file has to look like the following in order to be read
           
            //^ ##Hosts file edit
            //^ 127.0.0.1 www.google.ca
            //^ 127.0.0.1 google.ca
            //^ 127.0.0.1 209.85.135.99

            //^ I hope you enjoyed my tutorial, feel free to ask for more in C# or VB.NET!


Credits to scriptkiddy !!
[/quote]
EMO
EMO
EMO Team
EMO Team

Cinsiyet : Erkek
Burçlar : Yay
Yılan
Mesaj Sayısı : 184
Puan : 235443
Rep Puanı : 5
Doğum tarihi : 28/11/89
Kayıt tarihi : 18/05/11
Yaş : 34
Nerden : EMO world
İş/Hobiler : RCE Student / Game Hacking / Learn Beginner C#,C++,Delphi
Lakap : EMO

Sayfa başına dön Aşağa gitmek

Sayfa başına dön

- Similar topics

 
Bu forumun müsaadesi var:
Bu forumdaki mesajlara cevap veremezsiniz