1
Lucups 2014-05-13 02:24:43 +08:00
echo 00:16:3E:00:26:03 | md5sum
-------------------------------------------- C:\Users\Tony>echo 00:16:3E:00:26:03 | md5sum 5a2d8a05ff16a61a0cf6016a3ecfeb24 *- |
2
Lucups 2014-05-13 02:31:02 +08:00
刚忘了去换行
C:\Users\Tony>echo -n 00:16:3E:00:26:03 | md5sum f1a7ccb1786c32014764bdaea52a3db2 *- |
3
vibbow 2014-05-13 02:58:45 +08:00
感觉PHP应该不会在这种小问题上出错
那就检查你的linux命令吧,比如说有没有把空格,换行符,制表符,控制字符等等的过滤掉。 |
4
jkeylu 2014-05-13 08:55:04 +08:00
cygwin
➜ ~ echo 00:16:3E:00:26:03 | md5sum 1fd7443862fd8bf1767ac36e6fa1e254 *- ➜ ~ echo -n 00:16:3E:00:26:03 | md5sum 3fa425802eec449ad345bbe54998c61b *- |
5
sarices 2014-05-13 09:00:01 +08:00
[root@ppp133 public]# echo -n 00:16:3E:00:26:03 | md5sum
3fa425802eec449ad345bbe54998c61b - |
6
xhat OP |
7
yangg 2014-05-13 09:35:44 +08:00 1
ifconfig eth0 | sed -n '/HWaddr/ s/^.*HWaddr *//pg' | cat -A
|
9
walleL 2014-05-13 10:40:18 +08:00 1
`ifconfig eth0 | sed -n '/HWaddr/ s/^.*HWaddr *//pg' | tr -d ' \n' | md5sum`
去掉空格跟换行 |
10
xhat OP |
13
37661713 2020-01-02 17:35:33 +08:00
echo -n 和 php 中的 md5 一样 亲测
|