bitznpcz Posted February 15, 2018 Report Share Posted February 15, 2018 I've used the attached to dowload Abobe Acrobat Reader DC updates, but this time the version numbers for the full release and update are different. e.g. the full release is AcroRdrDC1801120035_en_US.exe but the update is AcroRdrDCUpd1801120036.msp Is there a better way to download the updates if this happens again? Thanks, Kevin AcrobatUpdateDC.xml Link to comment Share on other sites More sharing options...
shawn Posted February 15, 2018 Report Share Posted February 15, 2018 This is not the first time and won't be the last time. Because of that, this is actually one of those that I dig thru the FTP server to find direct links to. Adobe does a horrible job of making this easy. Step one is to parse this page for the espoused version of the current release notes (parse for DC/continuous[^()]+?\(([\d\.]+x?)\) ): https://helpx.adobe.com/acrobat/release-note/release-notes-acrobat-reader.html Step two is to use that to pull the folder from here, replacing all the periods with nothing and the the x with \d to perform a regex match as "versionshort": ftp://ftp.adobe.com/pub/adobe/reader/win/AcrobatDC/ Step three is to parse for either the msp (update file) or the exe (installer) from here, where the language is one of de_DE, en_US, es_ES, fr_FR or ja_JP, and the msp you want is the one without an underscore ("Acr[^\_\s\r\n\t]+msp") unless you're using a non-standard language, then you need both msp's: ftp://ftp.adobe.com/pub/adobe/reader/win/AcrobatDC/{versionshort}/ Download them using this URL pattern: https://download.adobe.com/pub/adobe/reader/mac/AcrobatDC/{versionshort}/{filename} Here's the rub. The worst part in this entire process is that FTP servers can't be handled directly within Ketarin parsing routines, so I had to setup an HTTP to FTP gateway on one of my servers to return the results as text so this information can be parsed -- and that's why I'm not just sharing an app xml with everyone. The FTP gateway is just a PHP file that converts various input parameters to an FTP request using standard PHP functions. If I were to share this then my server would quickly be abused as an FTP gateway for all sorts of evil, and that's just not going to happen. Here's the PHP file I'm using for this: <?php header("Content-Type: text/plain"); $server = $_GET["s"]; if($server==""){die();} $port = $_GET["p"]; if($port==""){$port = 21;} //$port = intval($port); $dir = $_GET["d"]; if($dir==""){$dir = "/";} // connect $ftp = ftp_connect( $server, $port ); if (!$ftp) die('could not connect.'); //echo("cnx ok\n"); // login $res = ftp_login( $ftp, "anonymous", "" ); if (!$res) die('could not login.'); //echo("login ok\n"); // enter passive mode $res = ftp_pasv( $ftp, true ); if (!$res) die('could not enable passive mode.'); //echo("pasv ok\n"); // get listing $res = ftp_chdir( $ftp, $dir ); // change directory //$res = ftp_nlist($ftp, '-a'); // simple file listing $res = ftp_rawlist( $ftp, '-a'); if(is_null($res)){ $res = ftp_rawlist( $ftp, "." ); } //echo($res); echo(implode("\r\n", $res)); //print_r($res); //var_dump($res); A gated request to the first file would look like this: https://example.com/myftpgateway.php?s=ftp.adobe.com&d=/pub/adobe/reader/win/AcrobatDC/&p=21 And the versioned request would look like this: https://example.com/myftpgateway.php?s=ftp.adobe.com&d=/pub/adobe/reader/win/AcrobatDC/{versionshort}/&p=21 The output is simple text (which may look funky in a browser but will parse fine by Ketarin). It would look something like this: drwxrwxr-x 29 ftp ftp 750 Feb 12 11:49 . drwxrwxr-x 16 ftp ftp 332 Feb 07 07:05 .. drwxrwxr-x 2 ftp ftp 2583 Apr 06 2015 1500720033 drwxrwxr-x 2 ftp ftp 327 Jul 14 2015 1500820082 drwxrwxr-x 2 ftp ftp 429 Oct 13 2015 1500920069 drwxrwxr-x 2 ftp ftp 194 Oct 29 2015 1500920077 drwxrwxr-x 2 ftp ftp 194 Nov 25 2015 1500920079 drwxrwxr-x 2 ftp ftp 429 Jan 12 2016 1501020056 drwxrwxr-x 2 ftp ftp 194 Feb 16 2016 1501020059 drwxrwxr-x 2 ftp ftp 429 Mar 08 2016 1501020060 drwxrwxr-x 2 ftp ftp 429 May 10 2016 1501620039 drwxrwxr-x 2 ftp ftp 194 May 19 2016 1501620041 drwxrwxr-x 2 ftp ftp 194 Jun 02 2016 1501620045 drwxrwxr-x 2 ftp ftp 327 Jul 12 2016 1501720050 drwxrwxr-x 2 ftp ftp 92 Aug 02 2016 1501720053 drwxrwxr-x 2 ftp ftp 327 Oct 11 2016 1502020039 drwxrwxr-x 2 ftp ftp 92 Nov 03 2016 1502020042 drwxrwxr-x 2 ftp ftp 327 Jan 10 2017 1502320053 drwxrwxr-x 2 ftp ftp 92 Jan 19 2017 1502320056 drwxrwxr-x 2 ftp ftp 327 Feb 21 2017 1502320070 drwxrwxr-x 2 ftp ftp 327 Apr 11 2017 1700920044 drwxrwxr-x 2 ftp ftp 92 Jul 11 2017 1700920058 drwxrwxr-x 2 ftp ftp 327 Aug 08 2017 1701220093 drwxrwxr-x 2 ftp ftp 92 Aug 11 2017 1701220095 drwxrwxr-x 2 ftp ftp 92 Aug 29 04:58 1701220098 drwxrwxr-x 2 ftp ftp 327 Nov 14 05:53 1800920044 drwxrwxr-x 2 ftp ftp 92 Nov 29 11:23 1800920050 drwxrwxr-x 2 ftp ftp 327 Feb 12 11:34 1801120036 drwxrwxr-x 2 ftp ftp 183 Jul 14 2015 misc That's why you're parsing for "18.011.2003x" and changing it to a regex for "180112003\d". Good luck! Link to comment Share on other sites More sharing options...
floele Posted February 15, 2018 Report Share Posted February 15, 2018 Oh you need a bridge for that? Consider it done in the next version of Ketarin Link to comment Share on other sites More sharing options...
bitznpcz Posted February 16, 2018 Author Report Share Posted February 16, 2018 Many thanks floele for the very detailed reponse - I'll have a look a look into your suggestions. Link to comment Share on other sites More sharing options...
floele Posted February 16, 2018 Report Share Posted February 16, 2018 You need to thank @shawn Link to comment Share on other sites More sharing options...
shawn Posted February 17, 2018 Report Share Posted February 17, 2018 fantastic, @floele! thank you! Link to comment Share on other sites More sharing options...
bitznpcz Posted February 25, 2018 Author Report Share Posted February 25, 2018 On 2/16/2018 at 5:54 PM, floele said: You need to thank @shawn Sorry @shawn ;-) Many thanks for your response! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now