首页 \ 问答 \ 更改作为映像安装的Windows系统的主机名/ IP地址(Changing Hostname / IP Address of Windows System Mounted as an Image)

更改作为映像安装的Windows系统的主机名/ IP地址(Changing Hostname / IP Address of Windows System Mounted as an Image)

我正在寻找一种方法来更改通过Linux系统上的环回映像挂载的Windows XP系统的主机名和IP地址。 所以基本上我可以在文件级别访问Windows XP系统,但我无法在其上执行任何程序。 类似于在Linux下编辑/ etc / hostname和任何网络配置文件的方法。

到目前为止我找到的唯一方法包括在启动后运行工具,例如MS sysprep或使用像Acronis Snap Deploy这样的解决方案。


I'm looking for a way to change the hostname and IP address of a Windows XP system that is mounted via a loop-back image on a Linux system. So basically I have access to the Windows XP system on a file level, but I cannot execute any programs on it. A way similar to editing the /etc/hostname and whatever network configuration file under Linux.

The only ways I've found so far would include running a tool after boot, e.g. MS sysprep or use a solution like Acronis Snap Deploy.


原文:https://stackoverflow.com/questions/110920
更新时间:2022-08-09 19:08

最满意答案

gzip头允许一个最多65535字节的额外字段,它可以包含任意数据,并在解压缩时被忽略。 因此,您可以更改gzip标头以插入一个额外的字段,以将文件填充到所需的长度。 有关格式说明,请参阅RFC 1952 。 如果您不关心gzip标头中的文件名,可以将其设置为任意长度,以填充到任意大的大小。 或者如果你想要超过64K,并且你不想使用文件名,你可以添加空的gzip流,只要你喜欢就可以。


The gzip header permits an extra field of up to 65535 bytes that can contain arbitrary data and that is ignored when decompressing. So you can change the gzip header to insert an extra field to pad out the file to the desired length. See RFC 1952 for the format description. If you don't care about the file name in the gzip header, you can make that any length, to pad to an arbitrarily large size. Or if you want more than 64K and you don't want to muck with the file name, you can append empty gzip streams to make it as long as you like.

相关问答

更多
  • gzip和zlib使用稍微不同的标题。 请参阅如何使用zlib解压缩gzip流? 尝试d = zlib.decompressobj(16+zlib.MAX_WBITS) 。 您可能会尝试将块大小更改为2的幂(例如CHUNKSIZE=1024 ),以获得可能的性能原因。 gzip and zlib use slightly different headers. See How can I decompress a gzip stream with zlib? Try d = zlib.decompressob ...
  • 允许缩小以永久更改您的代码。 它可以简单地用变量名称a替换变量名称foobar而不需要记住如何撤消缩小,并且它可以丢弃不需要的空格。 但是,它不能减少浪费的空间,因为所有字符都使用相同的长度编码,或者因为在两个方法调用中使用相同的参数 - 毕竟,缩小的版本仍然需要是有效的代码。 压缩例如使用gzip被允许产生不再有效的javascript输出。 因此,gzip可以例如编码具有不同长度的字符,使得花括号消耗少于8位,并且它可以压缩代码中的公共部分。 但是,因为它需要能够恢复原始代码,所以它不能只是将变量重命名 ...
  • gzip头允许一个最多65535字节的额外字段,它可以包含任意数据,并在解压缩时被忽略。 因此,您可以更改gzip标头以插入一个额外的字段,以将文件填充到所需的长度。 有关格式说明,请参阅RFC 1952 。 如果您不关心gzip标头中的文件名,可以将其设置为任意长度,以填充到任意大的大小。 或者如果你想要超过64K,并且你不想使用文件名,你可以添加空的gzip流,只要你喜欢就可以。 The gzip header permits an extra field of up to 65535 bytes th ...
  • 引用Roy T. Fielding ,RFC 2616的作者之一: 以不一致的方式(既不“永不”也不“永远”)改变内容编码,使后来关于内容(例如,PUT或条件GET)的请求无法正确处理,这当然是为什么执行即时内容编码是一个愚蠢的想法,为什么我将Transfer-Encoding添加到HTTP,作为在不更改资源的情况下进行即时编码的正确方法。 来源: https : //issues.apache.org/bugzilla/show_bug.cgi?id=39727#c31 换句话说:不要做即时内容编码,而是 ...
  • Javascript应该被缩小,并且在缩小之后,JS和CSS都应该被压缩。 看看如何'缩小'Javascript代码 Javascript should be served minified and after minification both JS and CSS should be served compressed. Have a look at How to 'minify' Javascript code
  • 据我所知,13个字节是最大值。 8个字节来自gzip页脚,两个PutUint32调用。 另外5个字节由霍夫曼压缩器添加,当压缩机关闭时,该压缩器广告空的最终块。 它将为最终的块头添加3位(= 1字节),为长度0 2个字节,为倒数长度0xffff另外2个字节。 所以我假设您可以使用这13个字节进行计算。 The 13 bytes are the maximum value to my knowledge. 8 bytes come from the gzip footer, the two PutUint32 ...
  • 我知道问题不在文件中,因为我有多个文件以相同的方式构建,并显示完全相同的错误。 结论并不是问题不在文件中,而是问题出现在所有文件中。 有人无意中或故意构建无效的gzip文件。 看起来他们通过使用Z_SYNC_FLUSH或Z_FULL_FLUSH而不是Z_FINISH来结束每个流,然后再启动另一个伪gzip流。 一个gzip流以一个最后一个块结尾,后跟一个包含两个未压缩数据完整性校验值的八字节gzip尾部。 尽管如此,您仍然可以继续进行解压缩,但是如果没有任何数据完整性检查的舒适性,只需在遇到错误时单击一个新 ...
  • gzip解压缩使用CRC-32和解压缩数据的长度(模2 ^ 32)验证解压缩数据。 所以已经有了检查。 如果这对您来说不够强大,您可以添加MD5,SHA-2或其他任何东西。 gzip decompression verifies the decompressed data with both a CRC-32 and the length of the decompressed data (modulo 2^32). So there is already a check. If that's not st ...
  • 我想我找到了一个我希望分享的解决方案。 def _chunk(response, size=4096): """ downloads a web response in pieces """ method = response.headers.get("content-encoding") if method == "gzip": d = zlib.decompressobj(16+zlib.MAX_WBITS) b = resp.read(size ...
  • RFC表示它是模2 ^ 32,这意味着uint32_t ,并且使用.Net GZipStream实验将它作为little-endian。 RFC 1952 RFC says it's modulo 2^32 which means uint32_t, and experimentation using a .Net GZipStream gives it as little-endian. RFC 1952

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)