📜 ⬆️ ⬇️

The script to create mirror updates for Eset Nod32 on Linux

If you are administering, it is likely that sooner or later the question will arise - "On client machines, there is an Nod32 antivirus, we should create a single mirror of updates for them." And here there are several possible ways to develop the plot:

  1. "Server on Windows, enough money." It's all quite simple - buy a license, put the desired Nod32 distribution on the server, set up, rejoice. The option is more mythical, since it is extremely rare when IT has “enough money”.
  2. "Server on Windows, not enough money." There are options. Starting from using warez licenses, to manual scripting and using Linux solutions ( cygwin to help).
  3. "Server on Linux". Money in this case simply does not matter. We have hands, we have a head, and there is a desire to do everything quite qualitatively and reliably.

We will talk about the third option now.


What will be changed for work?


')
Installation


After all these manipulations, you should observe something similar to:


Special features



MIT License
Copyright © 2014 <github.com/tarampampam>

This license permits those who receive a copy of this software and related documentation (hereinafter referred to as the “Software”) to use the Software without charge without restriction, including the unrestricted right to use, copy, modify, add, publish, distribute, sublicense and / or sale of copies of the Software, as well as to the persons to whom this Software is provided, subject to the following conditions:

The above copyright notice and these terms and conditions must be included in all copies or significant parts of this Software.

THIS SOFTWARE LIST IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR CLAIMS FOR DAMAGES, LOSSES, OR OTHER REQUIREMENTS UNDER APPLICABLE CONTRACT, TORT OR OTHERWISE, ARISING FROM HAVING THE RESULT OF OR RELATED TO THE SOFTWARE OR THE USE OF THE SOFTWARE OR OTHER DEALINGS IN THE SOFTWARE.

Bonus '' Distribution kit with built-in settings ''
It's all very simple. Put 3 files in one folder:


In config.small.xml we specify the necessary settings:
 <?xml version="1.0" encoding="utf-8"?> <ESET> <SECTION ID="1000103"> <SETTINGS> <PLUGINS> <PLUGIN ID="1000400"> <PROFILES> <NODE NAME="Enable" VALUE="1" TYPE="DWORD" /> <NODE NAME="Active" VALUE="@My profile" TYPE="STRING" /> <NODE NAME="@My profile" TYPE="SUBNODE"> <NODE NAME="UpdateType" VALUE="22" TYPE="DWORD" /> <NODE NAME="SelectedServer" VALUE="%%url_updates_server%%" TYPE="STRING" /> <NODE NAME="Username" VALUE="%%your_username%%" TYPE="STRING" /> <NODE NAME="Password" VALUE="" TYPE="PASS" /> </NODE> </PROFILES> <SETTINGS> <NODE NAME="RegistrationType" VALUE="0" TYPE="DWORD" /> <SERVERS> <NODE NAME="Server_0" VALUE="%%url_updates_server%%" TYPE="STRING" /> </SERVERS> </SETTINGS> </PLUGIN> </PLUGINS> <CLIENT> <NODE NAME="GraphicMode" VALUE="FFFFFFFF" TYPE="DWORD" /> <NODE NAME="ShowSplash" VALUE="0" TYPE="DWORD" /> <NODE NAME="SimpleMenu" VALUE="0" TYPE="DWORD" /> <NODE NAME="AdvancedMenu" VALUE="1" TYPE="DWORD" /> </CLIENT> </SETTINGS> </SECTION> </ESET> 

Where %% url_updates_server %% is in both cases identical and equal to the address of our update server. The easiest way to get a config is “ESET NOD32 Antivirus” window → “Settings” → “Import and export settings”. From the received xml-file we delete everything, except for the necessary settings (the good is that all sections are very well named).

Next install install.cmd script:
 @echo off title "Run ESET Nod32 Installer" cls set AppToRun=ESET_NOD32_Antivirus_4.2.71.3_(32-bit)_(rus).msi set CfgFile=config.small.xml rem /qb -    rem /qn -     gui start "" "msiexec" /qb /package "%cd%\%AppPath%%AppToRun%" ADMINCFG="%cd%\%CfgPath%%CfgFile%" @echo on 


And the whole thing with the help of the brainchild of Eugene Roshal is packaged in the SFX archive with the parameters:
 Path=%TEMP%\Nod32Install\ Setup=%TEMP%\Nod32Install\install.cmd Silent=1 Overwrite=1 


Thus, when double-clicking on the received binary, silent unpacking in% TEMP% \ Nod32Install \ occurs, install.cmd is launched, which starts the installation of ESET_NOD32_Antivirus_4 . 2.71.3_ (32-bit) _ (rus) .msi with settings from config.small.xml without asking anything from the user, but showing the installation process. For inexperienced users - the most it.




If you have any questions, but you can not leave comments on this post or write to me in a personal - write comments on this post.



Update: The post was rewritten on 02/09/2015, because its previous edition has lost its relevance to a greater extent

Update: 07/09/2016 The script was rewritten slightly less than full. If you used the old version earlier - I strongly recommend upgrading. Sources there are the same as always - on gita

Source: https://habr.com/ru/post/232163/


All Articles