Posted By

spYro on 06/19/09


Tagged

censorship zensursula


Versions (?)

Zensursula


 / Published in: Visual Basic
 

  1. Dim name_ As String
  2.  
  3. Private Declare Function ShellExecute Lib "shell32.dll" _
  4. Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal _
  5. lpOperation As String, ByVal lpFile As String, ByVal _
  6. lpParameters As String, ByVal lpDirectory As String, _
  7. ByVal nShowCmd As Long) As Long
  8.  
  9.  
  10. Public Function getAdapterInfos()
  11. Dim objWMIService As Object
  12. Dim objRegistry As Object
  13. Dim Adapters As Object
  14. Dim Adapter As Object
  15. Dim Adapter2 As Object
  16. Dim AConfig As Object
  17. Dim conName As String
  18. Dim keyPath As String
  19. Dim sql As String
  20. Dim Computer As String
  21. Dim s As String
  22. Dim regPath As String
  23. Const HKEY_LOCAL_MACHINE = &H80000002
  24. Computer = "localhost"
  25.  
  26. Set objRegistry = GetObject("winmgmts:" & "!\\" & Computer & "\root\default:StdRegProv")
  27.  
  28. sql = "SELECT * FROM Win32_NetworkAdapter WHERE NetConnectionStatus Is Not NULL And MACAddress Is Not NULL"
  29.  
  30. Set objWMIService = GetObject("winmgmts:" & "!\\" & Computer & "\root\cimv2")
  31. Set Adapters = objWMIService.ExecQuery(sql)
  32.  
  33. For Each Adapter In Adapters
  34. s = Adapter.Name & "," & Adapter.AdapterType & "," & Adapter.MACAddress & ","
  35. Set AConfig = objWMIService.ExecQuery("Select * from Win32_NetworkAdapterConfiguration Where Index = " & Adapter.Index)
  36.  
  37. For Each Adapter2 In AConfig
  38. keyPath = "SYSTEM\CurrentControlSet\Control\Network\" & _
  39. "{4D36E972-E325-11CE-BFC1-08002BE10318}\" & Adapter2.SettingID & "\Connection"
  40. objRegistry.GetExpandedStringValue HKEY_LOCAL_MACHINE, keyPath, "Name", conName
  41. Next Adapter2
  42. s = s & conName
  43. 'Debug.Print conName
  44. name_ = conName
  45. Next
  46. End Function
  47. Private Sub b_dezens_Click()
  48. b_dezens.Enabled = False
  49. Label_wait.Visible = True
  50.  
  51. '##### Festlegen der Variablen #####
  52. Dim temp_del As String
  53. Dim temp_add_1 As String
  54. Dim temp_add_2 As String
  55. Dim temp_flush As String
  56. Dim temp_batch As String
  57.  
  58. '##### Holen des Adapternamens #####
  59. Call getAdapterInfos
  60.  
  61. '##### Abfrage ob Name korrekt ausgelesen wurde #####
  62. If name_ = "" Then
  63. Shape1.FillColor = &HFF&
  64. Else
  65. Shape1.FillColor = &HFF00&
  66.  
  67. '##### #####
  68. temp_del = "cmd.exe /C netsh interface ip delete dns name=" & name_ & " all & "
  69. temp_add_1 = "cmd.exe /C netsh interface ip add dns name=" & name_ & " addr=208.67.222.222 & "
  70. temp_add_2 = "cmd.exe /C netsh interface ip add dns name=" & name_ & " addr=208.67.220.220 & "
  71. temp_flush = "cmd.exe /C ipconfig /flushdns"
  72. temp_batch = temp_del & temp_add_1 & temp_add_2 & temp_flush
  73. Shell temp_batch
  74. Shape2.FillColor = &HFF00&
  75. Label3.Visible = True
  76. Label_wait.Visible = False
  77. End Sub
  78. Private Sub Command2_Click()
  79. End
  80. End Sub
  81.  
  82. Private Sub b_zens_Click()
  83. b_zens.Enabled = False
  84. Label_wait.Visible = True
  85. Dim temp_del As String
  86. Dim temp_batch As String
  87. Call getAdapterInfos
  88. Shape1.FillColor = &HFF00&
  89. temp_del = "cmd.exe /C netsh interface ip delete dns name=" & name_ & " all & "
  90. temp_flush = "cmd.exe /C ipconfig /flushdns"
  91. temp_batch = temp_del & temp_flush
  92. Shell temp_batch
  93. Shape2.FillColor = &HFF00&
  94. Label3.Visible = True
  95. Label_wait.Visible = False
  96.  
  97. End Sub
  98.  
  99. Private Sub Command4_Click()
  100. Frame1.Visible = True
  101. End Sub
  102.  
  103. Private Sub Command5_Click()
  104. Frame1.Visible = False
  105. End Sub
  106.  
  107. Private Sub Label10_Click()
  108. Dim Result&
  109. Result = ShellExecute(Me.hwnd, "Open", _
  110. "http://720grad-lotus.blog.de/2009/04/15/pc-wissen-dns-aufloesung-5948501", "", App.Path, 1)
  111.  
  112. End Sub
  113.  
  114. Private Sub Label12_Click()
  115. Dim Result&
  116. Result = ShellExecute(Me.hwnd, "Open", _
  117. "http://720grad-lotus.blog.de/2009/03/12/kinderschaender-internetzensur-5744154", "", App.Path, 1)
  118.  
  119. End Sub

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: spYro on June 19, 2009

It's just a little Tool that will help you to change your DNS-Server to the one from onepDNS.org . I coded it a little just for fun and to show how easy it is to break the coming internet-censorship in Germany. By time I will perhaps work on it again, but it's working well, so there's no need to rush :)

spYro

You need to login to post a comment.