ClamWin Free Antivirus Forum Index
ClamWin Free Antivirus
Support and Discussion Forums
Reply to topic
Automatically update the executables...
wkossen


Joined: 12 Dec 2005
Posts: 9
Location: NL
Reply with quote
Hi,

Freshclam does a great job of updating the virusdatafiles, and it tells me when my engine is out of date. It doesn't however update the engine itself.

I wanted that to happen automatically as much as possible so i started writing a little batchfile to do that for me. The start is ready and available on http://clamwinupdate.sourceforge.net/ http://clamwinupdate.sourceforge.net/. I would like to receive some response on the batchfile and suggestions for improvement. If there are allready other means of doing this, let me know too!.

I hope the batchfile is useful, no garantees of course. Read the source if you're paranoid or interested...

I just love Clamwin!!

Willem Kossen
View user's profileSend private message
alch
Site Admin

Joined: 27 Nov 2005
Posts: 1751
Reply with quote
Willem,

that is great. I read through the script (haven't actually tried it yet but all seems right). We have been planning on using similar approach for autoupdating clamsin executables in version 2. If you have some time to spare and know C++ or C# youare welcome to join our team and be responsible for updater code. Please email me if you are interested.
View user's profileSend private message
Re:
wkossen


Joined: 12 Dec 2005
Posts: 9
Location: NL
Reply with quote
Hi,

Unfortunately i'm no programmer (apart from a little VB 5 in the past which isn't programming after all...) If i was, i'd done it in a proper lingo allready. I can make batches and scripts. There are a number of ideas in the batchfile that are good, also there are a number of problems.
good: Save location for updates (admins can use that for multiple updates and historical reference)
good: it actually works....
bad: If the site changes the update string is not recognized anymore. It would be a very good idea to have an URL which is fixed and fixed in format (in XML?) that always holds the currentversion. Than i would not have to update the script everytime the site changes....
bad: portability is bad. It only works on NTlike windows versions, not on 9x like versions (i don't actually know if clamwin will work on those???)
bad: external executables are needed. I would prefer to do all internally, but there are some limitations in batchfiles (of course it can be done, but it would be a hassle...)

If VB5 would be acceptable (which i doubt) i could have a go.... I prefer to help specify the updater engine and have an C expert code the actual tool..... Of course, for now I'm happy to keep the script working. I would like some more specific feedback of course.

Btw, i also manage another script for antivir free antivirus that is actually a bit further in developement. (antivirupdate.sourceforge.net)

Willem Kossen
View user's profileSend private message
Why not just parse the DOAP file?
micklweiss


Joined: 10 Dec 2005
Posts: 7
Reply with quote
Why not just parse the DOAP file? Thats what its for Razz

On start, grab the doap file from the web (if possible) - then parse it and get the latest version. If it doesn't match the current version, pull the newest one. If you feel that there is an overhead with the XML, then use the .ver file.

- Mick
View user's profileSend private message
doap and .ver
wkossen


Joined: 12 Dec 2005
Posts: 9
Location: NL
Reply with quote
Sounds great, where on the site do i find those files? www.clamwin.com/doap doesn't work, www.clamwin.com/.ver neither. More info, better script!

Thanks

Willem
View user's profileSend private message
DOAP / .Ver
micklweiss


Joined: 10 Dec 2005
Posts: 7
Reply with quote
http://clamwin.sourceforge.net/doap.rdf
http://clamwin.sourceforge.net/clamwin.ver

You may want to join us in #clamwin on freenode (since the replies will be a lot faster).

- Mick
View user's profileSend private message
alch
Site Admin

Joined: 27 Nov 2005
Posts: 1751
Reply with quote
http://clamwin.sourceforge.net/clamwin.ver

is not used by the software yet and may change or be removed. So it is better not to use it. DOAP is fine and will be updated with every next release.
View user's profileSend private message
implemented...
wkossen


Joined: 12 Dec 2005
Posts: 9
Location: NL
Reply with quote
Hi,

The doap and ver methods are both implemented. Doap default, the original site method and ver selectable in the batchfile if ever there is a doap problem (there won't?)

I tidied up the code with more comments for easy readability and transparancy. I hope this helps

Cleanup now also removes the directory from the temporary path...

Have a go and please provide feedback.

Thanks for the tips

Willem kossen
View user's profileSend private message
Doap Question
wkossen


Joined: 12 Dec 2005
Posts: 9
Location: NL
Reply with quote
The doap idea appeals to me. How do you maintain it? I would like to use something similar for my little batchfiles...

Thanks

Willem Kossen
View user's profileSend private message
Important update to clamwinupdate
wkossen


Joined: 12 Dec 2005
Posts: 9
Location: NL
Reply with quote
Now most of the new code actually works.

v0.3 fixes a number of errors while greatly improving usability.

Willem
View user's profileSend private message
alch
Site Admin

Joined: 27 Nov 2005
Posts: 1751
Reply with quote
thanks, will give it a go. doap files we edit manually for the time being.
View user's profileSend private message
another update
wkossen


Joined: 12 Dec 2005
Posts: 9
Location: NL
Reply with quote
Released v0.4 on the project site for clamwinupdate
- multilingual
- better supporttools use and updates
- simple updatecheck mechanism
- better documentation
- some improvements on security (verify sigs and scan downloads for viruses)
(note that this is marginal since the asc and sig file come from the same source....)
- some minor fixes and updates

For now the speed of updates will decrease

All prio one functionality is implemented in version 0.4

Suggestions are welcome (i still have a todo list, but that can be added to)

Willem
View user's profileSend private message
DGM


Joined: 26 Dec 2006
Posts: 57
Location: Indianapolis, Indiana
Reply with quote
this is a must
View user's profileSend private message
Automatically update the executables...
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic