LiamBogur

My Apps

Jun 12th, 2017
693
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.54 KB | None | 0 0
  1. App Codes,
  2. Example:
  3. (Test) [Bat]
  4. echo hi
  5. pause
  6. exit
  7. {End}
  8.  
  9. Dns To Ip:
  10. (DNS To Ip) [Bat]
  11. echo off
  12. cls
  13. set /p id="Enter DNS/Hostname: "
  14. cls
  15. ping -n 1 -l 1 %id% | find "["
  16. pause >> nul
  17. {End}
  18.  
  19. Ip Grabber:
  20. (Ip Grabber) [Bat]
  21. echo off
  22. cls
  23. start Ip.vbs
  24. echo Please Wait...
  25. ping -n 5 0.0.0.0>nul
  26. ipconfig | find "IPv4">> ig123456789.txt
  27. :A
  28. cls
  29. more ig123456789.txt
  30. echo Top=Router/Public Ip
  31. echo Middle=Ethernet IPv4
  32. echo Last=Wireless IPv4 (That's Normally The Ipv4 You Use Unless You Use Ethernet Instead Of Wireless)
  33. pause
  34. {End}
  35. (Ip) [Vbs]
  36. Option Explicit
  37. Dim WshShell, strCurDir
  38. Set WshShell = CreateObject("WScript.Shell")
  39. strCurDir = WshShell.CurrentDirectory
  40. Dim http : Set http = CreateObject( "MSXML2.ServerXmlHttp" )
  41. http.Open "GET", "http://icanhazip.com", False
  42. http.Send
  43. Dim FSO
  44. Dim OutPutFile
  45. Dim LCurDir
  46. LCurDir = (strCurDir & "\ig123456789.txt")
  47. Set FSO = CreateObject("Scripting.FileSystemObject")
  48.  
  49. Set OutPutFile = FSO.OpenTextFile(LCurDir,2 , True)
  50. OutPutFile.WriteLine(http.responseText)
  51.  
  52. Set FSO= Nothing
  53. {End}
  54.  
  55. Port Checker:
  56. (Port Checker) [Vbs]
  57. Dim port
  58. Dim address
  59. address = Inputbox("Enter Ip Address","Ip")
  60. port = Inputbox("Enter Port","Port")
  61. WScript.echo address & " Is " & TCPPing( address, port)
  62.  
  63. Function TCPPing( address, port)
  64. Set xhr = WScript.CreateObject("MSXML2.ServerXMLHTTP")
  65. xhr.SetTimeouts 8000,8000,8000,8000
  66. On Error Resume Next
  67. xhr.Open "GET", "http://" & address & ":" & port, False
  68. xhr.Send
  69. Select Case Err.Number
  70. Case 0, -2147012744, -2147024891
  71. msg = "Up"
  72. splss1
  73. Case -2147012894
  74. msg = "Down"
  75. splss0
  76. Case Else
  77. msg = "Error"
  78. splss0
  79. End Select
  80. On Error Goto 0
  81. TCPPing = msg
  82. Set xhr= Nothing
  83. End Function
  84.  
  85. Function splss1
  86. Dim WshShell, strCurDir
  87. Set WshShell = CreateObject("WScript.Shell")
  88. strCurDir = WshShell.CurrentDirectory
  89. Dim FSO
  90. Dim OutPutFile
  91. Dim LCurDir
  92. LCurDir = (strCurDir & "\splss.txt")
  93. Set FSO = CreateObject("Scripting.FileSystemObject")
  94.  
  95. Set OutPutFile = FSO.OpenTextFile(LCurDir,2 , True)
  96. OutPutFile.WriteLine("1")
  97.  
  98. Set FSO= Nothing
  99. End Function
  100.  
  101. Function splss0
  102. Dim WshShell, strCurDir
  103. Set WshShell = CreateObject("WScript.Shell")
  104. strCurDir = WshShell.CurrentDirectory
  105. Dim FSO
  106. Dim OutPutFile
  107. Dim LCurDir
  108. LCurDir = (strCurDir & "\splss.txt")
  109. Set FSO = CreateObject("Scripting.FileSystemObject")
  110.  
  111. Set OutPutFile = FSO.OpenTextFile(LCurDir,2 , True)
  112. OutPutFile.WriteLine("0")
  113.  
  114. Set FSO= Nothing
  115. End Function
  116. {End}
Advertisement
Add Comment
Please, Sign In to add comment