Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
31dc1f42
Commit
31dc1f42
authored
24 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
spell corrections, changed some wording
parent
ec109b35
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/TheArtOfHttpScripting
+23
-22
23 additions, 22 deletions
docs/TheArtOfHttpScripting
with
23 additions
and
22 deletions
docs/TheArtOfHttpScripting
+
23
−
22
View file @
31dc1f42
Author: Daniel Stenberg <daniel@haxx.se>
Date:
August 7
, 2000
Version: 0.
2
Date:
September 15
, 2000
Version: 0.
3
The Art Of Scripting HTTP Requests Using Curl
=============================================
...
...
@@ -31,7 +31,7 @@ Version: 0.2
1. The HTTP Protocol
HTTP is the protocol used to fetch data from web servers. It is a very simple
protocol that is built upon TCP/IP. The protocol also allow information to
protocol that is built upon TCP/IP. The protocol also allow
s
information to
get sent to the server from the client using a few different methods, as will
be shown here.
...
...
@@ -130,12 +130,12 @@ Version: 0.2
curl -d "birthyear=1905&press=OK" www.hotmail.com/when/junk.cgi
This kind of POST will use the Content-Type
application/x-www-form-urlencoded and is the most widly used POST kind.
application/x-www-form-urlencoded and is the most wid
e
ly used POST kind.
4.3 FILE UPLOAD POST
Back in late 1995 they defined a new to post data over HTTP. It was
documented in the RFC 1867, why this method sometimes
are
refered to as
Back in late 1995 they defined a new
way
to post data over HTTP. It was
documented in the RFC 1867, why this method sometimes
is
refered to as
a rfc1867-posting.
This method is mainly designed to better support file uploads. A form that
...
...
@@ -165,7 +165,7 @@ Version: 0.2
<form method="POST" action="foobar.cgi">
<input type=text name="birthyear">
<input type=
text
name="person" value="daniel">
<input type=
hidden
name="person" value="daniel">
<input type=submit name="press" value="OK">
</form>
...
...
@@ -209,17 +209,18 @@ Version: 0.2
Do note that when a program is run, its parameters are possible to see when
listing the running processes of the system. Thus, other users may be able to
watch your passwords if you pass them as plain command line options.
watch your passwords if you pass them as plain command line options. There
are ways to circumvent this.
7. REFERER
A HTTP request
has the ability to featur
e a 'referer' field, which can be
used to tell
which URL
that causes
the client
to get
this particular
resource. Some programs/scripts
check the referer field of requests to verify
that this wasn't arriving from
an external site or unknown page. While this
is a stupid way to check
something so easily forged, many scripts still do
it. Using curl, you can put
anything you want in the referer-field and thus
more easily being able to fool
the server into serving your request.
A HTTP request
may includ
e a 'referer' field, which can be
used to tell from
which URL the client
got to
this particular
resource. Some programs/scripts
check the referer field of requests to verify
that this wasn't arriving from
an external site or
an
unknown page. While this
is a stupid way to check
something so easily forged, many scripts still do
it. Using curl, you can put
anything you want in the referer-field and thus
more easily be able to fool
the server into serving your request.
Use curl to set the referer field with:
...
...
@@ -278,10 +279,10 @@ Version: 0.2
specified in a received cookie, the client sends back the cookies and their
contents to the server, unless of course they are expired.
Many applications and server use this method to connect a series of request
Many applications and server
s
use this method to connect a series of request
s
into a single logical session. To be able to use curl in such occations, we
must be able to record and send back cookies
in
the way th
at th
e web
application
expects them. The same way browsers deal with them.
must be able to record and send back cookies the way the web
application
expects them. The same way browsers deal with them.
The simplest way to send a few cookies to the server when getting a page with
curl is to add them on the command line like:
...
...
@@ -307,15 +308,15 @@ Version: 0.2
There are a few ways to do secure HTTP transfers. The by far most common
protocol for doing this is what is generally known as HTTPS, HTTP over
SSL. SSL encrypts all the data that is sen
d
and received over the network and
SSL. SSL encrypts all the data that is sen
t
and received over the network and
thus makes it harder for attackers to spy on sensitive information.
SSL (or TLS as the latest version of the standard is called) offers a
truckload of advanced features to allow all those encryptions and key
infrastructure mechanisms e
c
nrypted HTTP requires.
infrastructure mechanisms en
c
rypted HTTP requires.
Curl supports en
s
crypted fetches thanks to the freely available OpenSSL
libraries. To get a pa
f
e from a
https
server, simply run curl like:
Curl supports encrypted fetches thanks to the freely available OpenSSL
libraries. To get a pa
g
e from a
HTTPS
server, simply run curl like:
curl https://that.secure.server.com
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment