Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge CVS history #1

Merged
merged 80 commits into from Apr 17, 2017
Merged

Merge CVS history #1

merged 80 commits into from Apr 17, 2017

Conversation

fwolf
Copy link
Contributor

@fwolf fwolf commented Oct 16, 2013

I have done a new cvs export job using https://github.com/rcls/crap, got all commit history from sourceforge.net/snoopy, and then merged with your modified README.md.

During merge, sourceforge version seems newer in version(1.2.5-dev) and some author mail address.

Although this class has not much usage because there are curl already, I think keep a copy here is good for some old project.

andrei and others added 30 commits February 3, 2000 16:10
gene_wood and others added 29 commits October 18, 2004 05:18
…pandlinks function.

Root relative links are treated as relative
Snoopy is treating root relative links as relative.

When a page at domain.com/foo/bar/page1.htm has a link
like /foo/bar/page2.htm then Snoopy returns the link to
page 2 as: domain.com/foo/bar/foo/bar/page2.htm instead
of domain.com/foo/bar/page2.htm
Snoopy now allows a meta refresh tag to have any number of spaces between the semicolon following the refresh delay and the URL= value.
Added :
if($this->lastredirectaddr)
	$URI = $this->lastredirectaddr;

into the fetchlinks, submitlinks and submitext functions to properly expandlinks after a redirect.

Also modified the documentation at the beginning of the file indicating which functions use expandlinks
…s in the https curl request weren't being checked for double quotes (the URI was, but not the headers).

Here's the description of the exploit from SEC.

SEC-CONSULT Security Advisory < 2005xxxx-0 >
======================================================================
                  title: Snoopy Remote Code Execution Vulnerability
                program: Snoopy PHP Webclient
     vulnerable version: 1.2 and earlier
               homepage: http://snoopy.sourceforge.net
                  found: 2005-10-10
                     by: D. Fabian / SEC-CONSULT / www.sec-consult.com
======================================================================

vendor description:
---------------

Snoopy is a PHP class that simulates a web browser. It automates the
task of retrieving web page content and posting forms, for example.

Snoopy is used by various RSS parser, which are in turn used in a
whole bunch of applications like weblogs, content management systems,
and many more.

vulnerabilty overview:
---------------

Whenever an SSL protected webpage is requested with one of the many
Snoopy API calls, it calls the function _httpsrequest which takes
the URL as argument. This function in turn calls the PHP-function
exec with unchecked user-input. Using a specially crafted URL, an
attacker can supply arbitrary commands that are executed on the web
server with priviledges of the web user.

While the vulnerability can not be exploited using the Snoopy class
file itself, there may exist implementations which hand unchecked
URLs from users to snoopy.

proof of concept:
---------------

Consider the following code on a webserver:
…heme (http / https) fixed a typo that I introduced in 1.2.2 (the first character of the file is a "z" updated the version variable in the code to reflect the new version
@hurrycaner hurrycaner merged commit 1e00198 into hurrycaner:master Apr 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants