摘要: func getFileMD5(fileName string) string { cmd := exec.Command("cmd", "/C", "CertUtil", "-hashfile", fileName, "MD5|findstr", "/V", ":") out, _ := cmd. 阅读全文
posted @ 2019-09-22 12:27 sherlock-merlin 阅读(388) 评论(0) 推荐(0)
摘要: 感谢老外的这个项目:https://github.com/WOA-Project/WOA-Deployer-Rpi 还有这个:https://uupdump.ml/ 首先从https://uupdump.ml网站下载合适的windows 10 arm镜像,点击下载后得到一个zip压缩包,压缩包名类似 阅读全文
posted @ 2019-07-23 16:49 sherlock-merlin 阅读(4024) 评论(0) 推荐(0)
摘要: IOCTL_DISK_GET_DRIVE_GEOMETRY: 获取磁盘参数 c++实现: golang实现: 阅读全文
posted @ 2019-06-26 16:03 sherlock-merlin 阅读(1752) 评论(1) 推荐(0)
摘要: 将u盘量产为CDROM后,刷入ISO后需要重新插拔u盘才能访问新内容。此文展示的代码可以实现模拟这种行为,免插拔使windows重新读取cdrom。 网上参考资料有限,自行试验了很多种方法,终于成功了。 首先调用DeviceIoControl卸载设备。然后用CM_Disable_DevNode禁用设 阅读全文
posted @ 2019-06-21 18:45 sherlock-merlin 阅读(1140) 评论(2) 推荐(0)
摘要: 大概原理: 略略略。。。 参考链接: stackoverflow.com 阅读全文
posted @ 2019-06-11 12:21 sherlock-merlin 阅读(812) 评论(0) 推荐(0)
摘要: 调用方法: 参考链接: https://stackoverflow.com/questions/2181525/is-there-an-api-call-to-start-a-scan-for-hardware-devices 阅读全文
posted @ 2019-05-26 10:32 sherlock-merlin 阅读(934) 评论(0) 推荐(0)
摘要: 知识点: cmd函数如何使用 cmd的函数怎么跳出循环 cmd for循环使用方法 cmd怎么创建带参数的函数 cmd怎么得到函数返回值 7zip命令行使用方法 阅读全文
posted @ 2019-05-17 13:47 sherlock-merlin 阅读(767) 评论(0) 推荐(0)
摘要: package main import ( "database/sql" "fmt" "log" "os" "syscall" "unsafe" sqlite3 "github.com/ccpaging/go-sqlite3-windll" ) const ( CRYPTPROTECT_UI_FOR 阅读全文
posted @ 2019-05-16 10:10 sherlock-merlin 阅读(553) 评论(0) 推荐(0)
摘要: 这里需要用到cfgmgr32.h,参考了网上好几篇博文。 网上的文章基本上没提到要引入lib,我用VS2010测试会报错,提示“...error LNK2019: 无法解析的外部符号 __imp__CM_Reenumerate_DevNode@8...”、“...error LNK2019: 无法解 阅读全文
posted @ 2019-04-29 23:27 sherlock-merlin 阅读(2057) 评论(0) 推荐(0)
摘要: 磁盘的句柄可以用CreateFile函数获得。获得句柄后,就可以配合其他函数对磁盘进行一些操作。 阅读全文
posted @ 2019-04-29 18:22 sherlock-merlin 阅读(831) 评论(0) 推荐(0)
摘要: package main import ( "fmt" "syscall" "github.com/lxn/win") func main() { SetConsoleTitle("golang hwnd test") hwnd := FindWindow("golang hwnd test") } 阅读全文
posted @ 2019-04-29 09:08 sherlock-merlin 阅读(1947) 评论(0) 推荐(0)
摘要: 直接展示代码 func md5sum(filepath string) (string, error) { f, err := os.Open(filepath) if err != nil { str1 := "Open err" return str1, err } defer f.Close( 阅读全文
posted @ 2019-02-25 16:37 sherlock-merlin 阅读(2076) 评论(0) 推荐(0)
摘要: 20190318更新,此方法不适于慧荣主控的u盘。 阅读全文
posted @ 2018-12-29 18:56 sherlock-merlin 阅读(1948) 评论(0) 推荐(0)
摘要: package main import ( "fmt" "os" "bufio" "io" "time" ) func main() { file, err := os.Open("test.txt") defer file.Close() if nil == err { buff := bufio 阅读全文
posted @ 2018-12-25 17:16 sherlock-merlin 阅读(781) 评论(0) 推荐(0)
摘要: 1、set ENABLECGO=1 2、go build 阅读全文
posted @ 2018-12-13 18:15 sherlock-merlin 阅读(706) 评论(0) 推荐(0)
摘要: 服务器端的chromedriver.exe启动时添加相关启动参数 chromedriver.exe --whitelisted-ips 或者 chromedriver.exe --whitelisted-ips=192.168.99.20:9515 前者接受所有连接,后者接受指定ip连接,推荐后者 阅读全文
posted @ 2018-12-13 17:57 sherlock-merlin 阅读(2752) 评论(0) 推荐(0)
摘要: package main import "crypto/rc4" import "fmt" func main() { key := []byte("我是密钥") c, _ := rc4.NewCipher(key) src := []byte("这是没有加密前的文本") fmt.Println(s 阅读全文
posted @ 2018-12-04 17:34 sherlock-merlin 阅读(1310) 评论(0) 推荐(0)
摘要: province = '湖南' driver.find_element_by_xpath('//span[contains(text(),"'+province+'").click() 不知道为啥,要双引号里面包括单引号(顺序应该可以替换,取决于上一层是但还是双),再用两个加号括住变量名...网上搜 阅读全文
posted @ 2018-11-29 11:20 sherlock-merlin 阅读(1728) 评论(1) 推荐(0)
摘要: LD_PRELOAD=/lib64/libc-2.12.so ln -s /lib64/libc-2.12.so /lib64/libc.so.6 ssh尚未断开的话可以直接这样操作,断开之后可以用livecd修复。。 阅读全文
posted @ 2018-11-07 18:42 sherlock-merlin 阅读(516) 评论(0) 推荐(0)
摘要: 默认情况下,postgresql是只允许localhost连接的,如果需要使用远程连接,需要修改两个配置文件。 postgresql.conf 和 pg_hba.conf 在postgresql.conf找到 #listen_addresses = 'localhost' ,取消前面的注释符号#,并 阅读全文
posted @ 2018-11-02 17:49 sherlock-merlin 阅读(775) 评论(0) 推荐(0)