perl6检测网站CMS脚本
2021-06-30 00:04
标签:结构 mtd bsp upd level -- 系统 用法 exit 代码如下: 使用前请安装好 perl6 再用zef安装好所用的模块: 效果如下: 一般来说, 查不到CMS或服务器系统信息, 就返回未知(Unknown) 有时没法转换JSON时会出错, 下次有时间再改版一下。 perl6检测网站CMS脚本 标签:结构 mtd bsp upd level -- 系统 用法 exit 原文地址:http://www.cnblogs.com/perl6/p/7139930.htmluse HTTP::UserAgent;
use JSON::Tiny;
my $check-url = ‘www.baidu.com‘;
#say @*ARGS[0];
#检测命令行参数
if @*ARGS != 0 {
$check-url = @*ARGS[0].lc;
}else{
say ‘no http/https, eg:‘;
say ‘cms-check.p6 www.target.com‘;
exit;
}
my $url = ‘http://120.24.44.134/yunxi-web/public/home/index‘;
#say $check-url;
#cookies
my $cookie = HTTP::Cookies.new;
#创建 一个Ie
my $ua =HTTP::UserAgent.new;
$cookie.set-cookie(‘Set-Cookie:XSRF-TOKEN=eyJpdiI6ImQyNWhPQjVcL2YyeTEzTnFiaUZXbUJRPT0iLCJ2YWx1ZSI6ImMxTzM5SDVrQldJVmF0NVduTEhsSXZEd2xZV05lZ2VOM2NueXhYdjM3RkhHNm1md3ZPYkpkeUxvdVlwSzg2Rk5pMkFVcEhVWWdQYjJDVmhqeFdsaXlRPT0iLCJtYWMiOiJkODU1NjUzM2Q1NzgwN2RhYTBhZDI3MTdmYTZiNDFhNzYwMDg5MmFlZDA0MWUyNWEyNmZjYjZhNmE3MGIyMjZhIn0%3D;
laravel_session=eyJpdiI6ImFSeGFmSWZBTXZseTdvNDFLVFVxdEE9PSIsInZhbHVlIjoiWGl5TDFRcTZydWJjVzlleUxRM1N4RUlReUVQdDZVTnNZMjNXb0FtWDE3azFuTkFRSXVNYVNzMit3dWdJaDcxSk95T0VEcjBDZVFoY1lVR0NURnBwUEE9PSIsIm1hYyI6ImEwNjM3OGVjZGUzYTk4ODY4NzJhMjg0ZTAzZDYwMGYwYTU2YzhjYzZmMmJjNTZiMTdmMDIyMmJkNzc0NDI4NTgifQ%3D%3D‘);
#request
my $request = HTTP::Request.new;
$request.header.field(:X-Requested-With
zef install HTTP::UserAgent --force;
zef install JSON::Tiny --force;