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

Update grub using dracut

Fixing grub using dracut Last kernel update was not successful to me. Centos can not boot with next messages:  [ 180.098802] dracut-initqueue[376]: Warning: dracut-initqueue timeout - starting timeout scripts [ 180.610167] dracut-initqueue[376]: Warning: dracut-initqueue timeout - starting timeout scripts [ 181.121619] dracut-initqueue[376]: Warning: dracut-initqueue timeout - starting timeout scripts [ 181.633093] dracut-initqueue[376]: Warning: dracut-initqueue timeout - starting timeout scripts [ 182.144831] dracut-initqueue[376]: Warning: dracut-initqueue timeout - starting timeout scripts [ 182.656146] dracut-initqueue[376]: Warning: dracut-initqueue timeout - starting timeout scripts [ 183.167306] dracut-initqueue[376]: Warning: dracut-initqueue timeout - starting timeout scripts [ 183.678755] dracut-initqueue[376]: Warning: dracut-initqueue timeout - starting timeout scripts  Of course simples way  is creating  linux  usb stick  and fix it. But dracut
  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]

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]: Stopp