Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #============================================================
- #
- # FILE: getVersion.ftp.sh
- #
- # USAGE: ./getVersion.ftp.sh
- #
- # DESCRIPTION: Current version retrieval tool for various
- # FTP client and server software.
- #
- # OPTIONS: ---
- # REQUIREMENTS: ---
- # BUGS: ---
- # NOTES: This is a local Database updating tool.
- # AUTHOR: tankd, retardedolphin
- # COMPANY: ---
- # VERSION: 1.0
- # CREATED: 10/28/12 17:42:08 PST
- # REVISION: ---
- #============================================================
- # Parse FileZilla URL for current version. [DEPRECATED]
- # curl http://filezilla-project.org/ | grep -E --max-count=1 '[0-9][0-9][0-9][0-9]\-[0-9].+\-[0-9].+' | grep -E --only-matching '[0-9]+\.[0-9]+\.[0-9]+'
- # VERSION=$(curl http://filezilla-project.org/ | grep -E --max-count=1 '[0-9][0-9][0-9][0-9]\-[0-9].+\-[0-9].+' | grep -E --only-matching '[0-9]+\.[0-9]+\.[0-9]+')
- # New way
- # curl http://filezilla-project.org/newsfeed.php | grep -E --max-count=1 --after-context=1 '\<entry\>' | sed 's/[<]entry[>]//g' | grep -E --only-matching '[0-9]+\.[0-9]+\.[0-9]+'
- # FILEZILLA_VER=$(curl http://filezilla-project.org/newsfeed.php | grep -E --max-count=1 --after-context=1 '\<entry\>' | sed 's/[<]entry[>]//g' | grep -E --only-matching '[0-9]+\.[0-9]+\.[0-9]+')
- #FileZilla
- FILEZILLA_VER=$(curl http://filezilla-project.org/newsfeed.php | grep -E --max-count=1 --after-context=1 '\<entry\>' | sed 's/[<]entry[>]//g' | grep -E --only-matching '[0-9]+\.[0-9]+\.[0-9]+')
- #proftpd
- PROFTPD_VER=$(curl http://www.proftpd.org/ | grep -E --only-matching --max-count=1 '[0-9]+\.[0-9]+\.[0-9a-z]+')
- #ALFTP
- ALFTP_VER=$(curl http://www.altools.com/ALTools/ALFTP/Version-History.aspx | grep -E --only-matching '[0-9]+\.[0-9]' | sort -n |tail -1)
- #Apache FTP Server
- APACHE_FTP_SERVER_VER=$(curl http://mina.apache.org/ftpserver/downloads.html | grep -E --only-matching '[0-9]+\.[0-9]+\.[0-9]' | sort -n |tail -1)
- #CrushFTP Server
- CrushFTP_SERVER_VER=$(curl http://www.crushftp.com/download.html | grep -E --only-matching '[0-9]+\.[0-9]+\.[0-9]' | sort -n |tail -1)
- #glFTPd
- glFTPd_VER=$(curl http://www.glftpd.dk/ | grep -E --only-matching '[a-z0-9]+\.[0-9]+[0-9]' | sort -n |tail -1)
- # Display Version Information
- echo "###Graphical FTP###"
- echo
- echo FileZilla - $FILEZILLA_VER
- echo
- echo
- echo "###Console/terminal-based FTP###"
- echo
- echo
- echo ALFTP - $ALFTP_VER
- echo
- echo Apache_FTP_server - $APACHE_FTP_SERVER_VER
- echo
- echo CrushFTP_SERVER - $CrushFTP_SERVER_VER
- echo
- echo glFTPd - $glFTPd_VER
- echo
- echo Proftpd - $PROFTPD_VER
- echo
- #EOF
Advertisement
Add Comment
Please, Sign In to add comment