Ashus.ashus.net
ESET mirror update 2.0 - Printable Version

+- Ashus.ashus.net (https://ashus.ashus.net)
+-- Forum: My creations (https://ashus.ashus.net/forum-3.html)
+--- Forum: PHP scripts (https://ashus.ashus.net/forum-5.html)
+--- Thread: ESET mirror update 2.0 (/thread-114.html)

Pages: 1 2


ESET mirror update 2.0 - Ashus - 19.3.2010

This is a tool to create and keep your own ESET mirror update server up to date. You can use a valid purchased key and password or use a function to retrieve credentials automatically. This is an original work completely written by me.

Requirements:
PHP 5.4+/7, mod_curl, php_rar v2+ or unrar-free.

Installation:
Features include:

Current version is ready for download from here: https://github.com/Ashus/eset-mirror-update

Bash version is also available (but contains less features and isn't kept up to date).


Re: NOD32 linux mirror update 1.0 - Azadi - 30.3.2010

first of all, great work Smile

but it seems that ESET changed recently something in the update procedure, from March 26 on, the clients don't accept any updates any more from your script (both bash and php). Ok, they changed the URLs of the servers (e.g. from u18.eset.com to um18.eset.com) but obviously not only that...


Re: NOD32 linux mirror update 1.1 - Ashus - 1.4.2010

I'm using the PHP script successfully without any changes for the last half of a year. Apart from the URLs only thing they could have changed is checking for user agent or other HTTP headers / behaviour. It is always nicely debuggable with tcpdump/wireshark.

Edit: Okay I looked at the packets, try downloading the new version.


Re: NOD32 linux mirror update 1.1 - Crown - 14.4.2010

Hi there,
Huge Thank you for your work and support

Strange, but i'm having a little problem with your script...
Fatal error: Call to undefined function curl_init() in /home/crown/Desktop/eset3/nodupdate.php on line 95 ??? what a hell is this >? Smile
Please advice...


Re: NOD32 linux mirror update 1.1 - Ashus - 14.4.2010

Crown: Enable curl module in your php config.
http://www.php.net/manual/en/curl.setup.php


Re: NOD32 linux mirror update 1.1 - crown - 20.4.2010

Enabling curl_modules solved the problem...
With a help of this PHP or bash script a got a lot of files (~ 320 MB) in my local dir. what files do i really need ?

Before that I was using a php script without ID/PASS support, so the only way to update was donwloading files from unofficial update server, like http://www.zubikit.com/nod32/eset_upd.

Discription: I have a direct admin managed web page eset.hostingas.in. I've made a /alio dir for nod32 update source and using httaccess redirect to centralize nod32 update. I just need to enter http://eset.hostingas.in/alio to be ably update clients.. and its worked fine... It worked, actually it is works, but only for v3 updates, v4 have some update header check so old way does not work Sad

Sooo, other method was found ,with a help of google Big Grin a php script (http://www.4shared.com/account/file/qd9F6WMk/list.html) than can download from unofficial servers update files. i put it to alio3 dir. but the way it downloads files is messy and buggy, so every 2-5 time it mess all files so solution was to use alio2 dir for update with a cron job taking files from alio3 dir. (i need to be sure of alio3 files consistence before files really was transfered to alio2, couse sometimes alio3 was epmty so alio2 files as untouched, hopefully...)

So after using your script i got a lot of files on my computer, but i don't want every time make a synchronization/uploading to my web page alio2 dir. and even if i would want , i dont know which files to upload and where, because before "my old" script was automatically downloading this kind of list to alio2 dir:http://www.4shared.com/file/qd9F6WMk/list.html

With a help of this php or bash script a got a lot of files in my local dir. what files do i really need ?


QUESTION
I thin there is no way to handle this with directadmin, but maybe you can tell /advice me which variable to use for one dir local files storage that i can than resync with a help of ftp or sync software... to minimize upload traffic... and minimize human interaction in it.


Re: NOD32 linux mirror update 1.1 - JCMilleniuM - 2.5.2010

you rule! Thanks for this terrific script, Im running it right now on clearos (centos mod), I'll tell you if something goes wrong.
:lol:


Re: NOD32 linux mirror update 1.1 - crown - 2.5.2010

JCMilleniuM Wrote:you rule! Thanks for this terrific script, Im running it right now on clearos (centos mod), I'll tell you if something goes wrong.
:lol:

Hmm, it working for me ether, but i got ~320 MB of files, which files do i really need ?????? 25-30 mb is enough for update.


Re: NOD32 linux mirror update 1.1 - Ashus - 2.5.2010

Don't ask me what files are necessary, I just download the whole, so all kinds of clients (ESS, EAV 4, EAV 3) are happy.


Re: NOD32 linux mirror update 1.1 - johan - 6.1.2011

Hi there!

Got Centos 4.8 with PHP 5.1.6. With some modifications I got your script working(almost)
Firstly I had to change the shell exec from
Code:
unrar-free -x /tmp/file.rar /tmp/
to
Code:
unrar x /tmp/file.rar /tmp/

After that I discovered that curl didn't return any size information from curl_exec($ch);, so I used curl_getinfo($ch) instead and thereby don't have to mess around with preg_match().

Code:
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // resets direct FILE output
curl_setopt($ch, CURLOPT_URL, 'http://'.$eset_server.$upd_file);
$data = curl_exec($ch);
$info = curl_getinfo($ch);//get info

$time_modified = $info['filetime'];//file time
$size = $info['download_content_length'];//file lenght

The only problem left for me right now is that size_real is 0 for every file downloaded. Down in this case is $info['download_content_length'], and Real is the size on disk via php.
Code:
Launched: 2011-01-06 21:14:41
- trying to download http://89.202.157.227/eset_upd/update.ver
Successfully connected to server 89.202.157.227.
- downloading: /download/engine3/em000_32_l0.nup
0Warning: Filesize of /download/engine3/em000_32_l0.nup is different than expected, will be retried on next run. Down: 6865 Real: 0
- downloading: /download/engine3/em001_32_l0.nup
0Warning: Filesize of /download/engine3/em001_32_l0.nup is different than expected, will be retried on next run. Down: 6865 Real: 0
- downloading: /download/engine3/em001_32_l1.nup
0Warning: Filesize of /download/engine3/em001_32_l1.nup is different than expected, will be retried on next run. Down: 6865 Real: 0
- downloading: /download/engine3/em001_32_l2.nup
0Warning: Filesize of /download/engine3/em001_32_l2.nup is different than expected, will be retried on next run. Down: 6865 Real: 0
- downloading: /download/engine3/em001_32_n1.nup
0Warning: Filesize of /download/engine3/em001_32_n1.nup is different than expected, will be retried on next run. Down: 6865 Real: 0
- downloading: /download/engine3/em001_32_n2.nup


Any idea?