Initial commit: LAN RDP with keylogger support
This commit is contained in:
commit
c4adcbbe0f
33 files changed
+4335
No files matched your search
Executable
+37
@@ -0,0 +1,37 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
|
||||
"lanrdp/internal/tlsutil"
|
||||
)
|
||||
|
||||
// printKnownDevices lists every device this client has trusted, for
|
||||
// managing multiple hosts (a family's several devices, say) sharing one
|
||||
// known_hosts.json.
|
||||
func printKnownDevices(ts *tlsutil.TrustStore) {
|
||||
all := ts.All()
|
||||
if len(all) == 0 {
|
||||
fmt.Println("No trusted devices yet.")
|
||||
return
|
||||
}
|
||||
|
||||
fingerprints := make([]string, 0, len(all))
|
||||
for fp := range all {
|
||||
fingerprints = append(fingerprints, fp)
|
||||
}
|
||||
sort.Slice(fingerprints, func(i, j int) bool {
|
||||
return all[fingerprints[i]].Label < all[fingerprints[j]].Label
|
||||
})
|
||||
|
||||
fmt.Printf("%d trusted device(s):\n\n", len(fingerprints))
|
||||
for _, fp := range fingerprints {
|
||||
d := all[fp]
|
||||
fmt.Printf(" %s\n", d.Label)
|
||||
fmt.Printf(" fingerprint: %s\n", fp)
|
||||
fmt.Printf(" first seen: %s\n", d.FirstSeen.Local().Format("2006-01-02 15:04:05"))
|
||||
fmt.Printf(" last seen: %s\n", d.LastSeen.Local().Format("2006-01-02 15:04:05"))
|
||||
fmt.Println()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user