Perl 当前离线
中尉
lllsoslll 当前离线
二级士官
open EXE,'C:\Windows\System32\clip.exe' or die $!; binmode EXE; while (<EXE>) { $_ =~ s/./sprintf("%02lx", ord $&)/egs; print; }复制代码
TOP
:: seehex.bat <file> @perl -x -S %~s0 %*&goto:eof #!perl open EXE,"@ARGV" or die $!; binmode EXE; while (<EXE>) { $_ =~ s/./sprintf("%02lx", ord $&)/egs; print; }复制代码
sxw (^_^)当前离线
少尉
#!/usr/bin/perl use strict; use warnings; open(FH,"<",'C:\Windows\System32\clip.exe') or die; my @a; my $buffer; while (read(FH,$buffer,16)) { @a=unpack("H*",$buffer);#@a中只有一个元素 print $a[0],"\n"; } close(FH);复制代码
open EXE,'C:\Windows\System32\clip.exe'; binmode EXE; while (<EXE>) { print &asc2hex($_); } sub asc2hex { ($s = shift) =~ s/./sprintf("%02lx ", ord $&)/egs; return $s; }复制代码
#!/usr/bin/perl use strict; use warnings; open(FH,"<",'C:\Windows\System32\clip.exe') or die; my $a; my $buffer; while (read(FH,$buffer,16)) { $a=unpack("H*",$buffer); $a=~s/../$& /g; print $a; } close(FH);复制代码
plp626 当前离线
贵宾
:: seehex.bat <file> @perl -x -S %~s0 %*&goto:eof #!perl open EXE,"@ARGV" or die "$!"; binmode EXE; while (<EXE>) { print &asc2hex($_); } sub asc2hex { ($s = shift) =~ s/./sprintf("%02lx", ord $&)/egs; return $s; }复制代码