清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
#! /usr/bin/env ruby
# =kk=
# sevkme@qq.com
# coding: utf-8#
# 需要 QQwry.dat 这个纯真IP库
require 'ipwry.rb'
@i = IpLocationSeeker.new
def addr(ip)
return '' if ip =~ /^0\.|^127|^192|^10/
@i.seek(ip).togb
end
$t = {}
`tasklist`.scan(/(^\w.+?)(\d+)\s*/m).each{|x,y| $t[y]=x.strip }
p ARGV
puts `netstat #{ARGV.join(' ')}`.gsub(/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}:)/){
"#{addr($1)} #{$1}"
}.gsub(/\s(\d+)$/m){$t[$1]}