Skip to main content

Plarium again. How to start programming due to game playing.

Plarium again. How to start programming due to game playing. 

I would like to say that writing a small script which is helping to have advantages against other peoples is not good. Writing  this post I have a goal to prepare a way to the fanny world of the programming.  I hope this article helps to use computer not a game machine only. 
Previous article related to this one  is placed at :old script

Requirements

  1. Internet browser with developer tools. Firefox or chrome are a good choice.  Both of them can be installed at the any popular operations system.  Download links are there:  https://www.mozilla.org/uk/firefox/new/ and https://www.google.com/chrome/browser/desktop/index.html. Also developer extension is needed: this is for firefox
  2. Plarium company uses flash and flash decompiler (in some case debugger) is required. I've used   JPEXS Free Flash Decompiler . Download link is here : https://www.free-decompiler.com/flash/download/  
  3.  I've used  python for writing some code. I'm lazy man and  've used my investigation and python 2.7 . You can use any it is not so important. https://www.python.org/downloads/
  4. Time and personal challenge.  Main our goal is programming starting. 

First step using Firefox. 

1. Start firefox and developer  tool window. 
2. Navigate to plarium.com
3. Take a look at network windows at firefox developer tools page. It is looks like : 

left side of the page contains request from your browser to server. Right side contains detail of the request. At this  moment only html and Flash  are been interested for investigation. 
Press "HTML" and "Flash" at the menu bar. After this network page is look like : 
Take a look at the left side. 
200 and GET inform as about succesful  request (status 200) and used http method GET.  List of codes  are preset at https://en.wikipedia.org/wiki/List_of_HTTP_status_codes. 200 means that all are OK.    HTTP  has eight method but   ussualy GET and POST are used.  This image inform as that  our browser download game from next URL : https://cdn01.x-plarium.com/pirates/client/ppen/uc_04_11_0957_636275014576166798.swf .
 Keep in mind this URL and file . We need  it for future investigation. 
Next one  is a POST  request to segment.ashx:
 Lets  try to understand this request:
First string is flash file which produces our request. 
  • sign-code is special string with control code. 
  • signin-authSeed and signin-authKey are credential string. I hope you understand  why this image  has this black color. 
  • signin-userId is local login name 
  • sever-method is special field selecting user activity. (I've finished quest and browser  add 'CloseQuest')
  • last one string is data which is sending by browser. look like "t" is time but i'm not sure at this moment.  
Next part  contains working with swf file 
   

Comments

Popular posts from this blog

Upgrade postgres 9.4 to 9.6 at Debian linux

I'm using virtual server based on Debian Linux for some my free projects.  One of them is based on Postgres with PostGIS extension.   This windy rainy day is a good time for executing some upgrade. Also I would like to add partman extension for partituoning.
Checking new version. Update package list :
aptitude update Get: 1 http://ftp.debian.org/debian jessie-updates InRelease [145 kB] Get: 2 http://security.debian.org stretch/updates InRelease [62.9 kB] Get: 3 http://security.debian.org jessie/updates InRelease [63.1 kB]
 Check for new version:


dpkg-query -l postgresql* Desired=Unknown/Install/Remove/Purge/Hold| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)||/ Name Version Ar…

Postfix can not start via systemd (simple fix)

Solving problem related to systemd process I like postfix.   This is really smart and secure mail server. I'm helping above  dozen clients around the world and  tunning  postfix is really fun task. This morning I was downgrading postfix  to the stable version for one of the my friends and come across interesting issue. 
root@newserver:/etc/init.d# systemctl status postfix ● postfix.service Loaded: masked (/dev/null; bad) Active: inactive (dead) since вт 2017-06-13 14:35:41 EEST; 1h 48min ago Main PID: 25145 (code=exited, status=0/SUCCESS)чер 13 14:47:09 newserver systemd[1]: Stopped postfix.service.чер 13 14:47:29 newserver systemd[1]: Stopped postfix.service.чер 13 14:58:22 newserver systemd[1]: Stopped postfix.service.чер 13 14:58:23 newserver systemd[1]: Stopped postfix.service.чер 13 15:05:20 newserver systemd[1]: Stopped postfix.service.чер 13 15:29:06 newserver systemd[1]: Stopped postfix.service.чер 13 15:29:06 newserver systemd[1]: Stopped postfix.service.чер 13 15:…

Small script for one of the plarium game

few notes about google games.
Goggle informed that access to the all games be closed after June, 30. I played "Pirates: Tides of fortune" and decided to limit my game time using small script. Detail is below.
Some history
First internet games were updated network games only. 15 years ago internet connection requires a lot of money and nobody had a problem with lagging of the other players. Usually games uses personal communication protocol. Warbirds, Aces High and Eve online use this way.
Next part use a browser and trivial HTTP protocol. One of the popular game in this area is travian . Travian player uses browser and every browser (PC, cell phone, tablet) can be used for playing. Of course, popularity of the game is related to graphics. Trivial HTTP does not have good power in this and other technology is used for this side. One of them is Flash . Unfortunately flash requires a lot of CPU : "Pirates" was near to froze at my old celeron with 512M…