Untitled


SUBMITTED BY: Guest

DATE: May 30, 2015, 3:23 p.m.

FORMAT: Text only

SIZE: 7.9 kB

HITS: 862

  1. #include <GUIConstantsEx.au3> ;thu vien cua GUI
  2. #include <Process.au3>
  3. #NoTrayIcon
  4. $size = 10;
  5. $font = "Arial"
  6. $attribute = 3; [optional] To define italic:2 underlined:4 strike:8 char format (add together the values of all the styles required, 2+4 = italic and underlined).
  7. $gui = GUICreate("Change DNS", 400, 400) ;Tao GUI
  8. $btnGoogle = GUICtrlCreateButton("Google DNS", 20, 20, 70, 25) ;tao nut button
  9. $btnDefault = GUICtrlCreateButton("DNS Default", 20, 55, 70, 25) ;tao nut button
  10. $btnComodoDNS = GUICtrlCreateButton("Comdo DNS", 20, 90, 70, 25) ;tao nut button
  11. $btnAdvantage = GUICtrlCreateButton("Advantage", 20, 125, 70, 25) ;tao nut button
  12. $btnOpenDNS = GUICtrlCreateButton("Open DNS", 20, 160, 70, 25) ;tao nut button
  13. $btnUltraDNS = GUICtrlCreateButton("Ultra DNS", 20, 195, 70, 25) ;tao nut button
  14. $btnlevel3 = GUICtrlCreateButton("Level 3", 20, 230, 70, 25)
  15. $btnOpenNIC = GUICtrlCreateButton("Open NIC", 20, 265, 70, 25)
  16. $btnDNS8 = GUICtrlCreateButton("DNS 8", 20, 300, 70, 25)
  17. $btnDNS9 = GUICtrlCreateButton("DNS 9", 155, 20, 70, 25)
  18. $btnDNS10 = GUICtrlCreateButton("DNS 10", 155, 55, 70, 25)
  19. $btnDNS11 = GUICtrlCreateButton("DNS 11", 155, 90, 70, 25)
  20. $btnDNS12 = GUICtrlCreateButton("DNS 12", 155, 125, 70, 25)
  21. $btnDNS13 = GUICtrlCreateButton("DNS 13", 155, 160, 70, 25)
  22. $btnDNS14 = GUICtrlCreateButton("DNS 14", 155, 195, 70, 25)
  23. $btnDNS15 = GUICtrlCreateButton("DNS 15", 155, 230, 70, 25)
  24. $btnDNS16 = GUICtrlCreateButton("DNS 16", 155, 265, 70, 25)
  25. GUICtrlCreateLabel("zolamua.com - nguyenthienanit@gmail.com - 01678.115.292",20,0,400,20);
  26. GUICtrlSetFont(-1, $size, 400, $attribute, $font) ; dat font va size chu
  27. GUISetState() ;hien thi giao dien
  28. while 1 ; vong lap xu ly thong diep
  29. $msg = GUIGetMsg() ; nhan thong diep
  30. Switch $msg ; xet thong diep
  31. Case $btnGoogle
  32. $DNS1 = "8.8.8.8"
  33. $DNS2 = "8.8.4.4"
  34. RunWait('netsh inter ip set dns "Local Area Connection" static ' & $DNS1)
  35. RunWait('netsh inter ip add dns "Local Area Connection" ' & $DNS2 & " index=2")
  36. Case $btnDefault
  37. $DNS1 = "127.0.0.1"
  38. $DNS2 = "127.0.0.1"
  39. RunWait('netsh inter ip set dns "Local Area Connection" static ' & $DNS1)
  40. RunWait('netsh inter ip add dns "Local Area Connection" ' & $DNS2 & " index=2")
  41. Case $btnComodoDNS
  42. $DNS1 = "156.154.70.22"
  43. $DNS2 = "156.154.71.22"
  44. RunWait('netsh inter ip set dns "Local Area Connection" static ' & $DNS1)
  45. RunWait('netsh inter ip add dns "Local Area Connection" ' & $DNS2 & " index=2")
  46. Case $btnAdvantage
  47. $DNS1 = "156.154.70.1"
  48. $DNS2 = "156.154.71.1"
  49. RunWait('netsh inter ip set dns "Local Area Connection" static ' & $DNS1)
  50. RunWait('netsh inter ip add dns "Local Area Connection" ' & $DNS2 & " index=2")
  51. Case $btnOpenDNS
  52. $DNS1 = "208.67.222.222"
  53. $DNS2 = "208.67.220.220"
  54. RunWait('netsh inter ip set dns "Local Area Connection" static ' & $DNS1)
  55. RunWait('netsh inter ip add dns "Local Area Connection" ' & $DNS2 & " index=2")
  56. Case $btnUltraDNS
  57. $DNS1 = "204.69.234.1"
  58. $DNS2 = "204.74.101.1"
  59. RunWait('netsh inter ip set dns "Local Area Connection" static ' & $DNS1)
  60. RunWait('netsh inter ip add dns "Local Area Connection" ' & $DNS2 & " index=2")
  61. Case $btnlevel3
  62. $DNS1 = "4.2.2.3"
  63. $DNS2 = "4.2.2.4"
  64. RunWait('netsh inter ip set dns "Local Area Connection" static ' & $DNS1)
  65. RunWait('netsh inter ip add dns "Local Area Connection" ' & $DNS2 & " index=2")
  66. Case $btnOpenNIC
  67. $DNS1 = "58.6.115.42"
  68. $DNS2 = "58.6.115.43"
  69. RunWait('netsh inter ip set dns "Local Area Connection" static ' & $DNS1)
  70. RunWait('netsh inter ip add dns "Local Area Connection" ' & $DNS2 & " index=2")
  71. Case $btnDNS8
  72. $DNS1 = "198.77.116.225"
  73. $DNS2 = "198.77.116.227"
  74. RunWait('netsh inter ip set dns "Local Area Connection" static ' & $DNS1)
  75. RunWait('netsh inter ip add dns "Local Area Connection" ' & $DNS2 & " index=2")
  76. Case $btnDNS9
  77. $DNS1 = "209.244.0.3"
  78. $DNS2 = "209.244.0.4"
  79. RunWait('netsh inter ip set dns "Local Area Connection" static ' & $DNS1)
  80. RunWait('netsh inter ip add dns "Local Area Connection" ' & $DNS2 & " index=2")
  81. Case $btnDNS10
  82. $DNS1 = "141.211.125.17"
  83. $DNS2 = "141.211.144.17"
  84. RunWait('netsh inter ip set dns "Local Area Connection" static ' & $DNS1)
  85. RunWait('netsh inter ip add dns "Local Area Connection" ' & $DNS2 & " index=2")
  86. Case $btnDNS11
  87. $DNS1 = "129.250.35.250"
  88. $DNS2 = "129.250.35.251"
  89. RunWait('netsh inter ip set dns "Local Area Connection" static ' & $DNS1)
  90. RunWait('netsh inter ip add dns "Local Area Connection" ' & $DNS2 & " index=2")
  91. Case $btnDNS12
  92. $DNS1 = "198.77.116.221"
  93. $DNS2 = "198.77.116.223"
  94. RunWait('netsh inter ip set dns "Local Area Connection" static ' & $DNS1)
  95. RunWait('netsh inter ip add dns "Local Area Connection" ' & $DNS2 & " index=2")
  96. Case $btnDNS13
  97. $DNS1 = "66.244.95.20"
  98. $DNS2 = "66.244.95.22"
  99. RunWait('netsh inter ip set dns "Local Area Connection" static ' & $DNS1)
  100. RunWait('netsh inter ip add dns "Local Area Connection" ' & $DNS2 & " index=2")
  101. Case $btnDNS14
  102. $DNS1 = "199.45.32.37"
  103. $DNS2 = "199.45.32.38"
  104. RunWait('netsh inter ip set dns "Local Area Connection" static ' & $DNS1)
  105. RunWait('netsh inter ip add dns "Local Area Connection" ' & $DNS2 & " index=2")
  106. Case $btnDNS15
  107. $DNS1 = "151.202.0.84"
  108. $DNS2 = "151.202.0.85"
  109. RunWait('netsh inter ip set dns "Local Area Connection" static ' & $DNS1)
  110. RunWait('netsh inter ip add dns "Local Area Connection" ' & $DNS2 & " index=2")
  111. Case $btnDNS16
  112. $DNS1 = "205.171.2.65"
  113. $DNS2 = "205.171.3.65"
  114. RunWait('netsh inter ip set dns "Local Area Connection" static ' & $DNS1)
  115. RunWait('netsh inter ip add dns "Local Area Connection" ' & $DNS2 & " index=2")
  116. Case $GUI_EVENT_CLOSE ; xu ly su kien dong cua so
  117. ExitLoop ; thoat khoi vong lap
  118. EndSwitch
  119. WEnd

comments powered by Disqus