Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- App Codes,
- Example:
- (Test) [Bat]
- echo hi
- pause
- exit
- {End}
- Dns To Ip:
- (DNS To Ip) [Bat]
- echo off
- cls
- set /p id="Enter DNS/Hostname: "
- cls
- ping -n 1 -l 1 %id% | find "["
- pause >> nul
- {End}
- Ip Grabber:
- (Ip Grabber) [Bat]
- echo off
- cls
- start Ip.vbs
- echo Please Wait...
- ping -n 5 0.0.0.0>nul
- ipconfig | find "IPv4">> ig123456789.txt
- :A
- cls
- more ig123456789.txt
- echo Top=Router/Public Ip
- echo Middle=Ethernet IPv4
- echo Last=Wireless IPv4 (That's Normally The Ipv4 You Use Unless You Use Ethernet Instead Of Wireless)
- pause
- {End}
- (Ip) [Vbs]
- Option Explicit
- Dim WshShell, strCurDir
- Set WshShell = CreateObject("WScript.Shell")
- strCurDir = WshShell.CurrentDirectory
- Dim http : Set http = CreateObject( "MSXML2.ServerXmlHttp" )
- http.Open "GET", "http://icanhazip.com", False
- http.Send
- Dim FSO
- Dim OutPutFile
- Dim LCurDir
- LCurDir = (strCurDir & "\ig123456789.txt")
- Set FSO = CreateObject("Scripting.FileSystemObject")
- Set OutPutFile = FSO.OpenTextFile(LCurDir,2 , True)
- OutPutFile.WriteLine(http.responseText)
- Set FSO= Nothing
- {End}
- Port Checker:
- (Port Checker) [Vbs]
- Dim port
- Dim address
- address = Inputbox("Enter Ip Address","Ip")
- port = Inputbox("Enter Port","Port")
- WScript.echo address & " Is " & TCPPing( address, port)
- Function TCPPing( address, port)
- Set xhr = WScript.CreateObject("MSXML2.ServerXMLHTTP")
- xhr.SetTimeouts 8000,8000,8000,8000
- On Error Resume Next
- xhr.Open "GET", "http://" & address & ":" & port, False
- xhr.Send
- Select Case Err.Number
- Case 0, -2147012744, -2147024891
- msg = "Up"
- splss1
- Case -2147012894
- msg = "Down"
- splss0
- Case Else
- msg = "Error"
- splss0
- End Select
- On Error Goto 0
- TCPPing = msg
- Set xhr= Nothing
- End Function
- Function splss1
- Dim WshShell, strCurDir
- Set WshShell = CreateObject("WScript.Shell")
- strCurDir = WshShell.CurrentDirectory
- Dim FSO
- Dim OutPutFile
- Dim LCurDir
- LCurDir = (strCurDir & "\splss.txt")
- Set FSO = CreateObject("Scripting.FileSystemObject")
- Set OutPutFile = FSO.OpenTextFile(LCurDir,2 , True)
- OutPutFile.WriteLine("1")
- Set FSO= Nothing
- End Function
- Function splss0
- Dim WshShell, strCurDir
- Set WshShell = CreateObject("WScript.Shell")
- strCurDir = WshShell.CurrentDirectory
- Dim FSO
- Dim OutPutFile
- Dim LCurDir
- LCurDir = (strCurDir & "\splss.txt")
- Set FSO = CreateObject("Scripting.FileSystemObject")
- Set OutPutFile = FSO.OpenTextFile(LCurDir,2 , True)
- OutPutFile.WriteLine("0")
- Set FSO= Nothing
- End Function
- {End}
Advertisement
Add Comment
Please, Sign In to add comment