My Computer Programs

(newlisp) port scan

steloflute 2013. 7. 22. 00:25

http://www.h-i-r.net/2009/07/network-programming-and-distributed.html

 

#!/usr/bin/newlisp
(set 'params (main-args))
(when (< (length params) 5)
  (println "USAGE: " (params 0) " " (params 1) " host begin-port end-port")
  (exit))
(set 'host (nth 2 params))
(set 'bport (int (nth 3 params)))
(set 'eport (int (nth 4 params)))
(for (port bport eport)
  (print port)
  (set 'socket (net-connect host port 1000))
  (if socket (println " open") (println)))
(exit)

 

 

 

'My Computer Programs' 카테고리의 다른 글

webcheck  (0) 2013.08.08
(newLISP) 로또 번호 생성  (0) 2013.07.26
(Paren) 로또 번호 생성  (0) 2013.07.09
(Clojure) 로또 번호 생성  (0) 2013.06.19
(Parenjs) 로또 번호 생성  (0) 2013.06.17