i set up alarms on their output. for instance, i would run a "wget" on a url and then search for certain strings within the output given by the "wget".
the problem is, i cant get the entire output or response of my wget/curl command to show up correctly in the Nagios GUI.
this is because there are a variety of characters that confuses the GUI. these characters include but aren't limited to: /\[]^& etc. i guess the term for them is "metacharacters".
how can I force it so that ALL ouput produced by a wget or curl is actually shown, down to the very last character?
i.e. for example, the below is the most basic example i can show as to what i want:
I would like to be able to show everything that is outputted by the wget, in the format that it was outputted.
We are trying to invoke a https service from our unix script using curl command. The service is not getting invoked because it is SSL configured. Bypassing certification (using curl –k) does not work.
curl -k https://site
curl -k -x IP:Port https://site
curl -k -x IP:443 https://id:pwd@site
... (0 Replies)
Hi,
I'm trying to write a script to download RedHat's errata digest.
It comes in a txt.gz format, and i can get it easily with firefox.
HOWEVER: output is VERY strange when donwloading it in a script. It seems I'm getting a file of the same size - but partially text and partly binary! It... (5 Replies)
Hello,
I am wondering does anyone know of a method using curl/wget or other where by I could specify the IP address of the server I wish to query for a website.
Something similar to editing /etc/hosts but that can be done directly from the command line. I have looked through the man pages... (4 Replies)
Hi
I need a Shell script that will download a zip file every second from a http server but i can't use neither curl nor wget.
Can anyone will help me go about this task ???
Thanks!! (1 Reply)
Hi,
My script needs to crawl the data from a third party site. Currently it is written in wget. The third party site is of shared interface with different IP addresses.
My wget works with all the IP address but not with one. Whereas the curl is able to hit that IP address and comes out... (2 Replies)
Experts,
I login to a 3rd party and pull some valuable information with my credentials. I pass my credentials via --post-data in wget.
Now my Account is locked. I want my wget to alert that the Account is locked. How can i achieve this.
My idea is, get the Source page html from the... (2 Replies)
Hello,
What I am trying to do is to get html data of a website automatically.
Firstly I decided to do it manually and via terminal I entered below code:
$ wget http://www.***.*** -q -O code.html
Unfortunately code.html file was empty.
When I enter below code it gave Error 303-304
$... (1 Reply)
i'm using this command to post data to a remote host:
wget --post-data="My Data" http://<my-ip>:80 -O /dev/null -q
and
curl --data "My Data" http://<my-ip>:80
however, when i run the above, i see the following in my access log on the remote host:
Wget:
10.10.10.10 - - "POST /... (1 Reply)
What can I use instead of wget/curl when I need to log into websites that use javascript?
Wget and curl don't handle javascript. (6 Replies)
Discussion started by: locoroco
6 Replies
LEARN ABOUT DEBIAN
servefile
SERVEFILE(1) User Commands SERVEFILE(1)NAME
servefile - small HTTP-Server for temporary file transfer
SYNOPSIS
servefile [-h] [--version] [-p PORT] [-u] [-s MAX_UPLOAD_SIZE] [-l]
[--ssl] [--key KEY] [--cert CERT] [-a user:password] file/directory
DISCLAIMER
Do not use this as a normal web server. This server is optimized for running a short time and to send files to other people, not for doing
high-performance static file serving.
DESCRIPTION
Servefile is a small HTTP-server intended for temporary file transfer mostly in the local network. It aims to make transferring single
files as painless as possible and to replace tar/netcat solutions.
With just a file as argument servefile serves just that one file and redirects all HTTP requests to that file.
Uploads can be done with curl, wget (see EXAMPLES) or a normal browser. In upload mode with -u servefile creates a directory and saves all
uploaded files into that directory. When uploading with curl or wget the filename is extracted from the path part of the url used for the
upload.
For SSL support python-openssl (pyssl) needs to be installed. If no key and cert is given, servefile will generate a key pair for you and
display its fingerprint.
In --tar mode the given file or directory will be packed on (each) request and piped to the client through the HTTP connection, thus serv-
ing always the latest content of the directory and preventing temporary file creaton. Tar files will be created containing only the lowest
directory name from the full path, so using /path/to/dir/ as file/directory argument will create a tar file starting with the dir/ direc-
tory. When giving a file as argument, only the file without any path will be in the tarfile. Symlinks will not be dereferenced.
COMMAND SUMMARY
positional arguments:
file/directory
file or directory (with -l or -u) which should be served or uploaded to
optional arguments:
-h, --help
Show a help message and exit
--version
Show program's version number and exit
-p PORT, --port PORT
Port to listen on
-u, --upload
Enable uploads to a given directory
-s MAX_UPLOAD_SIZE, --max-upload-size MAX_UPLOAD_SIZE
Limit upload size in kB. Size modifiers are allowed, e.g. 2G, 12MB, 1B.
-l, --list-dir
Show directory indexes and allow access to all subdirectories
--ssl Enable SSL. If no key/cert is specified one will be generated.
--key KEY
Key file to use for SSL. If no cert is given with --cert the key file will also be searched for a cert
--cert CERT
Certfile to use for SSL
-a user:password, --auth user:password
Set user and password for HTTP basic authentication
--realm REALM
Set a realm for HTTP basic authentication. This is an arbitrary string which is displayed when doing HTTP basic authentication
-t, --tar
Enable on the fly tar creation for given file or directory. Note: Download continuation will not be available.
-c method, --compression method
Set compression method, only in combination with --tar. Can be one of none, gzip, bzip2.
-4, --ipv4-only
Listen on IPv4 only
-6, --ipv6-only
Listen on IPv6 only
EXAMPLES
Serving a single file with SSL and HTTP Basic auth:
servefile --ssl --auth foo:bar the_file
Enabling uploads to a directory:
servefile -u dir/
Uploading file foo as bar to servefile via command line:
curl -X PUT http://ip:port/bar --data-binary @foo
curl -X POST http://ip:port/bar --data-binary @foo
wget http://ip:port/bar --post-file=foo
Serving a on the fly generated tar.gz file of a directory:
servefile --tar -c gzip path/to/dir
AUTHOR
servefile is developed by Sebastian Lohff <seba@someserver.de>
servefile 0.4.2 April 2012 SERVEFILE(1)