Greybunny 发表于 2017-12-3 12:20

申请会员ID:greyhex

I have sent an E-mail from my mail: greyhexn@gmail.com, and now I repeat the content to avoid something wrong.

At first, I typed 2000 words in Chinese, but the laptop shut down suddenly!! So, I will give a brief introduction in English. If couldn't meet the standard, please reply to me, and I will give a complete introduction.

Let me introduce myself at first.
I'm a student at the north china university of water resources and electric power in Henan province, majoring in computer science and technology.My name is Wang Xichen, a 20-years-old boy with full passion to computer.

As playing King of Glory(王者荣耀) sometimes, I found there wasn't an exchange of data between client and server in adventure patttern. So I changed a value of the hero's skill and replaced it with anthor figure's -(Zhou wang)
And change the boss's hp. Aother problem is that I should spend as short as possible time to kill the boss.
So, I found the value standing for the min distance between the hero and boss where the boss can appear. Its segment offset is 868 and the offset of the hp of boss is 86C.
Because I use iphone, then I learned some methods reversing in ios.I noted in onenote.The pictures are as fellows:

https://mail.google.com/mail/u/1/?ui=2&ik=f2b38bef44&view=fimg&th=1601a8a60f700939&attid=0.5&disp=emb&realattid=ii_jaq8pei97_1601a891daf23deb&attbid=ANGjdJ-YLQMHTwiQ-csblx9Q5e5PFo7mVXofGla70GLmW1dOI1ZeWMwu_jmQCBBZMqaxMFkvICQWTpO7sTk2nzZRb_R4Z82b10sMepvGHKDGjX8aTlbS-ZBnAYQsx1M&sz=w1006-h788&ats=1512273786858&rm=1601a8a60f700939&zw&atsh=1



​Briefly, I use ssh in powershell connecting to my iphone having been jailbreaken and use a tool at github:rxmemscan./ *It's not mine*/
The link is https://github.com/rainyx/rxmemscan.

And I compiled that code in my iphone with the environment of theos.(I don't have a mac, so it could be a convinient method)

Then I use ssh connecting to the iphone and by excuting the instruction like rxmemscan "smoba" in powershell to change the value in memory.

At last, I learn the lua language and use xx assistant (I haven't learned the objective-c or swift before) to implemation my idear.

But the code I missed.

Next, I try to read the value of money, diamond and level and save in txt filetype.

The mehod is to make a trainningdata of font and use ocr built in xx assigntant.

The following is my code using the development environment in xx assigntant.(simillar with lua)

--[[
-----------------------------------------------------------README-------------------------------------------------------------


____________________________________________________________________________________               
|____名称_____|_____________________________内容______________________________________|
|             |font|-----------金币-钻石-等级字型识别范围-基色+误差---------------------|
|   base    |----------------------------------------------------------------------|
|_____________|map |----------------区域多点识别范围+颜色------------------------------|
|____point____|-------------------------定点点击坐标----------------------------------|
|___ output___|-------------------待写入数据存储变量+字符串----------------------------|      
|_____________|______________________________________________________________________|



--文本存储目录 /var/mobile/Library/XXAssistant/Lua/Luas/Temp/public
Data =
{
base =
{
    font = {
      {range = {627, 24 , 686, 40 }, diff = {"0x828f9c-0x0f0f0f"}},   -- 金币字型识别范围 基色+误差
      {range = {755, 24 , 802, 40 }, diff = {"0x828f9c-0x0f0f0f"}},   -- 钻石字型识别范围 基色+误差
      {range = {801, 300, 827, 318}, diff = {"0xdbebf2-0x0f0f0f"}},   -- 等级字型识别范围 基色+误差                                                      
    },
   
    map = {
      {1228, 28, 1230, 30},   -- 魔女*自动*识别范围
      {1226, 40, 1227, 41},   -- 魔女*跳过*识别范围
      ["rgb"] = 0xffffff      -- 识别色-白
    }
},

point =
{ --{x =   , y =      }   ---添加自动登录
    --{x =   , y =      }
    --{x =   , y =      }
    {x = 1110, y = 520},      -- 冒险
    {x = 665 , y = 292},      -- 副本
    {x = 300 , y = 200},      -- 大关
    {x = 700 , y = 320},      -- 小关
    {x = 1100, y = 670},      -- 英雄
    {x = 1000, y = 650},      -- 闯关
},


output = {
    [1] = "金币=",   [2] = "钻石=",   [3] = "等级=", [4] = "UUID=",          [5] = "日期=",
    [6] = money,    [7]= diam,   [8] = rank,    [9] = getDeviceUUID(), [10] = os.date(),
    [11] = "line=",[12] = line
}
}

--**********************************************************Functions*********************************************************

------------------------------------------------------------运行,关闭app-------------------------------------------------------

function Runapp (appid)
runApp(appid)
mSleep(10*1000)   
end

function Closeapp (appid)
closeApp(appid)
end

--[[------------------------------------------------------------点击----------------------------------------------------------]]
--闯关                                                            

--主控制
function Ai()
local times                                                                     --控制获取数据
for times in ipairs(Data.base.font) do                                          --遍历font表
    Output(times)
    if times == 2 then Ai_1() end                                                 --i=2时,调用AI_1函数执行自动操作
end
end

--指定坐标点击,调用AI_2
function Ai_1 ()                                                   
for i, v in ipairs(Data.point) do                                             ---改的话这里不要动,这个迭代循环point中的点,你把点加到我之前注释的地方
    Tap(v.x, v.y)
end
Ai_2()
end

--多点找色
function Ai_2 ()                                                   
local sign = 1                                                                --副本中需要点4次,一次自动 两次跳过 一次点击屏幕继续
local i = 1                                                                   --sign, i 用于循环次数控制

while true do
    mSleep(500)                                                                --设置延迟防止循环过快
    keepScreen(true)
    local x, y = findColor(Data.base.map,Data.base.map.rgb, 95)
    if x~=-1 and y~=-1 then
      Tap(x, y)            
      if sign == 1then mSleep(20*1000)                                        --点自动后暂停时间
      elseif sign == 2 then i = i + 1 end                                    
      sign = 2
    end
    if i == 3 then                                                            --这里可以改,在点通关星数的界面加了个延迟
      mSleep(200)
      Tap(660, 650)
      mSleep(200)
      Tap(660, 650)
      keepScreen(false)
      mSleep(1000)                                                            --延迟用于等待出现显示等级的界面
      break
    end
    keepScreen(false)
end
end

--点击函数
function Tap (x, y)                                                               
touchDown(1, x, y)
mSleep(50)
touchUp(1, x, y)
mSleep(100)
end

------------------------------------------------------------文字识别-----------------------------------------------------------

--加载自定义文字识别字库
function CreatOCR()
ocr, msg = createOCR({
type = "tesseract",
path = "res/",
lang = "data"
})
end

--获取数值信息并存储在table中
function Output (i)
local diff= Data.base.font.diff
local rect= Data.base.font.range
if ocr ~= nil then
    local code, text = ocr:getText({
    rect= rect,
    diff= diff
    })
    if code == 0 then
      Data.output+ 5] = text                                                       --存储识别的数值信息
    end
end
mSleep(200)
end

--控制写入文本
function Store (i)
local var                                                                           --存储流程                                       
Data.output[12] = Data.output[12] + 1
Writetxt(11,12)
for var = 1, i do
    Writetxt(var, var + 5)
end
end

--写入文本
function Writetxt (i, v)                                                            --写文本
sysLog("ok")
f=io.open("Data.txt","a+")
f:write(Data.output, Data.output," ")
if i == 5 then f:write("\r\n")end                                                 --加换行
f:close()
end

-----------------------------------------------------------主程序--------------------------------------------------------------

init("0", 1)
Data.output[12] = 0                                                                   -----设置行号

while true do
Runapp("com.tencent.smoba")                                                         -----打开app
mSleep(15*1000)                                                                     -----这里改为登陆游客的代码
CreatOCR()                                                                        -----加载自定义字库
Ai()                                                                              -----动作
---Ai()中还要加入换号+游客登陆的动作,可把坐标放在Data.point中
Store(5)                                                                            --存数据
mSleep(200)
Closeapp("com.tencent.smoba")                                                       -----关闭游戏
--------------------------------------------------------下面可以加换号的代码-------------------------------------
end

The scription was bought by a studio later.


And there are more work and detail I haven't listed. If you think it can't meet your standards, please reply to me, and I'd like to give you more details and some other works.



At last, I want to share something about a number of classic books in English(little books in China) and some usefully video in Computer, Mathmatic and English fileds, which is quite difficult to collect and to be honest, I only read a little among them.(And Including some tools like the IDA Pro 7.0(patched) with a serice of plugins

for mac, linux and windows. About 50GB


I wrote an index for them. Here they are.
https://mail.google.com/mail/u/1/?ui=2&ik=f2b38bef44&view=fimg&th=1601a8a60f700939&attid=0.3&disp=emb&realattid=ii_jaq83gd43_1601a797d7e1ed3e&attbid=ANGjdJ_BSlN5ySvmwx5jWLAHhLRpCKGwKTYpIv_ejzsCPQWUImxK1fCkfKx5Hbf1nezBAX75Vy_qZydEgf0Rxn0NiC7ArnHvDLJ-vAhRc1wiwiv4ilgqYc0bit23AyU&sz=w1402-h7386&ats=1512273786872&rm=1601a8a60f700939&zw&atsh=1https://mail.google.com/mail/u/1/?ui=2&ik=f2b38bef44&view=fimg&th=1601a8a60f700939&attid=0.4&disp=emb&realattid=ii_jaq86p8b4_1601a7bcce881600&attbid=ANGjdJ9HeMN72nRMJGTgpb_V3CNYr6wwi9wW8GnzQfXYqyh3pzA6YZRUuadjqvX6BtTm_ZKm7LaxI-CnnJl9e9-KXSDzOXhFJ98AISHt0kofw3-X5IfSuXFBkzhwYTQ&sz=w1124-h7386&ats=1512273786872&rm=1601a8a60f700939&zw&atsh=1




https://mail.google.com/mail/u/1/?ui=2&ik=f2b38bef44&view=fimg&th=1601a8a60f700939&attid=0.2&disp=emb&realattid=ii_jaq881z25_1601a7cc231d8a9d&attbid=ANGjdJ-gHSRvO111pUAhNS5cwKh9GnFMnx1rRNpA_-nUZmVHCIZefE3rBP4vAwJVGIqvKZZ5QT1uFjY-Wsjr5tcXZJQudfHWkd7lCMH2BXIcCvsxuF1T7KqfGfvwHsY&sz=w1176-h850&ats=1512273786872&rm=1601a8a60f700939&zw&atsh=1

https://mail.google.com/mail/u/1/?ui=2&ik=f2b38bef44&view=fimg&th=1601a8a60f700939&attid=0.1&disp=emb&realattid=ii_1601a7fbca4c0d7d&attbid=ANGjdJ-1nQvAEhxcnp6LT_8uoMX_4Z2SQJ18-4QwBjiu4LuNiJaK-RnJ3VyhBDe-sNKDf4saKAYhOdrrd6IE8PaT5WkQy3jXOdMqKKjbqsC0nYaadZurv85T4uEnd9I&sz=w1562-h1478&ats=1512273786872&rm=1601a8a60f700939&zw&atsh=1

​The link I forgot to offer in the E-mail.
Link:https://pan.baidu.com/s/1nvUm8M9 Password:h7scAbout 50GB


Last but not least, I want to share my favorite lyrics with you , from the song ,7 Years :



I only see my goals, I never belive in failure.

Cause I Know the smallest voices, they can make it major.

I'd like to be a member at 52pojie. Thank you.

Hmily 发表于 2017-12-4 11:17

你到底是chinese还是歪果仁?ni fa de tupian dou wufa xianshi。

Fighting。青春 发表于 2017-12-4 11:56

iP是河南郑州的,注释的中文肯定过了10级,应该是中国人{:301_986:}

1160073482 发表于 2017-12-4 15:34

真的厉害

AdGer 发表于 2017-12-4 15:37

服气服气,老哥强无敌

bestriven 发表于 2017-12-21 08:11

Hmily 发表于 2017-12-4 11:17
你到底是chinese还是歪果仁?ni fa de tupian dou wufa xianshi。

版主应该是一个很有趣的人,浏览了几个申请方面的帖子,都有些调侃的

凛冬已至 发表于 2017-12-23 23:27

用的还是度盘

凛冬已至 发表于 2017-12-23 23:30

我天朝从来不缺游戏脚本{:1_918:}

凛冬已至 发表于 2017-12-23 23:43

Hmily 发表于 2017-12-4 11:17
你到底是chinese还是歪果仁?ni fa de tupian dou wufa xianshi。

At first, I typed 2000 words in Chinese, but the laptop shut down suddenly!! So, I will give a brief introduction in English. If couldn't meet the standard, please reply to me, and I will give a complete introduction.

Let me introduce myself at first.I'm a student at the north china university of water resources and electric power in Henan province, majoring in computer science and technology.My name is Wang Xichen, a 20-years-old boy with full passion to computer.
可以看出是个Chinese,BUT发不了中文(At first, I typed 2000 words in Chinese, but the laptop shut down suddenly!! So, I will give a brief introduction in English. ),河南省华北水利水电大学的(I'm a student at the north china university of water resources and electric power in Henan province)。

crx666 发表于 2017-12-24 13:10

页: [1] 2
查看完整版本: 申请会员ID:greyhex