01 2013 档案
摘要:#include <stdio.h>int main(){ int n = 0x22445566; int b = ((n & 0x000000ff) << 24)|((n & 0x0000ff00) << 8) | ((n & 0x00ff0000) >> 8) | ((n &0xff000000) >> 24); printf("n = %X\nb = %X\n", n, b);}
阅读全文
摘要:#!/usr/bin/perl -wuse strict;use Date::Calc;use Calendar::Calendar qw(calendar);use Term::ANSIColor::Print;my ($year, $month, $day) = split(/\//, shift);my $cal = calendar($month, $year);my $string = Term::ANSIColor::Print->new(output => 'return', eol => '', );my $new_day =
阅读全文
摘要:nginx:一个master 多个workerresin:自动检测 ok.html是否存在,不存在就重启: 此重启是 原resin进程不会重启,重启的是nginx产生的线程ps -eLfroot 27231 1689 27590 0 74 18:57 ? 00:00:00 /data/web/jdk/bin/java -Dfile.encoding=UTF-8 -server -Xms8000M -Xmx8000M -Xmn5000M -Xss256K -XX:ThreadStackSize=256 -XX:StackShadowPages=8 -verbosegc -XX:+P...
阅读全文
摘要:#!/usr/bin/perl -wuse strict;use YAML::XS;my %hash;my %new;@hash{'a' .. 'm'} = 1 .. 13;@new{ 'n' .. 'z' } = 14 .. 26;print "Before change\n";map{ print "$_ => $hash{$_}\n"} sort keys %hash;@hash{ keys %new } = values %new;print "After chang
阅读全文
摘要:http 以及 https1.firefox浏览器2.利用HttpFox插件,抓取登录包3.分析包中的 header、post都有哪些内容4.利用perl 的 LWP::Usergent、HTTP::Cookies等开源包,模拟登录5.对于Https的网页,需要将cookies里面相关的内容放入post,所以还要分析cookies。
阅读全文
摘要:#!/usr/bin/perl -wuse strict;my %hash = ( a => 3, b => 1, c => 4);map{ print "$_ => $hash{$_}\n"} sort{ $hash{$b} <=> $hash{$a} } keys %hash;
阅读全文
浙公网安备 33010602011771号