Please use it instead of this thread, I'll try to reply to any questions posted there.
Well, it's been a while since I update this, so here it goes.
You may now download the new version from the script here. To know more on how to run/configure the bot read the previous post on it first.
This new version adds the ability to do missions via scripting, I've added the doNextMission() function that automatically tries do do the last non-complete mission.
I've also provided an example bot main cycle that:
-Tries to do the first non-complete mission (if it needs to buy equipment and there is money available it will also do it - including withdrawing from the bank if necessary).
- Second it will look at the best real estate investment and buy it, if possible.
- Finally it deposits all remaining money
I'm running this every 2 minutes on my home computer for a month now without any problems :)
Hi
ReplyDeleteCool script! I changed the best deal logical to buy cheaper estates first..
processPage(@link_invest){|line|
#puts line.chop
curr["Name"] = line.scan(/.*reName[^>]*>([\w ]*)/)[0][0] if (line =~ /reName/)
curr["Income"] = line.scan(/.*\$([^>]*)]*>([^>]*)]*)Sell<< curr unless (curr["Income"] == nil)
curr = {}
end
}
ret.sort!{|a,b|
a["Ratio"] == b["Ratio"] ? a["Cost"] <=> b["Cost"] : a["Ratio"] <=> b["Ratio"]
}
ret
end
Thanks! Nice to have some feedback :)
ReplyDeleteanyone figure out how to get the &pf section from the iphone?
ReplyDeleteWell, first this page is now the first google entry when searching for imobsters bots and I keep on getting more daily hits. So thanks.
ReplyDeleteRegarding the iPhone, I don't own one, however please let me know if you can do it. I would like to keep this updated.
I can guess that if you follow this tutorial (http://blog.jerodsanto.net/2009/06/sniff-your-iphones-network-traffic/)
And then startup your iPhone, you should see a connection starting with (GET http://im.storm8.com/apoints.php.....).
This should provide the values you require.
In case this works, please let me know.
Thanks!
I took a quick look at the iPhone stuff. The Parosproxy didn't work. But with Wireshark i could follow the process of iMobsters connection to the server.
ReplyDeleteThere is no call to apoints.php but to api.php.
Sadly they are using a token and a hash to authenticate the token at the server. So, i'm not that good to find out, how they calc that hash. It looks like some kind of Base64 (vnwrWrU9OEH7QXtNl2v4gCYoxIdW2vUOGSb7eWni8x4=) and with every request (App start, Do Job, Accept Recruit) there is a new token and a new hash in the url.
If someone finds out how to calc this hash, then such script is possible for iphone version too.
Forgot to say, that you can get full informations for your account (Level, Name, Energy...) without that mentioned hash. But only with the hash you can actually do something.
ReplyDeleteHow does this hash work exactly?
ReplyDeletei.e. can you script the re-use of the hash?
Maybe the hash means a session, and so, maybe we re-use it..
So the question above, is if the hash is being recalculated once per page or once per session.
ReplyDeleteAs i can say for now, its recalculated once per page. I had an exam today and had not much time to look further into this things.
ReplyDeleteBut now im free again =) and can provide more infos, once i setup pirni properly.
Thats a native packet sniffer for iphone.
I will provide better information soon =)
Me again =)
ReplyDeleteOk, i have some new info. The parameter is not a session code, it changes with every request.
I did a packet analyze (connect, do one mission, accept one recruitment). And this is a long comment an di hope it will be a little bit readable =) The values in "()" are my comments.
Results:
1. Request to
/api.php?cv=2.0.5
&method=login
&ctx=
&nflrt=
&st=
&sh=(value, that never changes, maybe crypted udid)
&rf=plist (set this to empty to get json output)
&p={"clientVersion":"2.0.5","udid":"xxx","premium":1,"osVersion":"4.1","model":"iPhone","points":27}
=> the url must be encoded
=> this will get an answer with the player data, no hash or something like that there
2. Request to
/api.php
?cv=2.0.5
&method=setDeviceToken
&p={"deviceToken":"xxx"} (does not change)
&ctx=HomeViewController
&nflrt=2010-11-24 03:54:27
&st=(number no change),(long string no change),1290616302 (timestamp),27,1,2.0.5,26,3,10005,2010-11-24 08:31:42,2010-11-24 00:33:26,v1_1290616302_33106b7516b9d7791a129306a403f111909ef6f3 (this changes also on every request => v1_(timestamp)_xxxx)
&sh=e+Ruw8SAaYmaTDkkIqA94dQAdOuVqE7YNJ9AUcayggE= (=>this is the hash, changes on every request)
&rf=plist
If you try to reuse this url, you will get a false result.
It's much more complicated, but i don't know why (because the simple url with apoints.php).
Got good news.
ReplyDeleteThere is another version of the game in the Appstore.
This version acts more like the android game, calling an url in the form
http://im.storm8.com/index.php?version=1.74&premium=true&udid=UDID&pf=PFVALUE&model=iPhone&sv=4.1
Also the Paros-Proxy works for getting the udid and pf values.
I already have some code in c#, but anyone can build his own script with this infos.
Regards, C.
Cool! :)
ReplyDeleteCan you not use my script?
I tried to change the Url to index.php and my udid and pf values but it didnt work. It gets stuck at getFirstPage, but i'm not as good in ruby as i am in c# =) so i wrote my own script.
ReplyDeleteAlso i'm playing World War and Vampires Live too and my program should cover all storm8 games, which work with the index.php. Tested with World War, iMobsters and Vampires Live.
But at the moment it does nothing more than missions. But i'm working on it =)
Cool! Sounds promissing.
ReplyDeleteI haven't had much time for this, however if you're willing to share your code, I'll consider providing hosting and a forum where more people can participate and share ideas, questions,etc..
message me if you're interested (José Feiteirinha on Facebook)
I sniffed all the packets from my iPhone and created a bot which plays the entire game for you, aiming to get as much money as possible.
ReplyDeleteThough the scripts I've found seem to use different APIs than yours so not sure where the difference is.
Email me if you want any information me [at] smellynose.com
when are all these goodies for the iphone going to be released?
ReplyDeleteIt's nice to know there is interest in this, so far I can only say.. keep cheking the forum (http://imobsters.kapouta.com/showthread.php?tid=2) and maybe I either get an iPhone (not likely) or someone is willing to share.
ReplyDeleteI have problems to find out my UDID.
ReplyDeleteIt seems that the current version of imobsters doesn't disply the error message anymore. Instead it shows me a messagebox with the option to retry or quit the app.
Is there an updated way to get my UDID?
This is the coolest sounding info I have come across so far. Thanks you guys..... how ever..... I don't understand any of it. I know the end result of the info and the need to know it, but I am an absolute illiterate when it comes to anything programming. I want to be able to do what you are doing and understand what you said. And be able to say it. Not just look for the able. What can I study? Please enlighten me! Ryan.killpatrick@gmail.com or khosi11 in most STORM8 apps. I will follow.
ReplyDeleteThis comment has been removed by the author.
ReplyDeletethe bot does not work for my experia x8 any help would be appreciated? thanks
ReplyDeletebump
ReplyDelete