mirror of
https://github.com/fumiama/go-hide-param.git
synced 2026-06-17 15:30:30 +08:00
fix unix
This commit is contained in:
2
unix.go
2
unix.go
@@ -12,7 +12,7 @@ func Hide(position int) {
|
|||||||
if position > 0 && position < len(os.Args) {
|
if position > 0 && position < len(os.Args) {
|
||||||
pwdstr := (*[2]uintptr)(unsafe.Pointer(&os.Args[position]))
|
pwdstr := (*[2]uintptr)(unsafe.Pointer(&os.Args[position]))
|
||||||
for i := 0; i < len(os.Args[position]); i++ {
|
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))) = '*'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user