通过截图恢复文件

2作者: ccnvms7 个月前原帖
这是一个关于我们如何从一台完全断网的远程虚拟机中恢复整个数据库的小故事,而我只能通过 noVNC 访问它。 基本上,我在一家糟糕的服务提供商的 VPS 上设置了一个服务,前几天,他们突然决定这台 VPS 将不再有互联网访问权限。 他们拒绝提供任何支持,只说“在网上搜索如何通过 noVNC 检索文件或重置机器的指南”。 如你所知,noVNC 不支持任何类型的文件共享,而该实例甚至没有启用剪贴板共享。 所以现在的环境是: 1. 没有互联网 2. 没有剪贴板/文件共享 3. 没有希望 我打电话给我的老朋友 K。今天是他的生日,虽然有点晚了,但一定要祝他生日快乐。 K 这个聪明的家伙记得我在这台 Windows VPS 上安装了 VS2022,于是他动手写了一个小程序,可以将文件转换成位图。 然后这个大男孩在他的电脑上截取这些位图的屏幕截图,并解码它们,验证文件哈希。 奇迹发生了,压缩文件完美解压,我们得到了心爱的数据库。 我送给 K 50 美元的 KFC 作为礼物。 谢谢你,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&#x27;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 &quot;Search a guide online on how to retrieve files from noVNC or reset machine&quot;. 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&#x27;s the environment: 1. No internet 2. No clipboard&#x2F;file sharing 3. No hopes<p>I call up my old friend we&#x27;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.