tankdthedruid

getVersion.ftp.sh

Jan 29th, 2012
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.62 KB | None | 0 0
  1. #!/bin/bash
  2. #============================================================
  3. #
  4. #          FILE:  getVersion.ftp.sh
  5. #
  6. #         USAGE:  ./getVersion.ftp.sh
  7. #
  8. #   DESCRIPTION:  Current version retrieval tool for various
  9. #                 FTP client and server software.
  10. #
  11. #       OPTIONS:  ---
  12. #  REQUIREMENTS:  ---
  13. #          BUGS:  ---
  14. #         NOTES:  This is a local Database updating tool.
  15. #        AUTHOR:  tankd, retardedolphin
  16. #       COMPANY:  ---
  17. #       VERSION:  1.0
  18. #       CREATED:  10/28/12 17:42:08 PST
  19. #      REVISION:  ---
  20. #============================================================
  21.  
  22. # Parse FileZilla URL for current version. [DEPRECATED]
  23. # 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]+'
  24. # 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]+')
  25.  
  26. # New way
  27. # 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]+'
  28. # 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]+')
  29.  
  30. #FileZilla
  31. 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]+')
  32.  
  33. #proftpd
  34. PROFTPD_VER=$(curl http://www.proftpd.org/ | grep -E --only-matching --max-count=1 '[0-9]+\.[0-9]+\.[0-9a-z]+')
  35.  
  36. #ALFTP
  37. ALFTP_VER=$(curl http://www.altools.com/ALTools/ALFTP/Version-History.aspx | grep -E --only-matching '[0-9]+\.[0-9]' | sort -n |tail -1)
  38.  
  39. #Apache FTP Server
  40. 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)
  41.  
  42. #CrushFTP Server
  43. CrushFTP_SERVER_VER=$(curl http://www.crushftp.com/download.html | grep -E --only-matching '[0-9]+\.[0-9]+\.[0-9]' | sort -n |tail -1)
  44.  
  45. #glFTPd
  46. glFTPd_VER=$(curl http://www.glftpd.dk/ | grep -E --only-matching '[a-z0-9]+\.[0-9]+[0-9]' | sort -n |tail -1)
  47.  
  48. # Display Version Information
  49. echo "###Graphical FTP###"
  50. echo
  51. echo FileZilla - $FILEZILLA_VER
  52. echo
  53. echo
  54. echo "###Console/terminal-based FTP###"
  55. echo
  56. echo
  57. echo ALFTP - $ALFTP_VER
  58. echo
  59. echo Apache_FTP_server - $APACHE_FTP_SERVER_VER
  60. echo
  61. echo CrushFTP_SERVER - $CrushFTP_SERVER_VER
  62. echo
  63. echo glFTPd - $glFTPd_VER
  64. echo
  65. echo Proftpd - $PROFTPD_VER
  66. echo
  67.  
  68. #EOF
Advertisement
Add Comment
Please, Sign In to add comment