通过截图恢复文件
2 分•作者: ccnvms•5 个月前
这是一个关于我们如何从一个完全断网的远程虚拟机中恢复整个数据库的小故事,而我只能通过 noVNC 访问它。
简单来说,我在某个糟糕的服务提供商的 VPS 上设置了一项服务,然后有一天,他们突然决定该 VPS 将不再有互联网访问权限。
除了“在网上搜索关于如何从 noVNC 检索文件或重置机器的指南”之外,他们拒绝提供任何类型的支持。
你可能知道,noVNC 不支持任何类型的文件共享,而且这个特定实例甚至没有启用剪贴板共享。
所以现在环境是这样的:
1. 没有互联网
2. 没有剪贴板/文件共享
3. 没有希望
我打电话给我的老朋友,我们称他为 K。今天是他的生日,所以即使有点晚了,也要祝他生日快乐。
K 用他那聪明的大脑记得我在这个 Windows VPS 上安装了 vs2022,于是他开始动动他小小的手指,编写了一个小程序,可以将文件转换为位图。
然后,这位“大佬”截取了这些位图的屏幕截图,并在他的电脑上解码它们,验证文件哈希。
奇迹发生了,存档完美解压,我们得到了我们心爱的数据库。
我给了 K 50 美元的肯德基作为礼物。
谢谢 K。
查看原文
This is a small story of how we managed to recover a whole database from a completely internet disconnected remote vm which I could only access through noVNC.<p>Basically I had a service setup on a particular bad provider's VPS, and the other day, out of nowhere, they decided that said VPS would no longer have internet access.<p>They refused to give any type of support besides "Search a guide online on how to retrieve files from noVNC or reset machine".
As you may know, noVNC does not support any type of file sharing, and the specific instance did not even have clipboard sharing enabled.<p>So now here's the environment:
1. No internet
2. No clipboard/file sharing
3. No hopes<p>I call up my old friend we're gonna call K. It was his birthday so make sure to wish him a happy birthday even though a bit late.<p>K with his big brain remembers that I had vs2022 installed on this windows VPS, so he gets his lil fingers going and types out a small program that would take a file and convert it into a bitmap.<p>Now big boy takes screenshots of these bitmaps and decodes them on his PC, verifying file hashes.<p>Miracle happens, archive unzips perfectly and we get our beloved DB.<p>I got 50 bucks in KFC to K as a gift.<p>Thanks K.