从可执行文件中获取字符串(本次《使命召唤4》) [英] Get a string from an Executable(This time Call of Duty 4)

查看:65
本文介绍了从可执行文件中获取字符串(本次《使命召唤4》)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找到了一个包含字符串的文件,您可以从《使命召唤4》中获取这些字符串,其中一些是:

006C6810:``mapname'',0
006E1130:``侦听服务器'',0
006E1834:``com_maxfps'',0

我必须从iw3mp获取字符串006C6810(这是《使命召唤4:多人游戏》可执行文件的名称).

I found a file with Strings you can get from Call of Duty 4, some of them are:

006C6810: ''mapname'',0
006E1130: ''listen server'',0
006E1834: ''com_maxfps'',0

I have to get String 006C6810 from iw3mp (that''s the name of the executable of Call of Duty 4 Multiplayer).

How do I do this?

推荐答案

您可以使用File.ReadAllLines读取整个文件,然后使用正则表达式,或者如果位置始终相同,则可以使用数组表示法,读取所需的位.
You can read the entire file using File.ReadAllLines, then use regex, or just array notation if the position is always the same, to read the bit you want.


这篇关于从可执行文件中获取字符串(本次《使命召唤4》)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆