Jump to content

TncTR Hosts Editor


KintaRo
 Share

Recommended Posts

[quote name='KintaRo' date='06 Aralık 2010 - 12:23 ' timestamp='1291631624' post='922304']
bide bana artizlik yapıyordu hata yok diye :)
[/quote]

valla iki tane eklemediğim için hatayı göremedim :) ama [b]bence[/b] blackman abinin dediğini yaparsak kaydet butonu ölecek, seçim sizin...

Link to comment
Share on other sites

[b] La ekliceğin iki satır kod :D seçim sizin falan sıratta mıyız
[code]#NoTrayIcon
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=HostsEditor.ico
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Res_Comment=Onur YORULMAZ
#AutoIt3Wrapper_Res_Description=Onur YORULMAZ
#AutoIt3Wrapper_Res_Fileversion=1.0.0.0
#AutoIt3Wrapper_Res_LegalCopyright=Onur YORULMAZ
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Global $Form1 = GUICreate("TnCTR Host Editor (for Autoit)", 545, 436, -1, -1)
$Edit1 = GUICtrlCreateEdit("", 0, 48, 545, 387, BitOR($ES_READONLY,$ES_WANTRETURN,$WS_VSCROLL))
$hostdosyasi = FileRead(@SystemDir & "\drivers\etc\hosts")
GUICtrlSetData(-1, $hostdosyasi)
$Button1 = GUICtrlCreateButton("Kaydet", 8, 8, 73, 33, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Engeli Aç", 100, 8, 73, 33, $WS_GROUP)
$Button3 = GUICtrlCreateButton("Engelle", 192, 8, 73, 33, $WS_GROUP)
$Button4 = GUICtrlCreateButton("Hakkında", 464, 8, 73, 33, $WS_GROUP)
GUISetState(@SW_SHOW)


While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_kaydet()
Case $Button2
_ac()
Case $Button3
_engelle()
Case $Button4
MsgBox(64,"Hakkında","Bu program Onur YORULMAZ tarafından www.TnCTR.com için hazırlanmıştır.")
EndSwitch
WEnd

Func _kaydet()
$kaydet = GUICtrlRead($Edit1, 1)
FileWrite(@SystemDir & "\drivers\etc\hosts", $kaydet)
EndFunc

Func _ac()
$IP = InputBox("IP Girin", "Lütfen sitenin IP'sini girin.", "")
$Site = InputBox("Siteyi Girin.", "Lütfen sitenin adresini girin.", "")
$tekraroku = guictrlread($edit1)
GUICtrlSetData($Edit1, $tekraroku & @CRLF & $IP & " " & $Site)
EndFunc

Func _engelle()
$Site = InputBox("Siteyi Girin.", "Lütfen sitenin adresini girin.", "")
[b]$tekraroku2 = guictrlread($edit1)
GUICtrlSetData($Edit1, $tekraroku2 & @CRLF & "127.0.0.1 " & $Site)
[/b]EndFunc[/code][/b]

Link to comment
Share on other sites

blackman12 nin verdiği autoit kodunu hemencecik :dribble: exe dosyasına çevirdim.Güzel debir simge koydum.Dosya boyutu 349 kb.Gülegüle kullanın.
Not:Kodda en ufak bir değişiklik yapmadım.Kopyalayıp autıit programına yapıştırıp au3 e çevirdim sonra da exe olarak...Saygılarımla
blackmanim kodunda bi,r hata mı var acaba?Niye dersen.Varsayki engeli aç butonuna bastım.Cancel butonuna basınca bir kez daha onaylama istiyor.Yani iki kez Cancel butonuna basmam gerekiyor.Bilgilerinize

İndirme adresi(Rar boyutu:293 kb) :

http://hotfile.com/dl/87656640/6cb43e2/HostMonitor.rar.html

Edited by YAGMURADAM
Link to comment
Share on other sites

Hehe kodlar benim değil Onurun ben sadece yanlış yaptığı ufak bi noktayı düzelttim neyse o hatayı da düzelttim.
[code]
#NoTrayIcon
$Form1 = GUICreate("TnCTR Host Editor", 545, 436, -1, -1)
$Edit1 = GUICtrlCreateEdit("", 0, 48, 545, 387, BitOR(0x0800,0x1000,0x00200000))
$hostdosyasi = FileRead(@SystemDir & "\drivers\etc\hosts")
GUICtrlSetData(-1, $hostdosyasi)
$Button1 = GUICtrlCreateButton("Kaydet", 8, 8, 73, 33)
$Button2 = GUICtrlCreateButton("Engeli Aç", 100, 8, 73, 33)
$Button3 = GUICtrlCreateButton("Engelle", 192, 8, 73, 33)
$Button4 = GUICtrlCreateButton("Hakkında", 464, 8, 73, 33)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
Case $Button1
_kaydet()
Case $Button2
_ac()
Case $Button3
_engelle()
Case $Button4
MsgBox(64,"Hakkında","Bu program Onur YORULMAZ tarafından www.TnCTR.com için hazırlanmıştır.")
EndSwitch
WEnd
Func _kaydet()
$kaydet = GUICtrlRead($Edit1, 1)
FileWrite(@SystemDir & "\drivers\etc\hosts", $kaydet)
EndFunc
Func _ac()
$IP = InputBox("IP Girin", "Lütfen sitenin IP'sini girin.", "")
if not @error Then
$Site = InputBox("Siteyi Girin.", "Lütfen sitenin adresini girin.", "")
if not @error Then
$tekraroku = guictrlread($edit1)
GUICtrlSetData($Edit1, $tekraroku & @CRLF & $IP & " " & $Site)
EndIf
EndIf
EndFunc
Func _engelle()
$Site = InputBox("Siteyi Girin.", "Lütfen sitenin adresini girin.", "")
if not @error Then
$tekraroku2 = guictrlread($edit1)
GUICtrlSetData($Edit1, $tekraroku2 & @CRLF & "127.0.0.1 " & $Site)
EndIf
EndFunc[/code]

Link to comment
Share on other sites

  • 2 hafta sonra ...
  • 1 yıl yıl...

[quote name='radyofon' date='06 March 2012 - 09:48 ' timestamp='1331020123' post='1165630']
Programı birkaç defa indirdim ve her denememde:

"Autoplay encountered an error (28) unzipping the file following file: C:\Users\pc4\Desktop\hosts editor 1.1\hosts editor 1.1.apz"
[/quote]

[b]Winrar ile açıp çıkarın önce proje dosyasını. Sonra açmaya çalışın.[/b]

Link to comment
Share on other sites

[quote name='Baba_' date='08 March 2012 - 14:42 ' timestamp='1331210564' post='1166516']
[b]Winrar ile açıp çıkarın önce proje dosyasını. Sonra açmaya çalışın.[/b]
[/quote]

apz dosyası bozuk. İndirmeyi siz de deneyin isterseniz. apz dosyası AMS' de açılamıyor ama exe dosyası sağlam.

Link to comment
Share on other sites

  • 10 ay sonra...
Linkler çalışıyor. Ayrıca şu windows 8'de de denedim. Eğer aşağıdaki ayarı yaparsanız direk çalıştırarak işlem yapabilirsiniz.

 

cxchDDQ.png

 

 

Programında veya Linkler de Promlem yok Siteleri Regedit  veya gpedit.msc 'den Engelleyebilir miyiz.

Link to comment
Share on other sites

  • 1 ay sonra...
  • 4 ay sonra...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...