Advertisement
Guest User

Defcon WarHead Source Code 2.2

a guest
Nov 28th, 2015
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.51 KB | None | 0 0
  1. Imports System.Net.Sockets
  2.  
  3. Module Module1
  4. Private CMD As String
  5. Private CMD1 As String
  6. Private nl = vbNewLine
  7. Private ip
  8. Private beepoff As Boolean = False
  9. Private beepon As Boolean = True
  10. Private Count As Integer = 0
  11. Private Found As Integer = 0
  12. Private Versionn As String = "2.2"
  13. Private NoFound As Integer = 0
  14. Private SettingsPort As Integer = 23
  15. Private TemptCounter As Integer = 0
  16. Private conwith As Integer
  17. Private conheight As Integer
  18.  
  19. Sub Main()
  20. 'Console.WindowHeight = Console.LargestWindowHeight
  21. ''
  22. ' Console.SetBufferSize(Console.LargestWindowWidth, Console.LargestWindowHeight)
  23. 'Console.SetWindowPosition(Console.LargestWindowWidth / 2, Console.LargestWindowHeight / 2)
  24. 'Console.Read()
  25. conwith = Console.WindowWidth
  26. conheight = Console.WindowHeight
  27. Console.Title = "Defcon WarHead"
  28. Console.ForegroundColor = ConsoleColor.Green
  29. Console.WriteLine(vbNewLine)
  30. Console.WriteLine(" +-----------------------------------------+")
  31. Console.WriteLine(" | |")
  32. Console.WriteLine(" | Defcon WarHead |")
  33. Console.WriteLine(" | War Dialer |")
  34. Console.WriteLine(" | 2.1 |")
  35. Console.WriteLine(" +-----------------------------------------+")
  36. If Not System.IO.File.Exists("DefconWarHead.txt") Then
  37. FileOpen(2, "DefconWarHead.txt", OpenMode.Output)
  38. ' PrintLine(2, Nothing)
  39. FileClose(2)
  40. Console.WriteLine("File: DefconWarHead.txt ,Does not exist.")
  41. Console.WriteLine("Creating: DefconWarHead.txt")
  42.  
  43. End If
  44. If Not System.IO.File.Exists("DefconReachedServers.txt") Then
  45. Console.WriteLine("File: DefconReachedServers.txt ,Does not exist.")
  46. Console.WriteLine("Creating: DefconReachedServers.txt")
  47. FileOpen(1, "DefconReachedServers.txt", OpenMode.Output)
  48. FileClose(1)
  49. Console.WriteLine(vbNewLine)
  50. Console.WriteLine("Press Any Key To Continue...")
  51. Console.Beep()
  52. Console.ReadKey()
  53. Title()
  54. Console.ResetColor()
  55. Console.WriteLine("NOTE: If You War dial, Your Reached Server List Will Reset.")
  56. Console.Write("Type: 'help' for help." + nl)
  57. Commands()
  58. End If
  59.  
  60. FileOpen(2, "DefconWarHead.txt", OpenMode.Input)
  61. Title()
  62. Console.ResetColor()
  63. Console.WriteLine("Type: 'help' for help." + nl)
  64. Console.Beep()
  65. 'Default Beep Console.Beep(800, 300)
  66. Commands()
  67. End Sub
  68.  
  69. Sub runn()
  70. Console.ForegroundColor = ConsoleColor.Green
  71. Console.WriteLine("Dialing Modem")
  72. FileOpen(1, "DefconReachedServers.txt", OpenMode.Output)
  73. While Not EOF(2)
  74. Count += 1
  75. Dim xcount = "(" + Count.ToString + ")"
  76. ' If Console.Read = True Then
  77. 'Console.WriteLine("T")
  78. ' End If
  79. Try
  80. ip = LineInput(2)
  81. Console.ForegroundColor = ConsoleColor.Green
  82. Console.Write(xcount + "Dialing: " + ip + "...." + SettingsPort.ToString + "...")
  83. Dim telnetServerIp As String = ip
  84. Dim telnetPort = SettingsPort
  85. Dim client As New TcpClient(telnetServerIp, telnetPort)
  86. Found += 1
  87. Console.ForegroundColor = ConsoleColor.Green
  88. Console.Write("Carrier Found: (" + Found.ToString + ")" + nl)
  89. ' Console.WriteLine("(" + Found.ToString + ")" + "Reached Server: " + ip + nl)
  90. If beepon = True Then
  91. Console.Beep(2000, 300)
  92. End If
  93.  
  94. PrintLine(1, ip)
  95.  
  96. Catch ex As Exception
  97. NoFound += 1
  98. Console.ForegroundColor = ConsoleColor.Red
  99. Console.Write("No Carrier Found: " + NoFound.ToString + nl)
  100. ' Console.WriteLine("Could Not Reached Server: " + ip + " : " + SettingsPort.ToString + nl)
  101. If beepoff = True Then
  102. Console.Beep(100, 300)
  103. End If
  104. End Try
  105. Console.Title = "Defcon WarHead ,Found (" + Found.ToString + ")"
  106. End While
  107.  
  108.  
  109. If EOF(2) = True Then
  110. FileClose(1)
  111. Console.ForegroundColor = ConsoleColor.Yellow
  112. Console.WriteLine("Dialing: Finish" + nl)
  113. Console.WriteLine("Open: " + Found.ToString + " Out Of " + Count.ToString)
  114. Console.WriteLine("Not found: " + NoFound.ToString)
  115. Console.ForegroundColor = ConsoleColor.Green
  116. Console.Beep()
  117. Console.Beep()
  118. Console.Beep()
  119. Else
  120. Console.Beep()
  121. End If
  122. Count = 0
  123. Found = 0
  124. NoFound = 0
  125. End Sub
  126. Sub Title()
  127. Console.Clear()
  128. Console.ForegroundColor = ConsoleColor.Green
  129. Console.WriteLine(vbNewLine)
  130. Console.WriteLine(" +-----------------------------------------+")
  131. Console.WriteLine(" | |")
  132. Console.WriteLine(" | Defcon WarHead |")
  133. Console.WriteLine(" | War Dialer |")
  134. Console.WriteLine(" | 2.1 |")
  135. Console.WriteLine(" +-----------------------------------------+")
  136. Console.WriteLine(vbNewLine)
  137. End Sub
  138.  
  139.  
  140. Sub Updater()
  141. Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("https://dl.dropboxusercontent.com/s/pzl5tm56920t0sr/Version.txt")
  142. Dim response As System.Net.HttpWebResponse = request.GetResponse()
  143. Dim x1xx1 As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream)
  144. Dim NewVersion As String = x1xx1.ReadToEnd()
  145. If Not NewVersion = Versionn Then
  146. Console.WriteLine("Would you like to update. ?")
  147. Console.WriteLine("Y/N")
  148. Dim xcx = Console.ReadLine()
  149. If xcx.ToUpper = "Y" Then
  150. My.Computer.Network.DownloadFile("https://dl.dropboxusercontent.com/s/59pd9uc253pzor0/Decon%20WarHead%202.0.exe", "DefconWarHead" + NewVersion + ".exe")
  151. Else
  152. Console.WriteLine("Not going to update.")
  153. End If
  154. Else
  155. Console.WriteLine("No new updates avalibe .")
  156. End If
  157. End Sub
  158. Sub Listing()
  159.  
  160. Try
  161.  
  162. While Not EOF(2)
  163. TemptCounter += 1
  164. Try
  165. Console.WriteLine(LineInput(2))
  166. 'Console.ReadLine()
  167. Catch ex As Exception
  168. Console.WriteLine(ex.Message)
  169. End Try
  170. End While
  171. FileClose(2)
  172. FileOpen(2, "DefconWarHead.txt", OpenMode.Input)
  173. Catch ex As Exception
  174. Console.WriteLine("File not open, Please Open File." + vbNewLine + ex.Message)
  175. End Try
  176. Console.WriteLine(vbNewLine + "(" + TemptCounter.ToString + ")" + " Ips.")
  177. End Sub
  178. Sub Decoder()
  179. If CMD1 = "HELP" Or CMD1 = "?" Then
  180. Console.WriteLine("Cmd: Help (View Help List)")
  181. Console.WriteLine("Cmd: Close (Close Ip File)")
  182. Console.WriteLine("Cmd: Open (Open Ip File)")
  183. Console.WriteLine("Cmd: Add (Add New Ip To File)")
  184. Console.WriteLine("Cmd: Dial (Dial Computers On List)")
  185. Console.WriteLine("Cmd: Cls (Clear Screen)")
  186. Console.WriteLine("CMD: Ping (Ping An Ip)")
  187. Console.WriteLine("Cmd: List (List Ips in File)")
  188. Console.WriteLine("Cmd: Dir (List Files In Dial Folder)")
  189. Console.WriteLine("Cmd: Settings (Change Dialing Port)")
  190. Console.WriteLine("Cmd: Version (View Version Of Defcon WarHead)")
  191. Console.WriteLine("CMD: PS (Port Scan)")
  192. Console.WriteLine("Cmd: Beeps (Edit Beep Settings)")
  193. Console.WriteLine("Cmd: Ports (List Common Ports)")
  194. Console.WriteLine("Cmd: Update (Update To The Lastes Version)" + nl)
  195. ElseIf CMD1 = "ADD" Then
  196. Console.WriteLine("Ip:")
  197. Dim NewIp As String = Console.ReadLine()
  198. Try
  199. FileClose(2)
  200. Catch ex As Exception
  201. Console.ForegroundColor = ConsoleColor.Yellow
  202. Console.WriteLine(ex.Message)
  203. End Try
  204. Try
  205. FileOpen(2, "DefconWarHead.txt", OpenMode.Output)
  206. PrintLine(2, NewIp)
  207. Catch ex As Exception
  208. Console.ForegroundColor = ConsoleColor.Yellow
  209. Console.WriteLine(ex.Message)
  210. End Try
  211. Try
  212. FileClose(2)
  213. Catch ex As Exception
  214. Console.ForegroundColor = ConsoleColor.Yellow
  215. Console.WriteLine(ex.Message)
  216. End Try
  217. Try
  218. FileOpen(2, "DefconWarHead.txt", OpenMode.Input)
  219. Console.WriteLine("Atemped to add: '" + NewIp + "' to list." + nl)
  220. Catch ex As Exception
  221. Console.ForegroundColor = ConsoleColor.Yellow
  222. Console.WriteLine(ex.Message)
  223. End Try
  224. ElseIf CMD1 = "SECRET" Then
  225. Shell("cmd.exe /c start www.youtube.com/watch?v=DLMXMFa03kg", AppWinStyle.Hide)
  226. ElseIf CMD1 = "CLOSE" Then
  227. Try
  228. FileClose(2)
  229. Console.WriteLine("Closed DefconWarHead.txt." + nl)
  230. Catch ex As Exception
  231. Console.ForegroundColor = ConsoleColor.Yellow
  232. Console.WriteLine(ex.Message)
  233. End Try
  234.  
  235. ElseIf CMD1 = "FLS" Then
  236. Console.WriteLine("Full Screen" + nl)
  237. Console.WindowWidth = Console.LargestWindowWidth
  238. ElseIf CMD1 = "DTS" Then
  239. Console.WriteLine("Default Screen" + nl)
  240. Console.WindowWidth = conwith
  241. Console.WindowHeight = conheight
  242. ElseIf CMD1 = "FUCK YOU" Then
  243. Dim SAPI = CreateObject("SAPI.spvoice")
  244. SAPI.Volume = 100
  245. SAPI.Rate = -3
  246. SAPI.Speak("No, Fuck You. !")
  247. Console.WriteLine("Type: Secret for a secret.")
  248. ElseIf CMD1 = "SHELL" Then
  249. Shell(Console.ReadLine)
  250. ElseIf CMD1 = "PING" Then
  251.  
  252. Console.WriteLine("Who would you wish to ping to. ?")
  253. Dim cxcmd = Console.ReadLine
  254. Dim args = cxcmd.Split(" ")
  255. If args.Length = 2 Then
  256. Shell("cmd.exe /c ping " + args(0) + " -n 1")
  257. Console.WriteLine("l0")
  258. ElseIf args.Length = 3 Then
  259. Shell("cmd.exe /c ping " + args(0) + " -l " + args(1) + " -n " + args(2))
  260. Console.WriteLine("l3")
  261. Else
  262. Console.WriteLine("Usage: (IP) (Bytes) (Amount)")
  263. End If
  264. ElseIf CMD1 = "SETTINGS" Then
  265. Console.WriteLine("Set port to dial on.")
  266. SettingsPort = Console.ReadLine()
  267. ElseIf CMD1 = "PS" Then
  268. Console.WriteLine("What ip would you wish to port scan ?")
  269. Dim ccmd = Console.ReadLine
  270. Shell("cmd.exe /c start http://anti-hacker-alliance.com/index.php?ip=" + ccmd)
  271. Console.WriteLine("Please wait a few minutes.")
  272. ElseIf CMD1 = "TITLE" Then
  273. Title()
  274. ' ElseIf CMD1 = "EXIT" Or CMD1 = "QUIT" Then
  275. 'Closes()
  276. ElseIf CMD1 = "TELNET" Then
  277. Shell("cmd.exe /c start telnet")
  278. ElseIf CMD1 = "DIR" Then
  279. Shell("cmd.exe /c dir")
  280. Commands()
  281.  
  282. ElseIf CMD1 = "BEEPS" Then
  283. Console.WriteLine("Would you like console to beep when server not found. ?")
  284. Console.WriteLine("(Y/N)")
  285. Dim xx1 = Console.ReadLine
  286. If xx1.ToUpper = "Y" Then
  287. Console.WriteLine("Set to beep on non found servers")
  288. beepoff = True
  289. Else
  290. Console.WriteLine("Set NOT to beep on non found servers")
  291. beepoff = False
  292. End If
  293. Console.WriteLine(vbNewLine)
  294. Console.WriteLine("Would you like console to beep when server found. ?")
  295. Console.WriteLine("(Y/N)")
  296. Dim xx1x = Console.ReadLine
  297. If xx1x.ToUpper = "Y" Then
  298. Console.WriteLine("Set to beep on found servers")
  299. beepon = True
  300. Else
  301. Console.WriteLine("Set NOT to beep on found servers")
  302. beepon = False
  303. End If
  304.  
  305.  
  306.  
  307. ElseIf CMD1 = "VERSION" Or CMD1 = "VER" Then
  308. Console.WriteLine("Version: " + Versionn)
  309.  
  310. ElseIf CMD1 = "LIST" Or CMD1 = "LS" Then
  311. Try
  312. FileOpen(2, "DefconWarHead.txt", OpenMode.Input)
  313. Catch ex As Exception
  314.  
  315. End Try
  316. Listing()
  317. ElseIf CMD1 = "UPDATE" Then
  318. Updater()
  319.  
  320. ElseIf CMD1 = "OPEN" Then
  321. Try
  322. FileOpen(2, "DefconWarHead.txt", OpenMode.Input)
  323. Console.WriteLine("Opened DefconWarHead.txt." + nl)
  324. Catch ex As Exception
  325. Console.ForegroundColor = ConsoleColor.Yellow
  326. Console.WriteLine(ex.Message)
  327. End Try
  328. ElseIf CMD1 = "CLS" Or CMD1 = "CLEAR" Then
  329. Console.Clear()
  330. Console.Title = "Defcon WarHead"
  331. ElseIf CMD1 = "DIAL" Then
  332. Try
  333. FileClose(2)
  334. FileOpen(2, "DefconWarHead.txt", OpenMode.Input)
  335. Catch ex As Exception
  336. Console.ForegroundColor = ConsoleColor.Yellow
  337. Console.WriteLine(ex.Message + nl)
  338. End Try
  339. runn()
  340.  
  341. ElseIf CMD1 = "PORTS" Then
  342. Console.WriteLine(vbNewLine)
  343. Console.WriteLine(" +-----------------------------------------+")
  344. Console.WriteLine(" | |")
  345. Console.WriteLine(" | Most Common Ports |")
  346. Console.WriteLine(" | |")
  347. Console.WriteLine(" +-----------------------------------------+")
  348. Console.WriteLine(vbNewLine)
  349. Console.WriteLine("Port: 20 :FTP, Data Transfer.")
  350. Console.WriteLine("Port: 21 :FTP, Control (Command).")
  351. Console.WriteLine("Port: 22 :SSH, Secure Shell (SSH) secure logins, file transfers (scp, sftp) and port forwarding.")
  352. Console.WriteLine("Port: 23 :TELNET, Telnet Protocol-unencrypted text communications.")
  353. Console.WriteLine("Port: 24 :Priv-Mail, any private mail system.")
  354. Console.WriteLine("Port: 25 :SMTP, Simple Mail Transfer Protocol, Used for e-mail routing.")
  355. Console.WriteLine("Port: 35 :PSP, Any private Printer Server Protocol.")
  356. Console.WriteLine("Port: 37 :TP, Time Protocol.")
  357. Console.WriteLine("Port: 56 :RAP, Rout Access Protocol.")
  358. Console.WriteLine("Port: 57 :PTA, Private Terminal Access.")
  359. Console.WriteLine("Port: 80 :HTTP, Hypertext Transfer Protocol.")
  360. Console.WriteLine("Port: 107 :RTSP, Remote Telnet Service Protocol.")
  361. Console.WriteLine("Port: 108 :SGAS, SNA Gateway Access Server.")
  362. Console.WriteLine("Port: 115 :SFTP, Simple File Transfer Protocol.")
  363. Console.WriteLine("Port: 123 :NTP, Network Time Protocol.")
  364. Console.WriteLine("Port: 152 :BFTP, Background File Transfer Protocol.")
  365. Console.WriteLine("Port: 153 :SGMP, Simple Gateway Monitoring Protocol.")
  366.  
  367. Console.WriteLine("Port: 156 :SQLS, SQL Service.")
  368. Console.WriteLine("Port: 8080 :Sometimes people have cameras setup.")
  369.  
  370. Console.WriteLine("Good website for getting a ton of ips: https://www.randomlists.com/ip-addresses")
  371. Console.WriteLine(nl)
  372. ElseIf CMD1 = Nothing Then
  373.  
  374. Else
  375. Console.WriteLine("Unknown Command, Type 'help' for Help.")
  376. End If
  377. End Sub
  378. Sub Commands()
  379. Console.ForegroundColor = ConsoleColor.Green
  380. 'Console.WriteLine(vbNewLine)
  381. Console.Write(">")
  382. Dim xcmd = Console.ReadLine()
  383. CMD = xcmd.TrimStart(">")
  384. CMD1 = CMD.ToUpper
  385. Decoder()
  386. If Not CMD1 = "EXIT" Or CMD1 = "QUIT" Then
  387. Commands()
  388. End If
  389.  
  390. End Sub
  391.  
  392. Sub Closes()
  393. Console.Clear()
  394. Console.ForegroundColor = ConsoleColor.Yellow
  395. Console.WriteLine("Goodbye!")
  396. Threading.Thread.Sleep(3000)
  397. End Sub
  398. End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement