Git Product home page Git Product logo

http_info's Introduction

http_info 显示HTTP协议的服务器端信息

usage:
    http_info [ -d ] [ -w wait_time ] [ -s -t table_name ] [ -i url_file | url ]
          -d              debug
          -w wait_time    wait_time when do curl
          -s              ouput sql replace into statement
          -t table_name   sql replace table_name
          -i url_file     read url from url_file

http_info 执行 curl 去获取网站的HTTP 头信息,因此需要安装curl才可以正常使用。

输出可以直接插入数据库

数据库表结构

CREATE TABLE `http_info` (
  `url` varchar(255) NOT NULL,
  `server` varchar(255) NOT NULL DEFAULT '',
  `soft` varchar(255) NOT NULL DEFAULT '',
  `tag` varchar(255) NOT NULL DEFAULT '',
  `lastcheck` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`url`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

例子输出

./http_info http://202.38.64.8
"http://202.38.64.8" "Apache-Coyote/1.1" "" "java"
./http_info https://114.214.166.119
"https://114.214.166.119" "Apache/2.2.15 (CentOS)" "PHP/5.3.3" "php"
./http_info -s https://114.214.166.119
replace into http_info (url,server,soft,tag,lastcheck) values("https://114.214.166.119","Apache/2.2.15 (CentOS)","PHP/5.3.3","php",now());

我的使用

  • 为避免扫描对核心交换机的冲击,预先生成近10分钟在线的IP,文件为 ustcip.txt
  • 使用masscan得到开放80,8080,443端口的IP,文件为web.txt
masscan -p 80,8080,443 -iL ustcip.txt --wait 2 --max-rate 2000 -oL web.txt --excludefile exclude.txt
  • 使用http_info获取服务器信息
opt="-d"
grep "open tcp" web.txt |while read a b port ip; do
	echo $ip $port
	if [ $port == 443 ]; then
        	./http_info $opt https://$ip
	elif [ $port == 80 ]; then
        	./http_info $opt http://$ip
	else
        	./http_info $opt http://$ip:$port
	fi
done

http_info's People

Contributors

bg6cq avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.