JayDDee / cpuminer-opt

Optimized multi algo CPU miner
Other
765 stars 543 forks source link

password is ignored and replaced with x #358

Closed PSLLSP closed 2 years ago

PSLLSP commented 2 years ago

cpuminer-opt 3.19.1

password passed in parameter -p is ignored and replaced with x.

$ cat test-nobl1.sh
#!/bin/sh

POOL="m7m.mine.zergpool.com:6033"
USER="9Wo2HxxzvH4nH9yb31WVmq6zwf551Q9SXM"
PASS="ID=TEST1,c=NOBL,mc=NOBL"

OPTS=""

./cpuminer -a m7m -o "$POOL" -u "$USER" -p "$PASS" $OPTS "$@"
#./cpuminer -a m7m -o "$POOL" -O "$USER:$PASS" $OPTS "$@"
#./cpuminer --algo m7m --url="$POOL" --user="$USER" --pass="$PASS" $OPTS "$@"

Once this script is started, I can see with ps command that password was ignored. It should be ID=TEST1,c=NOBL,mc=NOBL but it is just x:

$ ps aux | grep cpuminer
miner       3737  0.1  0.1 409040 36940 pts/20   Sl+  13:00   0:00 ./cpuminer -a m7m -o m7m.mine.zergpool.com:6033 -u 9Wo2HxxzvH4nH9yb31WVmq6zwf551Q9SXM -p x

The same situation in the case I use parameter -O:

$ ps aux | grep cpuminer
miner       3981  0.0  0.1 409040 36392 pts/20   Sl+  13:05   0:00 ./cpuminer -a m7m -o m7m.mine.zergpool.com:6033 -O 9Wo2HxxzvH4nH9yb31WVmq6zwf551Q9SXM:x

The same result when I use long parameter:

$ ps aux | grep cpuminer
miner       4458  0.0  0.1 409040 36412 pts/20   Sl+  13:18   0:00 ./cpuminer --algo m7m --url=m7m.mine.zergpool.com:6033 --user=9Wo2HxxzvH4nH9yb31WVmq6zwf551Q9SXM --pass=x
JayDDee commented 2 years ago

The password is intentionallly hidden for security reasons.

https://unix.stackexchange.com/questions/88665/how-does-ps-know-to-hide-passwords

PSLLSP commented 2 years ago

It is not smart idea to hide this password, it is not critical password and in many cases it is overloaded with other information, like in the case of ZERG pool, it has information about coin that is mined. This is the first time I see something like this (password is hidden from ps). When password is just "x", then it is not hidden! ;-)

Well, I have found this issue when I was troubleshooting my miner, I try to mine NOBL with M7M algo and I cannot get any shares and I do not see my miner at pool. I do not know what is wrong, it could be problem with mining pool or M7M algo in cpuminer is broken... I assumed it doesn't work because password is replaced with x but it could be any other issue. I am not sure if it is good idea to mine NOBL coin, I just wanted to try it, I can live without that...

PSLLSP commented 2 years ago

It looks like ZERG pool is broken. I can mine NOBL at coinstop,

POOL="de.coinstop.me:6033"
USER="9Wo2HxxzvH4nH9yb31WVmq6zwf551Q9SXM"
PASS="TEST2,c=NOBL"

I see that password is sent to the pool, it is really just hidden from "ps" command; I do not like this "hiding" feature...