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

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

Mac, emacs and new python3.10

Mac, emacs and new python3.10   I've deceided to upgrade my python to the new Python 3.10 and upgrade my IDE based on Emacs too.  Upgrading python to version 3.10  A installing python 3.10  is really simple task using a homebrew:  MacBook-Pro-Hohlov:call-me skhohlov$ brew search python ==> Formulae app-engine-python gst-python python-launcher python-tk@3.9 python@3.8 pythran boost-python ipython python-markdown python-yq python@3.9 ✔ jython boost-python3 micropython python-tabulate python@3.10 reorder-python-imports cython bpython ptpython python-tk@3.10 python@3.7 wxpython ==> Casks awips-python awips-python
  debian,  amavis,  virus inside archive   One my client asked informed me, that amavis skips some files types. mail server configuration is really simple: Postfix as SMTP server and  amavis working as context filter. Also amavis runs spamassasin and clamd antivirus. Amavis gets files from attachment and unpack it. lha file is not detected. short investigation First I deceided to run amavis  in debug mode and verify how virus passed postix+amavis.  root@newserver:/var/lib/amavis# /etc/init.d/amavis stop [ ok ] Stopping amavis (via systemctl): amavis.service. root@newserver:/var/lib/amavis# /etc/init.d/amavis debug Trying to run amavisd-new in debug mode. Debug mode inform about loaded plugins: ' Nov 13 22:07:23.335 newserver. /usr/sbin/amavisd-new[40334]: Found decoder for .cpio at /bin/pax Nov 13 22:07:23.336 newserver. /usr/sbin/amavisd-new[40334]: Found decoder for .tar at /bin/pax Nov 13 22:07:23.336 newserver. /usr/sbin/amavisd-new[40334]