2. 检测开机时间 许多沙箱检测完毕后会重置系统,我们可以检测开机时间来判断是否为真实的运行状况。
()
| 56 | // 2. 检测开机时间 |
| 57 | // 许多沙箱检测完毕后会重置系统,我们可以检测开机时间来判断是否为真实的运行状况。 |
| 58 | func bootTime() (int, error) { |
| 59 | var kernel = syscall.NewLazyDLL("Kernel32.dll") |
| 60 | GetTickCount := kernel.NewProc("GetTickCount") |
| 61 | r, _, _ := GetTickCount.Call() |
| 62 | if r == 0 { |
| 63 | return 0, nil |
| 64 | } |
| 65 | ms := time.Duration(r * 1000 * 1000) |
| 66 | tm := time.Duration(30 * time.Minute) |
| 67 | //fmt.Println(ms,tm) |
| 68 | if ms < tm { |
| 69 | return 0, nil |
| 70 | } else { |
| 71 | return 1, nil |
| 72 | } |
| 73 | |
| 74 | } |
| 75 | // 3、物理内存大小 |
| 76 | func physicalMemory() (int, error) { |
| 77 | var mod = syscall.NewLazyDLL("kernel32.dll") |