Re: [Bug-wget] info wget: some improvement proposals on the documentation-content
Thank you, Kalle ! We'll go through the docs soon and amend them. On 08/26/2018 10:08 AM, kalle wrote: > hello, > here my proposals: > > chapter 2, part "download all the URLs specified": make it clearer, what > that exactly means in relationship to URLs describing a directory. Is > the whole fs beneath downloaded? or only the file 'index.html' in it? > > chapter 2.1: you mention, that it would be a security risk to write out > the password in the commandline. But you don't mention here, that a > transfer over the internet of a non-encrypted URL containing the > password would be risky too. > > ch.2.1: why isn't https mentioned? It appears in ch 2.5, though... > > ch. 2.3, option '-nc', part "local file will be 'clobbered', or > overwritten,": replace the last part with "be 'clobbered' (which means > overwritten)". I suppose that , since 'clobbering' means something like > 'destroying', you don't need to write "be 'clobbered' (which means > overwritten or that the newly downloaded file is saved under another > name than the local one)" > > ch. 2.3, option '-nc', part "will refuse to download newer copies of > 'FILE'": the usage of 'newer copies' is ambiguous here. it could be, > that the server-side file has been renewed, but probably it just > means,that it will not download the same file another time and give it > another name." > > ch. 2.3, option '-nc': if '--no-clobbering' is a misnaming as is said in > the part "actually a misnomer in this mode", why isn't it changed? One > could keep '-nc' for compatibility reasons, and forge aa new option > name..., e.g. '-nn / --no-new' > > > part 'of the character's ASCII value' -> add '(see ascii(7))' for reference. > > ch. 2.4, replace the 'href="URL">'s with 'href="BASE-URL">'. There is > one in '-i' and one in '-F'. > > ch. 2.5, option '-c', part "really a valid prefix": I find the use of > prefix not very understandable. I would rather write "Wget has no way of > veryfying that the local file is the beginning part of the remote file". > > ch.2.5, '--bind-address': I don't understand the meaning of the word > 'bind' in the formulation "bind to ADDRESS" > > greetings,kalle > signature.asc Description: OpenPGP digital signature
[Bug-wget] info wget: some improvement proposals on the documentation-content
hello, here my proposals: chapter 2, part "download all the URLs specified": make it clearer, what that exactly means in relationship to URLs describing a directory. Is the whole fs beneath downloaded? or only the file 'index.html' in it? chapter 2.1: you mention, that it would be a security risk to write out the password in the commandline. But you don't mention here, that a transfer over the internet of a non-encrypted URL containing the password would be risky too. ch.2.1: why isn't https mentioned? It appears in ch 2.5, though... ch. 2.3, option '-nc', part "local file will be 'clobbered', or overwritten,": replace the last part with "be 'clobbered' (which means overwritten)". I suppose that , since 'clobbering' means something like 'destroying', you don't need to write "be 'clobbered' (which means overwritten or that the newly downloaded file is saved under another name than the local one)" ch. 2.3, option '-nc', part "will refuse to download newer copies of 'FILE'": the usage of 'newer copies' is ambiguous here. it could be, that the server-side file has been renewed, but probably it just means,that it will not download the same file another time and give it another name." ch. 2.3, option '-nc': if '--no-clobbering' is a misnaming as is said in the part "actually a misnomer in this mode", why isn't it changed? One could keep '-nc' for compatibility reasons, and forge aa new option name..., e.g. '-nn / --no-new' part 'of the character's ASCII value' -> add '(see ascii(7))' for reference. ch. 2.4, replace the 'href="URL">'s with 'href="BASE-URL">'. There is one in '-i' and one in '-F'. ch. 2.5, option '-c', part "really a valid prefix": I find the use of prefix not very understandable. I would rather write "Wget has no way of veryfying that the local file is the beginning part of the remote file". ch.2.5, '--bind-address': I don't understand the meaning of the word 'bind' in the formulation "bind to ADDRESS" greetings,kalle
Re: [Bug-wget] Info wget
Daniele Dinaro writes: > the form is this: > >> http://www.armaholic.net/downloader.php?download_file=chili/addons/units/BTC-Militia-version-1.1.7z >> "> >> >> >> >> What is two plus two? >> >> >> >> > > > I have write this command for my .bat file > >> %WGET% --http-user=Mozilla/5.0 --save-cookies=cookies.txt >> --keep-session-cookies --header="Content-Type: >> application/x-www-form-urlencoded" -c --no-check-certificate >> --post-data=--post-data="captcha=I am a human^!&x=3910CD8F" -c >> http://www.armaholic.net/downloader.php?download_file=chili/addons/units/BTC-Militia-version-1.1.7z Here are suggestions that I can think of: I many cases, web sites that use "form method=post" will also accept "form method=get", that is, using "?" to add values to the URL. It is much easier to use wget to do that: wget 'http://www.armaholic.net/downloader.php?download_file=chili/addons/units/BTC-Militia-version-1.1.7z?x=3910CD8F&super=4&captcha=I%20am%20a%20human!submit=Click%20to%20download%20%3dBTC%3d%20Militia' Check that you have included all of the field values that you need to include. It appears to me that your wget command does not provide values for 'super' and 'submit' fields. (Yes, the submit button is a field whose value is transmitted, that's how the server knows which submit button in the form was pressed.) Check that you have properly encoded the values of the values. I don't know the details of the rules myself, but I see that the MIME type is x-www-form-urlencoded, which suggests that any character that is special in a URL must be represented with %hh. In this case, spaces and "=" appear in your values. I see that your command includes: >> --post-data=--post-data="captcha=I am a human^!&x=3910CD8F" -c But there shouldn't be two "--post-data" items; the second one is part of the *value* of the post-data option! Is there a simpler form that you can use for practice? For instance, can you write a wget to fetch a Google search? There is a "^" before the "!". If this isn't needed as an escape character in .bat files, it should be removed, as it isn't part of the value you want. Given that the fetch is not HTTPS, you can use wireshark, tcpdump, or other networking monitoring tools to examine the packets when you click the submit button on your browser. That will show exactly how your browser makes the request, and you can copy that. Similarly, you can see how wget sends the request, and adjust your command line appropriately. Or use "wget --debug" to see the request that wget sends. Dale
Re: [Bug-wget] Info wget
Hi, you could use the developer tools from Firefox to see what exactly Firefox sends when it answers with the expected content. With that it should be pretty easy to tune your .bat file. Use -d with wget to see what wget sends. Regards, Tim On Thursday, October 27, 2016 3:23:20 AM CEST Daniele Dinaro wrote: > Hello, > I have a question about using wget. Now I am days that I can not all in > vain, my aim is to download a file from a website that is generated through > a form. > > For example the site is this: http://www.armaholic.com/page.php?id=30431 > > To the bottom of the page there is the link for download, is a simple > "submit" button belonging to the form that will attract directed, via the > "action" this address: " > http://www.armaholic.net/downloader.php?download_file=chili/addons/units/BTC > -Militia-version-1.1.7z " > > the form is this: > > http://www.armaholic.net/downloader.php?download_file=chili/addons/units/B > > TC-Militia-version-1.1.7z "> > > > > > > > > What is two plus two? > > > > > > > > > > I have write this command for my .bat file > > > %WGET% --http-user=Mozilla/5.0 --save-cookies=cookies.txt > > --keep-session-cookies --header="Content-Type: > > application/x-www-form-urlencoded" -c --no-check-certificate > > --post-data=--post-data="captcha=I am a human^!&x=3910CD8F" -c > > http://www.armaholic.net/downloader.php?download_file=chili/addons/units/B > > TC-Militia-version-1.1.7z > I hope you manage to help me, I have not slept in days. > > Thank you signature.asc Description: This is a digitally signed message part.
[Bug-wget] Info wget
Hello, I have a question about using wget. Now I am days that I can not all in vain, my aim is to download a file from a website that is generated through a form. For example the site is this: http://www.armaholic.com/page.php?id=30431 To the bottom of the page there is the link for download, is a simple "submit" button belonging to the form that will attract directed, via the "action" this address: " http://www.armaholic.net/downloader.php?download_file=chili/addons/units/BTC-Militia-version-1.1.7z " the form is this: > http://www.armaholic.net/downloader.php?download_file=chili/addons/units/BTC-Militia-version-1.1.7z > "> > > > > What is two plus two? > > > > I have write this command for my .bat file > %WGET% --http-user=Mozilla/5.0 --save-cookies=cookies.txt > --keep-session-cookies --header="Content-Type: > application/x-www-form-urlencoded" -c --no-check-certificate > --post-data=--post-data="captcha=I am a human^!&x=3910CD8F" -c > http://www.armaholic.net/downloader.php?download_file=chili/addons/units/BTC-Militia-version-1.1.7z I hope you manage to help me, I have not slept in days. Thank you