Skip to content

Need help in understanding the sequence in which the GSA ENGINE Code is read or Executed

Hello,
        I've read the GSA manual completely and trying to modify an engine in GSA SER. I'm almost 90 percent through it. I have question which @sven or any engine coder can answer. 

I want to know if the flow or execution of statement  is sequential. Because in some engines the variables are declared at last part of the program and in some cases they are declared initially before [register] step. 

Also in some cases I find [register_step2] or [register_step3]  first and then comes [register_step1]

So what's confusing me is that if statements are executed sequentially ( one line after another) or randomly. If random please mention the flow process like [setup] [register_step1] ,etc

I've read @Ozz's guide about a sample program and Its very helpful. 

Thanks,
Murthy

Comments

  • SvenSven www.GSA-Online.de
    I don't know of any engine where I put REGISTER_STEP1 after REGISTER_STEP2 but this doesn't matter. SER is always executing the sections in sequence to the numbering, not the order in the file.

    Also the lines on each section do not matter as they are unique anyway and can not repeat per section it does not matter. You can e.g. write...

    [STEP1]
    modify url=/blah.php
    form url=*/submit

    or

    [STEP1]
    form url=*/submit
    modify url=/blah.php

    The order how it is executed is always the same for SER. In this case first modify url, then the form identification and so on...

    Ther eis one exception about the variables of the form to fill. You can either put them in the right section where they are needed, or put them in the first step where they are read alternatively if not found in the current set. I did that as sometimes the form repeats with all the same variables and then it makes sense to only define them once at the top of the section.
  • MurthyMurthy Chennai
    @sven Thanks for your quick and precise reply..... That makes sense now......I was trying to record macro for Xnuke latest version to train new platforms but solving captchas was almost impossible without paid service. But the moment I saw @ozz's guide or sample program I was able understand  to code or modify SER for my needs. 

    HAt's off to both you guys for commendable work . I really wish you include some more sample programs with explanation to make more people understand better. We can definetely improve or add more engines and increase SER ability .... 
  • SvenSven www.GSA-Online.de
    reminds me of finally completing the script editor :/
Sign In or Register to comment.