Jump to content
Ketarin forum

shawn

Moderators
  • Posts

    1,181
  • Joined

  • Last visited

Posts posted by shawn

  1. No. The regexreplace example you've provided would replace an instance of // with the protocol and domain if it appears at the beginning of a string (//path/file.ext), but it would not replace anything if the text "//" doesn't appear.

  2. Feature request for a function that only prepends the text if a certain condition is met.

     

    For example, the parsed download for LicenseCrawler now includes the full domain. I imagine this will change shortly and return to just the relative path name. Instead of updating my app profile, I'd like to be able to prepend the protocol and domain name ONLY when a protocol and domain name aren't there.

     

    In context I imagine it would go something like this, the logic being presented as, "if '//' isn't included in the variable value, prepend the value with x". Note that since multiple instances of ":" are expected (especially for prepended text) everything after the first separator should be ignored.

     

     

    {download:prepend://:http://example.com}
  3. It sounds like you're wanting to effectively import the external files into the versioned structure supported by Ketarin.

     

    Currently Ketarin stores it's own version numbers for those apps it's downloaded and those that have been downloaded through an external downloader. The external file name is stored in the database as well, and is composed from the "save to file/folder" option on the Application tab. If you're using a standard destination file pattern that includes the version number then this is a pretty simple setup. I personally use this as my "save to file" structure:

     

    ..\{category}\{appname:regexreplace:([\s\t\r\n\-\\&\/]+):_}-{version}.{url:ext}

     

    Now, you could parse the version number from a remote source (assign it to a new variable named "version"), then use the pre-update script feature to parse for the destination file presence, and if it already exists return "exit 3", which means that an update has been performed "outside" (such as through an external downloader or from a local file repository). This could be done with something like this, if you're using the same destination pattern I am above:

     

     

    if exist "..\{category}\{appname:regexreplace:([\s\t\r\n\-\\&\/]+):_}-{version}.{url:ext}" exit 3

     

    This would work for you if your folder structure was based on categories and your file was named "D:\Tools\Winrar-4.20.rar", for example. If you don't want the category as part of the destination path and don't like the dash in the filename then you can tune those to your specific needs.

  4. Anyways: For using external downloaders Ketarins behaviour options are quite problematic, as any context menu options either force download (or at least check) of the download url or ignore the pre-download commands. So I either need a 'valid' download url (which I usually don't have) or the external downloader isn't called (pre-download commands are ignored). These aren't the best options...

     

    When using external downloaders, as long as the pre-update script exits properly, the download URL is never requested. If it does not exit then the download URL will be requested.

     

    You don't have to have a *valid* download URL when using an external downloader, just a download URL. You can use example.com/robots.txt and it'll be just as effective with an external downloader.

     

    This is likely a case where the code to check for the external download could be refactored. However, it would not be safe to simply assume that the pre-update script will necessarily perform an external download, and the logic to determine whether a download needs to be performed probably checks for a valid URL form within the download URL. Without which, Ketarin cannot perform the update operation, and thus the pre- and post-update scripts will never be called. In these cases, fluffing up the download URL with something like example.com/robots.txt is a small price to pay for the ability to use an external downloader via pre-update.

     

    Since external downloads are a very advanced feature, it's reasonable to assume that making note of the download URL precondition on the Wiki should be sufficient for these use cases. If someone wants to provide me with an account on the wiki (I don't see an option anywhere to sign up), I'd be happy to make this change.

  5. Here's an app profile that demonstrates the problem:

     

    <?xml version='1.0' encoding='utf-8'?>
    <Jobs>
      <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Guid="a30e2cce-3ab4-4069-8642-7f6dbf7119e1">
        <Category>Tools</Category>
        <WebsiteUrl />
        <UserAgent />
        <UserNotes />
        <IgnoreFileInformation>false</IgnoreFileInformation>
        <DownloadBeta>Default</DownloadBeta>
        <DownloadDate xsi:nil="true" />
        <CheckForUpdatesOnly>false</CheckForUpdatesOnly>
        <VariableChangeIndicator>version</VariableChangeIndicator>
        <CanBeShared>true</CanBeShared>
        <ShareApplication>false</ShareApplication>
        <ExclusiveDownload>false</ExclusiveDownload>
        <HttpReferer />
        <SetupInstructions />
        <Variables>
          <item>
            <key>
              <string>version</string>
            </key>
            <value>
              <UrlVariable>
                <RegexRightToLeft>false</RegexRightToLeft>
                <VariableType>RegularExpression</VariableType>
                <Regex>trimcheck v([\d\.]+)</Regex>
                <Url>https://github.com/CyberShadow/trimcheck/blob/master/README.md</Url>
                <Name>version</Name>
              </UrlVariable>
            </value>
          </item>
          <item>
            <key>
              <string>dl</string>
            </key>
            <value>
              <UrlVariable>
                <RegexRightToLeft>false</RegexRightToLeft>
                <VariableType>RegularExpression</VariableType>
                <Regex>"(trimcheck[^"]+exe)"</Regex>
                <Url>http://files.thecybershadow.net/trimcheck/</Url>
                <Name>dl</Name>
              </UrlVariable>
            </value>
          </item>
        </Variables>
        <ExecuteCommand />
        <ExecutePreCommand />
        <ExecuteCommandType>Batch</ExecuteCommandType>
        <ExecutePreCommandType>Batch</ExecutePreCommandType>
        <SourceType>FixedUrl</SourceType>
        <DeletePreviousFile>true</DeletePreviousFile>
        <Enabled>true</Enabled>
        <FileHippoId />
        <TargetPath>..\{category}\{appname:regexreplace:([\s\t\r\n\-\\&\/]+):_}-{version}.{url:ext}</TargetPath>
        <FixedDownloadUrl>http://files.thecybershadow.net/trimcheck/{dl}</FixedDownloadUrl>
        <Name>TrimCheck</Name>
      </ApplicationJob>
    </Jobs>

     

    In order to update it checks the value of the version variable against the readme file on github. Github imposes SSL via only

    TLS 1.2, TLS 1.1, and TLS 1.0 (per digicert). Since Github removed SSL3 support last October and Microsoft altered their TLS 1.0 support on Tuesday, the cypher support that Ketarin uses has been failing.

     

    It's possible that this is failing on every site that has removed SSL3 support and prioritizes a weak TLS 1.0 cypher.

  6. Try unchecking the box "ignore file information" on the advanced settings tab, or press CTRL+F5 ("force download") instead of simply running "update". Looks like you've got it set to only download when the version changes. This is a great option when you've got it working perfectly and you're NOT using an external downloader, but it greatly increases the difficulty of debugging.

  7. Seeing tons of these errors, "Could not create SSL/TLS secure channel", in the errors log (128 failed). Looks like each and every one that uses https since patch tuesday.

     

    Google suggests this may be an issue with the way Ketarin WebRequest object SecurityProtocol support. That is, in WebClient.cs, line 172 should be changed from this:

     

    ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls;

     

    To something like this:

     

    ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

     

    That should allow TLS 1.2 and 1.1, which are the currently preferred protocols.

  8. If you're going that route you can use WGET to download the files with POST in the pre-download command. Use something like this:

    wget -N --post-data="param1=value1&param2=value2&submit=Return" https://reliableanswers.com/asp/asptest.asp
    

    That page (reliableanswers.com) is one of my sites and you can use it to debug the specific query string and POST data you're playing with. Open it in a browser to see exactly how it operates. Note that from a WGet or other command-line interface it's CRITICAL that you include the parameter "submit=Return", otherwise it will simply ignore the passed data. Use generic text while testing, then change it to your user & license key and the destination URLs to what you need. You'll probably want to use something like this in the final result:

    wget -N
     --output-document="mybinaryfile.exe" 
     --no-check-certificate 
     --http-user="myusername" --http-password="mypassword" 
     --post-data="param1=value1&param2=value2"
     --referer=http://example.com/download.html
     http://example.com/download.zip
     1>>"error.log" 2>>"error.log"

    The various parameters allow you to set the output document filename, the ability to ignore SSL certificates (sometimes necessary unless you recompile WGet yourself), the ability to pass HTTP username & password, the actual post data, a referrer URL (sometimes necessary), and of course the actual download URL. The last line allows you to log the errors for later debugging use.

     

    Good luck!

  9. Click the "English" button on the right side and it'll translate automatically. Enter the target URL in the top field. Enter the parameter name and value pairs in the next two boxes, clicking 'add query field' for each new parameter set.

     

    Finally, click 'compute' and it'll generate the complete URL. Use the "server side" type URL as the DL link in Ketarin.

     

    Be aware that since this service is public and simple HTTP, any text or data you send (including email address and license codes) can be cached and stored anywhere between you and the POST URL, including at appspot.com and the code may be using it to harvest request information. Tread carefully.

  10. I'm afraid I can't answer that. I use FileHippo as infrequently as possible. All the apps I use on FileHippo work -- but I prefer to use original source whenever possible.

     

    I don't have the spare time to fiddle with finding these and creating my own instances to emulate the minimal information that you've provided. Debugging would be best if you provide the exact app profile (select it in the main Ketarin window, CTRL+C to copy, come here and click the 'code' button, paste (CTRL+V) into the code box. It'll paste the entire XML contents of the profile so we can accurately recreate your settings.

     

    FileHippo hasn't updated their engine to support the latest versions of Adobe Reader yet, though. The current major release versions of Adobe Reader are Adobe Reader DC 2015.007.20033 (2015.007.30033 for the "continuous" track). More on this here and here.

  11. I'll prefix this response by stating I'm a volunteer -- I have no stake in Ketarin/CDBurnerXP/Canneverbe other than my love of the software. I donate my own time (when I have any available) because I love it so much. Now back to my rant.

     

    I think you're seriously misrepresenting what Canneverbe is. They ("he", really) provide a free application, free source code and free hosting for their app and code. He also provides another free app, Ketarin, that allows its users to take advantage of a local cache. He's created other free apps, too, such as CSSTidy. If you've used CDBurnerXP, you know it's a free application and the only potential income from it is the interstitial during the install (via OpenCandy), which I very much doubt even completely offsets the costs of the infrastructure to distribute just the 2 applications, much less time and labor to develop them. More importantly, Canneverbe is really a one-man show by a guy that's still got a day job. You have the same number of ads on FossHub that exist on all of the Canneverbe sites combined.

     

    To the point, however, you should really take the opportunity to work with the users of applications like Ketarin. Ketarin ensures that we use the absolute minimal bandwidth necessary. Setup correctly (which can be accomplished with a clean template that is then shared for other Ketarin users to use), it only makes a single HTML request to your server on an irregular basis (though most of us run them every few days or on a weekly basis). If you were to opt to create your own template you could even code it so that it imposed various controls such as frequency limitations (perform IP throttling for matching query types, for example) thus imposing a relevant mechanism for users to avoid abusing your server. Ketarin allows version monitoring and tracking, which ensures that downloading the binary/release file is NOT undertaken unless it's necessary. Without that type of control you'll find people have to repeatedly download the same files, consuming way more bandwidth. Yes, if they visit the site they *might* actually click the ad, but people that use apps like Ketarin are *not* the type of people that are ever going to click the ads on your site. Quite the opposite, we're the people that, having dealt with the technical side of oh so many cleanups, we simply don't click ads at all. In fact, I would bet most of us are extremely careful even clicking the legitimate "download" links/buttons on most sites, first viewing the page source to ensure that it's "really" the download link. Ads suck, you know.

     

    The alternative solution for people that need a local cache, of course, is to throw something like HTTrack at it which will significantly increase your costs. When people want to find a way, they will. It's very unlikely that any rules you impose will prevent someone who really wants to get at your apps. You could opt to being a replacement for FileHippo, or you can continue to make things difficult for the very small community of techs that require the ability to easily collect or monitor release files for our organizations.

  12. My only current issue is the load time. I have Ketarin running with, I believe, a tiny jobs.db (1.8mb, ~550 current apps), but it takes fully 7 minutes before it loads. It's been this way for the last several builds. When I turn off the option to "check for updates in the online database" it loads immediately. But then I don't get the option for updated apps from the online db. There's no visual feedback, so I don't know if it's stalled/crashed, or whether it's actually checking the online database or if something completely different is happening. The lack of visual feedback (a progress bar) is probably the biggest issue.

     

    I suspect it's actually checking for each individual app from the online db one by one, which is creating a minimum of 500+ separate requests to the Ketarin site for checking them. I have a 100mb connection, so the issue is not on my end.

     

    I believe the best solution would be to query the server with the Guid and a GMT timestamp of the last mod to the app profile, then receive ONLY the profile names and Guid's of the modified apps in the response. At this point the user would then individually select (checklist) the specific apps they want to update and a second query would be sent to the server with the Guid and a flag to indicate to return the entire app profile. At this point it would overwrite those individual local profiles with the ones downloaded from the server.

     

    The drive is fine. I juggle multi-gb files to and from this drive all the time. SMART OK and all tests pass.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.