====== Script Manual ======
The program is all based on a simple script engine that we developed on our own which could theoretically be used to submit anything to any platform you can think of. Though it might be a bit hard to figure out the meaning behind the values. This document tries to explain everything in an hopefully easy way.
Here are some helpful links on engine writing and syntax highlighting:
* [[https://gsaserlists.com/serlib-documentation/|SERLib Documentation]]
* [[http://forum.gsa-online.de/discussion/18031/some-snippets-to-accelerate-ini-writing|Some snippets to accelerate .ini writing]]
* [[http://forum.gsa-online.de/discussion/13/gsa-script-editor-notepad-ser-edition|GSA Script Editor (Notepad++ SER Edition)]]
* [[http://forum.gsa-online.de/discussion/18057/passing-simple-protections|Tool to Debug Form-Submissions in Chrome Browser]]
* [[https://github.com/seospace/gsapi|Integrate 3rd party tools or custom coded scripts instead of using script-manual]]
* [[http://forum.gsa-online.de/categories/new-engines-platforms|Forum to find help/suggestions]]
* [[http://forum.gsa-online.de/discussion/219/tutorial-web-2-0-how-to-code-a-web-2-0-engine-noob-friendly|How to code a web 2.0 engine]]
* [[http://forum.gsa-online.de/discussion/135/scripting-quick-question-answer-thread|FAQ]]
* [[http://forum.gsa-online.de/discussion/14/tutorial-how-to-find-new-platforms-footprints-and-urls|How to find new platforms, footprints and URLs]]
* [[http://forum.gsa-online.de/discussion/18031/some-snippets-to-accelerate-ini-writing|Some snippets to accelerate .ini writing]]
* [[https://github.com/seospace/gsapi|gsapi - Simple HTTP server for GSA Search Engine Ranker]]
* [[https://forum.gsa-online.de/discussion/28159/serengines-command-list/p1|Additional Commands for SerENGINE Scrip Language]]
===== The Structure =====
Each engine is defined by a simple ini file that has to be placed in the “Engines” folder located in the programs installation folder.
To those of you who do not know what a ini file is let me explain it shortly. A ini file is a simple text file that you can open in a text editor like Notepad. It has a section, a variable and a value.
[SECTION]
variable=content
Everything is not case sensitive so you don't have to care if you write **[SECTION]** or **[Section]**. There are basically two types of engines.
* The once that require an account and login.\\ You will have to define at least the following sections:\\ **[SETUP]**, **[REGISTER_STEP*]**, **[LOGIN_STEP*]**, **[STEP*]**, (optional **[FIRSTLOGIN_STEP*]**)
* Those who need no account and no login.\\ You just need the following sections:\\ **[SETUP]**, **[STEP*]**
===== The SETUP Section =====
This section defines global settings used to identify a website or set a description. The possible values are described below:
^Variable^Allowed values / Description^
|enabled|1 = Engine is usable from GUI (default)\\ 0 = Engine is not usable from GUI|
|default checked|1 = When a new project is created, this engine will be enabled (default)\\ 0 = This engine is not checked on a new project|
|engine type|Name the type of the engine e.g. Directory, Forum, Blog Comment,...\\ This will be used to sort it into the tree view when you edit or create a project.\\ \\ //Example: engine type=My Engines//|
|description|Just write some notes about this engine that get shown when the user moves the mouse over the engine name in the tree view. You can use **\n** to generate a line feed.\\ \\ //Example: description=My little Engine\n\n(c) GSA Supported\n\nHave fun//|
|dofollow|1 = This engine creates a do follow link\\ 0 = This engine creates a no follow link\\ 2 = This engines produces both, no follow and do follow links.|
|anchor text|1 = This engine creates links with your anchor text\\ 0 = This engine creates links with there own anchor texts like "Homepage" or "Visit XYZ's Site".\\ 2 = This engine might create both, anchor text links and links with there own anchor text.|
|uses pages|1 = This engine uses pages\\ 0 = This engine uses no pages\\ 2 = This engine uses might use pages or not.\\ \\ For some engines the link will move to page 2 or beyond and might not be visible if you visit that page later. The link is still there but on a different page. This is just an informational data and not used in any way right now.|
|page must have|This parameter is used to check whenever the webpage is usable for this engine or not. The content of this variable has to be present in the webpage (either pure text or html source). The variable can have multiple values separated by a %%|%% where just one has to match**.**\\ \\ //Example: //\\ //page must have1=Powered by XYZ%%|%%XYZ Powered//\\ //page must have2=!not allowed to access this page//\\ //page must have3=Webpage%%|%%Homepage//\\ \\ In the above example you see 3 variables and each of them has to match before a engine is used for that website. The ! parameter in "page must have2" means that the following should not appear on the page.|
|url must have|This parameter is used the same way as "page must have" but for the URL string itself and not for the website content. \\ \\ //Example: url must have1=/wiki///\\ // url must have2=!wikipedia.com//\\ \\ In the above example we will not use this engine for URLs that contain //wikipedia//.com or do not have "/wiki/" in there URL.|
|fixed url|If no "//search term//" is used, you have to use this tag to indicate that the submission is just happening on one fixed site (usualy some kind of web 2.0 site with blog creation). \\ \\ //Example: fixed url=//%%https://my.opera.com/%%\\ \\ This is than adding the URL to the target URLs of the project and starts a submission to it. |
|search term|This is used to search for new targets on the internet with the help of search engines like google.\\ \\ //Example: //\\ //search term="Powered by XYZ"%%|%%"Powered by XYZ"//\\ \\ The example above uses two possible search queries. You can use also encoded the search term already if you want with "%90%AF%24". This is useful for queries in some strange language. The program will pick one of the queries randomly so the order is not important.|
|add keyword to search|1 = Add a keyword from the project to the search query\\ 0 = Never add a keyword to the search query\\ 2 = Add just sometimes a keyword to it if it seems to be useful (default)|
|use blog search|0 = Never use blog search engines\\ 1 = Use blog search engines (default)\\ 2 = Use only blog search engines|
|extract keywords|1 = Extract keywords from the sites meta tags. These can be used later on\\ 0 = Don't extract keywords (default)|
|extract keywords ignore|Ignores the keywords and will not add them.\\ \\ //Example: extract keywords ignore=blog,wordpress//\\ \\ If the meta keywords for that site are "SEO, blog, wordpress" then the program will just extract SEO from it.|
|extract urls|1 = Extract URLs from the sites.\\ 0 = Don't extract URLs (default)\\ \\ If enabled, the program will download verified URLs and try to post to sites found as external links.|
|posted domain check|Overwrites project settings: Avoid posting URL on same domain twice \\ 0 = do not post any link if anything has been posted before\\ 1 = allow to post a link again on the same domain (but only if the URL is different)\\ 2 = special setting for tier projects that would than allow to post several URLs on the same site.|
|skip ext links on|Overwrites project settings: Skip sites with more than\\ 1 = setting from project is applied\\ 0 = setting from project is ignored|
|skip content on|Overwrites project settings: Skip sites where the following words appear\\ 1 = setting from project is applied\\ 0 = setting from project is ignored|
|skip url content on|Overwrites project settings: Skip sites with the following words in URL/Domain\\ 1 = setting from project is applied\\ 0 = setting from project is ignored|
|skip nofollow links on|Overwrites project settings: Try to skip creating Nofollow links\\ 1 = setting from project is applied\\ 0 = setting from project is ignored|
|skip pr on|Overwrites project settings: Skip sites with a PR below\\ 1 = setting from project is applied\\ 0 = setting from project is ignored|
|referrer|Sets a fixed referrer that is used when downloading content or submitting something to this site.\\ \\ //Example: referrer=%url%//\\ \\ This will always use your URL from the project as a referrer.|
|user agent|Instead of using a user agent that the program chooses for you, you can define it here.\\ \\ //Example: user agent=Some Legit Browser v1.01//\\ \\ This might be useful for exploits where you e.g. can send a html link in the "user agent" that is than turned to a real link on a page. |
|extract from email|If you use email verification in the engine you might need to extract not only verification URLs, but also variables like a login or password from the emails. This can be done here.\\ \\ //Example: extract from email=key,forum_password=email_pw//\\ \\ This example will try to extract the data for key (section key) and forum_password (defined in email_pw section). Please read the chapter Data Extraction for details.|
|whois only|Very special variable that is only used for engines that submit your URL to sites that carry your domain in there URL.\\ 0 = Not a whois only engine (default)\\ 1 = Only whois submission and if not detected as a whois one, skip submission|
|captcha hint|A hint that should be displayed along with the captcha input|
|multiple posts per account|Defines if it is allowed to create more than one post per account. By default this is set to 1 (true) but only used for Article posting engines. On some engines it is useful to set this to 0 (false) when just one Article is possible to be posted (e.g. article in profile link)|
|keep subdomain|Defines if a special domain with it's subdomains should be handled as a new site/domain.\\ \\ //Example: keep subdomain=domainXYZ.com//\\ \\ If the program has two URLs like A.domainXYZ.com and B.domainXYZ.com, then it will handle them as two different sites where it previously would have taken them as the same.|
|max download size|Overwrites the global filter for the maximum amount of MB to download per GET/POST request.|
===== The STEP Section =====
There are 4 types that can be used:
* [REGISTER_STEP*] - used to create an account
* [FIRSTLOGIN_STEP*] - used **only ones** to login after account registration is done and first login ever is performes
* [LOGIN_STEP*] - used to log into the site with the created account
* [STEP*] - he actual submission process
* [EXTRA_STEP*] - an additional submission process
You can define as many steps as you want but they have to be in sequence like [STEP1] [STEP2] and so on.
The following fixed variables can be used:
|**Variable**|**Allowed values / Description**|
|find link|Searches the site for a anchor text and downloads that URL to work on with. You can use more than one link text when separated with %%|%%.\\ \\ //Example: //\\ //find link=Register%%|%%Registrieren%%|%%Sign up%%|%%Signup//\\ \\ The example will search for a link that has at least one of the above anchor texts.|
|find url|Searches the site for a URL that is matching one of the masks defined in the variable.\\ \\ //Example: //\\ //find url=*/register%%|%%*/register.php%%|%%*/signup/*//\\ \\ You should always use //find link// and //find url// in combination so that if one fails the other is used. |
|optional find url link|0 = A link has to be found else we abort the submission (default)\\ 1 = If no link is found we continue to find a form or whatever should be done in the current submission step.\\ \\ //Example: optional find url link=0//|
|alternative url|If //find url// and //find link //are not finding any URL that can be used, we will generate an alternative URL.\\ \\ //Example: alternative url=./register.php//\\|
|browse links|This will take the variable content and browse to the site. It is just useful for directories maybe where you first have to browse to a certain category till you are allowed to start a submission.\\ \\ //Example: browse links=%category%//\\ \\ If your project category is defined like "Computer :: Software :: Shareware", than the program tries to surf to //Computers// followed by finding a link names //Software// and than //Shareware//.|
|browse links from root|1 = The root URL is used for "browse links" in case the start URL is a sublink.\\ 0 = Start the "browse links" from where we are.|
|browse links url mask|Tells the program to just search for URLs matching that mask.|
|just download|1 = Download the new URL and continue with STEP2 or finish the submission if nothing else should be done.\\ 0 = a form has to be found to start the submission (default)|
|form id|Try to find a form on the current webpage that has a ID as in the variable content. Again you can use %%|%% to have multiple variations. Not many sites use a ID in the