Giriş yap
En iyi yollayıcılar
Hello EMO | ||||
EMO | ||||
eMoStyLe | ||||
BesimBICER | ||||
GameKinG | ||||
Crysis | ||||
~>!.DεvιLρяιεsт.!<~ | ||||
MeTaL | ||||
TrueCrime | ||||
djhayal3t |
Istatistikler
Toplam 203 kayıtlı kullanıcımız varSon kaydolan kullanıcımız: crayzboy76
Kullanıcılarımız toplam 1186 mesaj attılar bunda 862 konu
Arama
Sosyal yer imi
Sosyal bookmarking sitesinde Emo, Emo nedir, Emo resimleri, Emo Kıyafetleri, Emo Sözleri, Emo Oyunları, EmoTurkey, Emo Nickler, Emo Avatarları, Punk, Punk Resimleri, Punk Avatarları, Rock, Rock Resimleri, Rock Avatarları, Msn Nickleri, Msn Avatarları, Müzik adresi saklayın ve paylaşın
Sosyal bookmarking sitesinde EMO Style ForumPro - Hos Geldiniz adresi saklayın ve paylaşın
Kimler hatta?
Toplam 10 kullanıcı online :: 0 Kayıtlı, 0 Gizli ve 10 Misafir Yok
Sitede bugüne kadar en çok 217 kişi C.tesi Tem. 29, 2017 1:46 am tarihinde online oldu.
En son konular
Reklam
[Tutorial]Editing hosts file in C# (blocking them from sites)
1 sayfadaki 1 sayfası
[Tutorial]Editing hosts file in C# (blocking them from sites)
[quote='sebsOS' pid='62' dateline='1288956732']
C#
Credits to scriptkiddy !!
[/quote]
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 Team
- Cinsiyet :
Burçlar :
Mesaj Sayısı : 184
Puan : 247393
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
Similar topics
» [C++] Basic Game Hacking (Memory Editing)
» File to Array Output (FTA)
» Open file in background mode using Process
» C++ -- DLL Tutorial { 1 }
» [D3D][C++] No fog tutorial
» File to Array Output (FTA)
» Open file in background mode using Process
» C++ -- DLL Tutorial { 1 }
» [D3D][C++] No fog tutorial
1 sayfadaki 1 sayfası
Bu forumun müsaadesi var:
Bu forumdaki mesajlara cevap veremezsiniz
Cuma Ağus. 29, 2014 8:33 am tarafından Hello EMO
» goldenchase.net maden yaparak para kazanma
Cuma Ağus. 29, 2014 8:18 am tarafından Hello EMO
» etichal hacker görsel egitim seti
Çarş. Ağus. 06, 2014 4:57 am tarafından Hello EMO
» KO TBL Source C#
Ptsi Ara. 09, 2013 6:36 am tarafından Hello EMO
» x86 Registers
C.tesi Ağus. 24, 2013 5:02 am tarafından Hello EMO
» [Tutorial] Pegando Address, Pointers de WYD
Çarş. Tem. 10, 2013 7:25 am tarafından Hello EMO
» [Tutorial] Pegando Address, Pointers de CS Metodo²
Çarş. Tem. 10, 2013 7:23 am tarafından Hello EMO
» [Tutorial] Aprendendo basico deASM OLLYDBG
Çarş. Tem. 10, 2013 7:22 am tarafından Hello EMO
» Basic C# DLL injector
Ptsi Tem. 08, 2013 7:48 am tarafından Hello EMO