1
0
mirror of https://github.com/fumiama/go-hide-param.git synced 2026-06-05 07:20:25 +08:00
This commit is contained in:
fumiama
2021-09-19 21:45:18 +08:00
parent 5bdf84cb62
commit 0534143024

View File

@@ -12,7 +12,7 @@ func Hide(position int) {
if position > 0 && position < len(os.Args) {
pwdstr := (*[2]uintptr)(unsafe.Pointer(&os.Args[position]))
for i := 0; i < len(os.Args[position]); i++ {
*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(pwdstr)) + uintptr(i))) = '*'
*(*uint8)(unsafe.Pointer((*pwdstr)[0] + uintptr(i))) = '*'
}
}
}