2017年2月19日

perl 在win下输出中文乱码问题

摘要: 1 use utf8; 2 my $name = '你好'; 3 binmode(STDOUT, ":encoding(gbk)"); 4 print $name,"\n"; 5 6 # #或 7 # use Encode; 8 # my $str='你好'; 9 # $str = encode("gbk", decode("utf-8", $str)); 10 # prin... 阅读全文

posted @ 2017-02-19 23:18 Perl6 阅读(1773) 评论(0) 推荐(0) 编辑

第一章:read/sysread/print/syswrite区别

摘要: 1 use strict; 2 use warnings; 3 4 5 #将读入的内容添加到原字符串后面 6 my $buffer='START:'; 7 my $byts = sysread(STDIN,$buffer, 10, length($buffer)); 8 #my $byts = read(STDIN,$buffer, 10, length($buffer));... 阅读全文

posted @ 2017-02-19 22:33 Perl6 阅读(521) 评论(0) 推荐(0) 编辑

第一章:获取服务器服务banner

摘要: 1 #!c:\\perl\\bin\\perl.exe 2 #读取服务器的首行(banner) 3 4 use IO::Socket; 5 6 my $service = '121.201.67.177:ssh'; 7 my $remove = IO::Socket::INET->new($service); 8 my $banner = ; 9 print $banner;#注意这个ban... 阅读全文

posted @ 2017-02-19 21:58 Perl6 阅读(1733) 评论(0) 推荐(0) 编辑

第一章:读取文件一行IO::File

摘要: 1 #!c:\\perl\\bin\\perl.exe 2 use IO::File; 3 #读取一行 4 my $fd = IO::File->new('perl.txt'); 5 my $one_line = ; 6 print $one_line; 7 $fd->close; 8 9 #写入数据 10 my $wfd = IO::File->new(">> readme... 阅读全文

posted @ 2017-02-19 21:44 Perl6 阅读(1139) 评论(0) 推荐(0) 编辑

2017年2月18日

测试一个注入小脚本

摘要: 主要是猜测当前数据库名称 阅读全文

posted @ 2017-02-18 07:39 Perl6 阅读(462) 评论(0) 推荐(0) 编辑

2017年2月17日

perl 列出一个目录下的文件的大小

摘要: 1 use strict; 2 use warnings; 3 use Cwd; 4 my $dir = 'd:\\www'; 5 chdir($dir); 6 opendir DIR, $dir or die "Cannot open dir:$!\n"; 7 my %result; 8 while(my $filename = readdir(DIR)){ 9 ne... 阅读全文

posted @ 2017-02-17 06:20 Perl6 阅读(1046) 评论(0) 推荐(0) 编辑

2017年2月16日

如何用CMD开启3389与查看3389端口

摘要: 开启 查端口 注意: Terminal与Server之间有且只有一个空格。双引号为英文的双引号 阅读全文

posted @ 2017-02-16 05:40 Perl6 阅读(22203) 评论(0) 推荐(1) 编辑

2016年12月22日

Debian搭建PPTPD

摘要: 先安装pptpd: 编辑 /etc/pptpd.conf 编辑 /etc/ppp/pptpd-options 添加账号密码;编辑/etc/ppp/chap-secrets,格式如下: 编辑/etc/sysctl.conf 使iptables修改生效 重启pptp iptables配置如下: 阅读全文

posted @ 2016-12-22 02:33 Perl6 阅读(1658) 评论(0) 推荐(0) 编辑

2016年12月20日

read/sysread区别

摘要: sysread使用无缓冲 read使用缓冲 阅读全文

posted @ 2016-12-20 01:52 Perl6 阅读(704) 评论(0) 推荐(0) 编辑

2016年12月12日

用perl发送数据到钓鱼站

摘要: 一个皮皮果的游戏很火 估计很多人想黑 偶然发现一个钓鱼站: http://ppgpergame.com/ 钓用户名与密码 抓包后发现数据会发送到: http://ppgpergame.com/db.asp保存 所以就有了下面的脚本: post数据大概是 XXXOOOO ni M类型, 不多说 阅读全文

posted @ 2016-12-12 02:36 Perl6 阅读(308) 评论(1) 推荐(0) 编辑

导航