工作中进制的转换问题
1. 你还用windows calc.exe???
OH! My God! 千万别用了,太不优雅了。
2 优雅的Linux命令行 “bc“
不解释,看这里:
bc –help
XXXXX@XXXX:~/code/shellcode/03_reverse_tcp_shell_with_password$ bc --help
usage: bc [options] [file ...]
-h --help print this usage and exit
-i --interactive force interactive mode
-l --mathlib use the predefined math routines
-q --quiet don't print initial banner
-s --standard non-standard bc constructs are errors
-w --warn warn about non-standard bc constructs
-v --version print version information and exit
十进制转十六进制
river@RiverPc:~/code/shellcode/03_reverse_tcp_shell_with_password$ bc
bc 1.06.95
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
ibase=10
obase=16
41
29
ibase设置输入的进制形式,obase设置输出的进制形式
其他一些转换
obase
10
ibase
A
ibase=16
obase=2
AAA
101010101010
ibase=8
obase=10
123
123
88
77
直接输入ibase查看当前的输入进制状态,obase查看输出的进制状态。