Jump to content
chain

Port Checker Version

Recommended Posts

  • Administrators
;;;;;;;;;;;;;;;;;;
;; Port Checker ;;
;; By Jonesy44  ;;
;;;;;;;;;;;;;;;;;;

alias pc {
  set %pc.addr $$input(Enter the Address/IP and port of the server you want to check (IP:Port),eq,Port Check - Input Information)
  if ($sock(pc)) {
    .sockclose pc
  }
  if (%pc.addr) {
    echo -a 2Port Check; --------------------------------------------------------------------------------------
    echo -a 2Port Check; Checking address $qt($iif(: isin %pc.addr,%pc.addr,%pc.addr $+ : $+ 80)) Please wait..
    .sockopen pc $iif(: isin %pc.addr,$replace(%pc.addr,$chr(58),$chr(32)),%pc.addr 80)
    set %pc.timeout 5
    .timerpc1 0 1 pc.timeout
  }
}
alias pc.timeout {
  if (%pc.timeout <= 0) {
    echo -a 4Port Check: Could not connect to $qt($iif(: isin %pc.addr,%pc.addr,%pc.addr $+ : $+ 80))
    echo -a 2Port Check; --------------------------------------------------------------------------------------
    .sockclose pc
    .timerpc1 off
    unset %pc.addr
  }
  else {
    dec %pc.timeout
  }
}
on *:SOCKOPEN:pc: {
  if ($sockerr) {
    echo -a 4Port Check: Could not connect to $qt($iif(: isin %pc.addr,%pc.addr,%pc.addr $+ : $+ 80))
  }
  else {
    echo -a 3Port Check: Connected succesfully to $qt($iif(: isin %pc.addr,%pc.addr,%pc.addr $+ : $+ 80))
  }
  echo -a 2Port Check; --------------------------------------------------------------------------------------
  unset %pc.addr
  .sockclose pc
  .timerpc1 off
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...