随笔分类 -  Perl

perl6正则 6: 大小写/空白/匹配所有符合
摘要:这个 :g 只能写在外面 m:g /re/ 阅读全文

posted @ 2017-09-10 05:43 Perl6 阅读(735) 评论(0) 推荐(0)

perl6正则 5: [ ] / | / ||
摘要:也就是可以把多种要匹配的写进[ ] 中, 第种用 | 分开就行了。 | 与 || 有差别 |的话, 当匹配位置 相同时, 会取最长的, 而 || , 当前面的匹配成功, 后面的就不会再去匹配。 注意 [] 跟 <[]> 是不同的: 阅读全文

posted @ 2017-09-10 05:23 Perl6 阅读(384) 评论(0) 推荐(0)

perl6 struct2-045 EXP
摘要:测试站点: http://www.yutian.com.cn/index.action http://www.hjxzyzz.com:8088/pfw/login.action 代码如下: POC如下(也就是上面代码的 data.txt 文件内容): 注意这个POC是一整串字符串, 没有换行的, 如 阅读全文

posted @ 2017-07-08 23:26 Perl6 阅读(329) 评论(0) 推荐(0)

perl6 单线程破解phpmyadmin脚本
摘要:运行效果如下所示: 这个 X 操作符实在太方便了。 里面的phpmyadmin改成你要破解的地址 username.txt / password.txt 改成你要的字典就行。 阅读全文

posted @ 2017-07-07 11:48 Perl6 阅读(320) 评论(0) 推荐(0)

perl6 HTTP::UserAgent发送post
摘要:use HTTP::UserAgent; my $ua = HTTP::UserAgent.new; say 'All method:'; say $ua.^methods; my %data = :cmd('whoami'); my $result = $ua.post('http://localhost/1.php', %data); say $result.content; 阅读全文

posted @ 2017-05-27 03:04 Perl6 阅读(259) 评论(0) 推荐(0)

perl6中的hash定义(1)
摘要:my %hash = (1,2,3,4); say %hash; my %hash2 = (a => 1, b => 2); say %hash2; my %hash3 = (:name('root'), :host('localost')); say %hash3; 阅读全文

posted @ 2017-05-17 05:22 Perl6 阅读(198) 评论(0) 推荐(0)

perl 复制exe文件的简单方法
摘要:use warnings; use strict; open EXE, "cmd.exe" or die "Can not open cmd.exe:$!\n"; open EXEBACK, '>', 'c.exe' or die "Can not open c.exe:$!\n"; binmode(EXE); binmode(EXEBACK); while(){ print EX... 阅读全文

posted @ 2017-05-04 20:50 Perl6 阅读(343) 评论(0) 推荐(0)

perl中设置POST登录时的重定向
摘要:默认地, perl提交post登录时是不会重定向的 要让它重定向, 可以用如下方法: 阅读全文

posted @ 2017-04-14 04:57 Perl6 阅读(232) 评论(0) 推荐(0)

perl HTML::HeadParser获取html头部信息
摘要:1 use LWP::Simple; 2 use HTML::HeadParser; 3 use utf8; 4 binmode(STDOUT, ":encoding(gbk)"); #设置win下输出中文 5 6 $result = get('http://www.baidu.com'); 7 $what = HTML::HeadParser->new; 8 $what->p... 阅读全文

posted @ 2017-03-12 03:10 Perl6 阅读(324) 评论(0) 推荐(0)

perl HTML::LinkExtor模块(2)
摘要:当然, 你还可以加一下正则, 去掉不是http://开头的也行 阅读全文

posted @ 2017-03-12 02:51 Perl6 阅读(645) 评论(0) 推荐(0)

perl HTML::LinkExtor模块(1)
摘要:这个代码打印页面中的所有标签名与对应的link链接地址 如果我们要打印其中的所有img地址呢,那我们可能用$tag来判断是哪种标签, 从而再进一步提取数据 具体可以看这里: perl HTML::LinkExtor模块(2) 阅读全文

posted @ 2017-03-12 02:42 Perl6 阅读(252) 评论(0) 推荐(0)

perl模拟登录(1)
摘要:1 use WWW::Mechanize; 2 3 my $ua = WWW::Mechanize->new(); 4 $ua->post('http://localhost/dvwa/DVWA-master/login.php'); 5 #登录网址 6 $ua->form_number(1); 7 #表单编号, 也可用$ua->form_name(form_name); 8 ... 阅读全文

posted @ 2017-03-08 03:50 Perl6 阅读(333) 评论(0) 推荐(0)

perl中的lock
摘要:1 #!/usr/bin/env perl -w 2 use strict; 3 use threads; 4 use threads::shared; 5 6 my $count:shared = 1; 7 print "count的起始值为:$count\n"; 8 sub th_lock{ 9 $count++; 10 print "已把... 阅读全文

posted @ 2017-02-27 00:03 Perl6 阅读(409) 评论(0) 推荐(0)

多线程中的变量共享
摘要:1 use threads; 2 use threads::shared; 3 my $count:shared = 1; 4 print "主线程中count为:$count\n"; 5 6 sub thread1{ 7 print "线程1增加1\n"; 8 $count++; 9 print "在线程1中结果为:$coun... 阅读全文

posted @ 2017-02-26 23:34 Perl6 阅读(1138) 评论(0) 推荐(0)

perl发送post数据
摘要:把post数据写进一个匿名数组里就行 或 或 如果用最后一个方法, 记得要带有content_type头才行 阅读全文

posted @ 2017-02-26 22:25 Perl6 阅读(1237) 评论(0) 推荐(0)

Mojo_1_第一个简单例子
摘要:可以这样运行: morbo script.pl 阅读全文

posted @ 2017-02-26 09:08 Perl6 阅读(304) 评论(0) 推荐(0)

第一章: 文件句柄转化为 typeglob/glob 与文件句柄检测
摘要:1 #为了使在子例程中传递文件句柄不出问题 2 #我们要把文件句柄转为glob或typeglob 3 4 5 #转为glob 6 $fd = *MY_FILE; 7 8 #转为typeblog 9 $fd = \*MY_FILE; 10 11 #两种形式都行, 但\*MY_FILE更安全, 一般都用这个形式 12 13 14 15 #传递给子程序 16 hello... 阅读全文

posted @ 2017-02-22 08:19 Perl6 阅读(252) 评论(0) 推荐(0)

第一章:设置无缓冲
摘要:1 #用select, 要先select一个句柄, 用完后记得select回原来的 2 open FILE, ">log.txt"; 3 select FILE; 4 $| = 1; 5 #$|为true时设置FILE为无缓冲 6 print FILE "The log file data"; 7 #print "The log file data"; 8 select STDO... 阅读全文

posted @ 2017-02-21 15:08 Perl6 阅读(265) 评论(0) 推荐(0)

perl输出重定向
摘要:先把A重定向到STDOUT, 之后的STDOUT不代表标准输出了 到最后用完了再恢复 阅读全文

posted @ 2017-02-21 14:47 Perl6 阅读(1981) 评论(0) 推荐(0)

一个基于时间注入的perl小脚本
摘要:关键是time获得时间 阅读全文

posted @ 2017-02-20 15:00 Perl6 阅读(846) 评论(7) 推荐(1)

导航