Linux: getting the correct license file for AntiVir
Posted by jpluimers on 2014/04/29
I needed AntiVir on an openSUSE workstation.
Too bad the default installation package from YaST installed an old license: AntiVir would not work, and I was getting emails like these at regular intervals:
<br />Date: Thu, 25 Apr 2014 08:57:11 +0200<br />From: Cron Daemon <root@....><br />To: root@....<br />Subject: Cron <root@...> /usr/lib/AntiVir/guard/avupdate-guard --product=Scanner > /dev/null<br /><br />Error: No valid license was found<br />
After searching the web for a while, I found a lot of posts with wrong information, basically coming down to these 2:
- the key file was supposed to be
hbedv_key(wrong: it ishbedv.key) - the key file download is
http://dlce.antivir.com/down/windows/hbedv.key
(wrong, the file there still exists but is from july 25, 2011; the correct file is now athttp://personal.avira-update.com/package/peclkey/win32/int/hbedv.key
At the bottom of the post, you will find a small shell script that I use to keep the hbedv.key up-to-date.
First some more about HBEDV, then how I found about the new download location, and a command to show you the current license information.
- EDV is the German TLA for the English word for Electronic data processing, and is usually a synonym for IT.
- HB stands for Home Business.
- Avira (the mother company of AntiVir) owns the HbEdv.com domain (www.hbedv.com works, but note that hbedv.com does not work).
Antivir Download locations
From the plethora of links at Avira Download Center, I finally reached the Download Avira Free Antivirus page at http://www.avira.com/en/download/product/avira-free-antivirus.
There you find links to the unix download (marked as ZIP, though it is a .tar.gz file) and the download for the key.
The key is now at http://personal.avira-update.com/package/peclkey/win32/int/hbedv.key
Getting hbedv.key license information
avlinfo can get you the information from the license, and tells you where the license on your system is stored, here is an example of the expired installation key.
Without parameters, it will list the installed key (and location!)
You can specify both a directory (it will search for hbedv.key in that directory) or filename to get the information from that file.
<br />snap:~/bin # avlinfo<br />==============================<br />Key file: /usr/bin/../lib/AntiVir/guard/hbedv.key<br /><br />Product : Avira AntiVir Personal (Windows-NT)<br />Serial #: 0000149996-ADJIE-0000001<br />Expires : 2.1.2013<br />User : Avira AntiVir Personal - Free Antivirus<br /><br />Product : Avira AntiVir Personal (Unix)<br />Serial #: 0000149996-PXWSE-0000001<br />Expires : 2.1.2013<br />User : Avira AntiVir Personal - Free Antivirus<br />
Making the install process easier
Though I do *nix administration, it is not my day-to-day job, so programming the shell isn’t either.
I try to create scripts making my job as simple as possible, so I do create scripts for repetitive work as much as possible.
Some notes reminders for myself:
- mkdir -p will create a directory if does not yet exist.
-
wget can do web downloads, and assumes the current directory as default download target.
The -q options makes the output quiet (wget normally is very chatty)
The –mirror option will mirror a complete directory tree localy, and keep the time stamps
The –no-parent option makes sure you only get files from the downloaded directory and deeper. - ls –full-time will show the full time from ls (normally, it will show time details for younger files, and date details for older files).
- I always get confused with testing for existence. sh is complex (:
Maybe test -e isn’t the best way, but it works to check for file existence. -
diff compares two (binary or text files) and has a resulting exit code depending on the outcome:
- ?$ is the exit code of the previous command
bash – What does if [ $? -eq 0 ] mean for shell scripts? – Stack Overflow. - Introduction to if.
- The Linux Documentation Project.
- pushd and popd push and pop the current directory. A kind of cd on steroids with history.
Here is the script:
<br />#! /bin/sh<br /><br />HbedvKey=hbedv.key<br />## Old location: 2011-07-25<br />##HbedvKeyDownloadPath=dlce.antivir.com/down/windows/$HbedvKey<br />## New location: changed somwehere in 2012?<br />HbedvKeyDownloadPath=personal.avira-update.com/package/peclkey/win32/int/$HbedvKey<br />HttpHbedvKeyDownloadPath=http://$HbedvKeyDownloadPath<br />UsrLibAntivirGuard=/usr/lib/AntiVir/guard<br />UsrLibAntivirGuardNew=$UsrLibAntivirGuard/new<br />UsrLibAntivirGuardHbedvKey=$UsrLibAntivirGuard/$HbedvKey<br />UsrLibAntivirGuardNewHbedvKey=$UsrLibAntivirGuardNew/$HbedvKeyDownloadPath<br /><br />echo "$HttpHbedvKeyDownloadPath"<br />echo "$UsrLibAntivirGuardHbedvKey"<br />echo "$UsrLibAntivirGuardNewHbedvKey"<br /><br />mkdir -p $UsrLibAntivirGuardNew<br /># -p: create if it does not exist<br /><br />pushd $UsrLibAntivirGuardNew<br /><br />wget -q --mirror --no-parent $HttpHbedvKeyDownloadPath<br />ls --full-time $UsrLibAntivirGuardNewHbedvKey<br /><br />if (test -e $UsrLibAntivirGuardNewHbedvKey)<br />then<br /><br /><%%KEEPWHITESPACE%%> diff $UsrLibAntivirGuardHbedvKey $UsrLibAntivirGuardNewHbedvKey<br /><%%KEEPWHITESPACE%%> # diff exit status 0: same; 1: different; 2: trouble<br /><br /><%%KEEPWHITESPACE%%> if [ "$?" -ne "0" ]<br /><%%KEEPWHITESPACE%%> then<br /><%%KEEPWHITESPACE%%> # if $UsrLibAntivirGuardNewHbedvKey does not exist, or $UsrLibAntivirGuardHbedvKey is different from $UsrLibAntivirGuardNewHbedvKey<br /><br /><%%KEEPWHITESPACE%%> echo "There is a $UsrLibAntivirGuardNewHbedvKey file that you might want to update into $UsrLibAntivirGuardHbedvKey"<br /><%%KEEPWHITESPACE%%> echo ""<br /><%%KEEPWHITESPACE%%> echo "Current key"<br /><%%KEEPWHITESPACE%%> avlinfo $UsrLibAntivirGuardHbedvKey<br /><%%KEEPWHITESPACE%%> echo ""<br /><%%KEEPWHITESPACE%%> echo "Downloaded key"<br /><%%KEEPWHITESPACE%%> avlinfo $UsrLibAntivirGuardNewHbedvKey<br /><%%KEEPWHITESPACE%%> fi<br /><br />fi<br />popd<br />
A few more links for my memory:
- Windows download:
will start web bootstrap EXE download when web page losds
http://www.avira.com/en/download-start/product/avira-free-antivirus
- More versions:
http://www.avira.com/en/download/product/avira-free-antivirus - Web bootstrap for Windows
http://personal.avira-update.com/package/webloader/win32/pecl/avira_free_antivirus.exe
http://personal.avira-update.com/package/webloader/win32/pecl/avira_free_antivirus.zip - Administrtive download for off-line install
http://personal.avira-update.com/package/wks_avira13/win32/en/pecl/avira_free_antivirus_en.exe
http://personal.avira-update.com/package/wks_avira13/win32/en/pecl/avira_free_antivirus_en.exe - Linux
http://premium.avira-update.com/package/wks_avira/unix/en/pers/antivir_workstation-pers.tar.gz - Key
2012-10-01T06:52:37.00Z
http://personal.avira-update.com/package/peclkey/win32/int/hbedv.key - PDF documentation
http://www.avira.com/documents/products/pdf/en/man_avira_free_antivirus_en.pdf - Old key
2011-07-25T08:37:27.00Z
http://dlce.antivir.com/down/windows/hbedv.key
–jeroen






Linux: no more correct license file for AntiVir « The Wiert Corner – irregular stream of stuff said
[…] A short while ago, I wrote about Linux: getting the correct license file for AntiVir. […]
Gustavo Carreno said
Hummmm, let me rephrase:
This post is quite good, but for some strange reason all your <code> is full of HTML tags.
Gustavo Carreno said
This post is quite good, but for some strange reason all your
is full of HTML tags.