亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

Chinaunix

標(biāo)題: perlsecret - Perl secret operators and constants [打印本頁(yè)]

作者: MMMIX    時(shí)間: 2015-09-20 09:41
標(biāo)題: perlsecret - Perl secret operators and constants
Perl secret operators:
OperatorNicknameFunction
0+Venusnumification
@{[ ]}Babycartlist interpolation
!!Bang bangboolean conversion
}{Eskimo greetingEND block for one-liners
~~Inchwormscalar
~-Inchworm on a stickhigh-precedence decrement
-~Inchworm on a stickhigh-precedence increment
-+-Space stationhigh-precedence numification
=( )=Goatsescalar / list context
=< >=~Flaming X-Wingmatch input, assign captures
~~<>Kitea single line of input
<<m=~m>> m ;Ornate double-bladed swordmultiline comment
-=!   -=!!Flatheadconditional decrement
+=!   +=!!Phillipsconditional increment
x=!   x=!!Pozidrivconditional reset to ''
*=!   *=!!Torxconditional reset to 0
,=>Winking fat commanon-stringifying fat comma
()x!!Enterpriseboolean list squash
0+!!Key to the truthnumeric boolean conversion
~~!!Serpent of truthnumeric boolean conversion
||()Abbott and Costelloremove false scalar from list
//()Leaning Abbott and Costelloremove undef from list


Perl secret constants:
ConstantNicknameValue
<=><=><=>Space fleet0
<~>Amphisbaena$ENV{HOME}


http://search.cpan.org/dist/perlsecret/lib/perlsecret.pod
作者: zhlong8    時(shí)間: 2015-09-20 13:57
這文檔有毒 =>
作者: MMMIX    時(shí)間: 2015-09-20 14:49
回復(fù) 2# zhlong8


    挺漲見(jiàn)識(shí)吧?

不過(guò)作者也說(shuō)了,這些東西自己娛樂(lè)沒(méi)問(wèn)題,但是正式代碼要用的話還是要謹(jǐn)慎。
作者: shijiang1130    時(shí)間: 2015-09-20 16:33
回復(fù) 3# MMMIX
讓我想起了昨晚看的
  1. #!/usr/local/bin/perl
  2. #
  3. # This is a partial implentation of the MD4 checksum code.
  4. #
  5. # NOTE
  6. #
  7. # The function &add() in this module is required as we need to be
  8. # able to add 32bit integers ignoring overflow.  The C code this is
  9. # based on does this because it uses the underlying hardware to
  10. # perform the required addition however we need to be more careful
  11. # as Perl will overflow an int and produce a result of 0xffffffff
  12. # which is not very useful.  The &add() function splits its arguments
  13. # into two shorts and adds these carrying overflow from the low short
  14. # to the high short and ignoring carry from the high short.  Not
  15. # exactly efficient, but it works and is fast enough for the purposes
  16. # of this implementation
  17. #

  18. package Authen::NTLM::MD4;

  19. use vars qw($VERSION @ISA @EXPORT);
  20. require Exporter;

  21. $VERSION = "1.02";
  22. @ISA = qw(Exporter);
  23. @EXPORT = qw(mdfour);

  24. my ($A, $B, $C, $D);
  25. my (@X, $M);

  26. sub mdfour
  27. {
  28.   my ($in) = @_;

  29.   my ($i, $pos);
  30.   my $len = length($in);
  31.   my $b = $len * 8;
  32.   $in .= "\0"x128;
  33.   $A = 0x67452301;
  34.   $B = 0xefcdab89;
  35.   $C = 0x98badcfe;
  36.   $D = 0x10325476;
  37.   $pos = 0;
  38.   while ($len > 64)
  39.   {
  40.     &copy64(substr($in, $pos, 64));
  41.     &mdfour64;
  42.     $pos += 64;
  43.     $len -= 64;
  44.   }
  45.   my $buf = substr($in, $pos, $len);
  46.   $buf .= sprintf "%c", 0x80;
  47.   if ($len <= 55)
  48.   {
  49.     $buf .= "\0"x(55-$len);
  50.     $buf .= pack("V", $b);
  51.     $buf .= "\0"x4;
  52.     &copy64($buf);
  53.     &mdfour64;
  54.   }
  55.   else
  56.   {
  57.     $buf .= "\0"x(120-$len);
  58.     $buf .= pack("V", $b);
  59.     $buf .= "\0"x4;
  60.     &copy64(substr($buf, 0, 64));
  61.     &mdfour64;
  62.     &copy64(substr($buf, 64, 64));
  63.     &mdfour64;
  64.   }
  65.   my $out = pack("VVVV", $A, $B, $C, $D);
  66.   return $out;
  67. }

  68. sub F
  69. {
  70.   my ($X, $Y, $Z) = @_;
  71.   my $res = ($X&$Y) | ((~$X)&$Z);
  72.   return $res;
  73. }

  74. sub G
  75. {
  76.   my ($X, $Y, $Z) = @_;

  77.   return ($X&$Y) | ($X&$Z) | ($Y&$Z);
  78. }

  79. sub H
  80. {
  81.   my ($X, $Y, $Z) = @_;

  82.   return $X^$Y^$Z;
  83. }

  84. sub lshift
  85. {
  86.   my ($x, $s) = @_;

  87.   $x &= 0xffffffff;
  88.   return (($x<<$s)&0xffffffff) | ($x>>(32-$s));
  89. }

  90. sub ROUND1
  91. {
  92.   my ($a, $b, $c, $d, $k, $s) = @_;
  93.   my $e = &add($a, &F($b, $c, $d), $X[$k]);
  94.   return &lshift($e, $s);
  95. }

  96. sub ROUND2
  97. {
  98.   my ($a, $b, $c, $d, $k, $s) = @_;

  99.   my $e = &add($a, &G($b, $c, $d), $X[$k], 0x5a827999);
  100.   return &lshift($e, $s);
  101. }

  102. sub ROUND3
  103. {
  104.   my ($a, $b, $c, $d, $k, $s) = @_;

  105.   my $e = &add($a, &H($b, $c, $d), $X[$k], 0x6ed9eba1);
  106.   return &lshift($e, $s);
  107. }

  108. sub mdfour64
  109. {
  110.   my ($i, $AA, $BB, $CC, $DD);
  111.   @X = unpack("N16", $M);
  112.   $AA = $A;
  113.   $BB = $B;
  114.   $CC = $C;
  115.   $DD = $D;

  116.   $A = &ROUND1($A,$B,$C,$D, 0, 3); $D = &ROUND1($D,$A,$B,$C, 1, 7);
  117.   $C = &ROUND1($C,$D,$A,$B, 2,11); $B = &ROUND1($B,$C,$D,$A, 3,19);
  118.   $A = &ROUND1($A,$B,$C,$D, 4, 3); $D = &ROUND1($D,$A,$B,$C, 5, 7);
  119.   $C = &ROUND1($C,$D,$A,$B, 6,11); $B = &ROUND1($B,$C,$D,$A, 7,19);
  120.   $A = &ROUND1($A,$B,$C,$D, 8, 3); $D = &ROUND1($D,$A,$B,$C, 9, 7);
  121.   $C = &ROUND1($C,$D,$A,$B,10,11); $B = &ROUND1($B,$C,$D,$A,11,19);
  122.   $A = &ROUND1($A,$B,$C,$D,12, 3); $D = &ROUND1($D,$A,$B,$C,13, 7);
  123.   $C = &ROUND1($C,$D,$A,$B,14,11); $B = &ROUND1($B,$C,$D,$A,15,19);

  124.   $A = &ROUND2($A,$B,$C,$D, 0, 3); $D = &ROUND2($D,$A,$B,$C, 4, 5);
  125.   $C = &ROUND2($C,$D,$A,$B, 8, 9); $B = &ROUND2($B,$C,$D,$A,12,13);
  126.   $A = &ROUND2($A,$B,$C,$D, 1, 3); $D = &ROUND2($D,$A,$B,$C, 5, 5);
  127.   $C = &ROUND2($C,$D,$A,$B, 9, 9); $B = &ROUND2($B,$C,$D,$A,13,13);
  128.   $A = &ROUND2($A,$B,$C,$D, 2, 3); $D = &ROUND2($D,$A,$B,$C, 6, 5);
  129.   $C = &ROUND2($C,$D,$A,$B,10, 9); $B = &ROUND2($B,$C,$D,$A,14,13);
  130.   $A = &ROUND2($A,$B,$C,$D, 3, 3); $D = &ROUND2($D,$A,$B,$C, 7, 5);
  131.   $C = &ROUND2($C,$D,$A,$B,11, 9); $B = &ROUND2($B,$C,$D,$A,15,13);

  132.   $A = &ROUND3($A,$B,$C,$D, 0, 3); $D = &ROUND3($D,$A,$B,$C, 8, 9);
  133.   $C = &ROUND3($C,$D,$A,$B, 4,11); $B = &ROUND3($B,$C,$D,$A,12,15);
  134.   $A = &ROUND3($A,$B,$C,$D, 2, 3); $D = &ROUND3($D,$A,$B,$C,10, 9);
  135.   $C = &ROUND3($C,$D,$A,$B, 6,11); $B = &ROUND3($B,$C,$D,$A,14,15);
  136.   $A = &ROUND3($A,$B,$C,$D, 1, 3); $D = &ROUND3($D,$A,$B,$C, 9, 9);
  137.   $C = &ROUND3($C,$D,$A,$B, 5,11); $B = &ROUND3($B,$C,$D,$A,13,15);
  138.   $A = &ROUND3($A,$B,$C,$D, 3, 3); $D = &ROUND3($D,$A,$B,$C,11, 9);
  139.   $C = &ROUND3($C,$D,$A,$B, 7,11); $B = &ROUND3($B,$C,$D,$A,15,15);

  140.   $A = &add($A, $AA); $B = &add($B, $BB);
  141.   $C = &add($C, $CC); $D = &add($D, $DD);
  142.   $A &= 0xffffffff; $B &= 0xffffffff;
  143.   $C &= 0xffffffff; $D &= 0xffffffff;
  144.   map {$_ = 0} @X;
  145. }

  146. sub copy64
  147. {
  148.   my ($in) = @_;

  149.   $M = pack("V16", unpack("N16", $in));
  150. }

  151. # see note at top of this file about this function
  152. sub add
  153. {
  154.   my (@nums) = @_;
  155.   my ($r_low, $r_high, $n_low, $l_high);
  156.   my $num;
  157.   $r_low = $r_high = 0;
  158.   foreach $num (@nums)
  159.   {
  160.     $n_low = $num & 0xffff;
  161.     $n_high = ($num&0xffff0000)>>16;
  162.     $r_low += $n_low;
  163.     ($r_low&0xf0000) && $r_high++;
  164.     $r_low &= 0xffff;
  165.     $r_high += $n_high;
  166.     $r_high &= 0xffff;
  167.   }
  168.   return ($r_high<<16)|$r_low;
  169. }

  170. 1;
復(fù)制代碼

作者: MMMIX    時(shí)間: 2015-09-20 17:41
本帖最后由 MMMIX 于 2015-09-20 17:42 編輯

回復(fù) 4# shijiang1130


    那再看看這個(gè):https://metacpan.org/source/Digest::Perl::MD4
作者: ttcn_cu    時(shí)間: 2015-09-21 10:08
除了venus 和goatse以外似乎很少用到
作者: Okelani    時(shí)間: 2015-09-22 14:57
漲 見(jiàn) 識(shí) 了 .




歡迎光臨 Chinaunix (http://72891.cn/) Powered by Discuz! X3.2