mirror of https://github.com/basemaster/snoopy.git
Compare commits
7 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
a58813915b | |
|
|
792a106a78 | |
|
|
75c440c4bd | |
|
|
4886f1e645 | |
|
|
9ed7446c3a | |
|
|
9a0ed339e6 | |
|
|
b1a2456fad |
|
|
@ -1,4 +1,4 @@
|
||||||
snoopy
|
snoopy
|
||||||
======
|
======
|
||||||
|
hello!
|
||||||
fork http://sourceforge.net/projects/snoopy/
|
fork http://sourceforge.net/projects/snoopy/
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
{
|
{
|
||||||
"name": "basemaster/snoopy",
|
"name": "basemaster/snoopy",
|
||||||
"description": "snoopy",
|
"description": "snoopy",
|
||||||
"license": "GPLv2",
|
"license": "GPL-2.0-or-later",
|
||||||
|
"version": "2.0.2",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Clientbase"
|
"name": "Clientbase"
|
||||||
|
|
|
||||||
|
|
@ -195,7 +195,8 @@ class Snoopy
|
||||||
$frameurls = $this->_frameurls;
|
$frameurls = $this->_frameurls;
|
||||||
$this->_frameurls = [];
|
$this->_frameurls = [];
|
||||||
|
|
||||||
while (list(, $frameurl) = each($frameurls))
|
//while (list(, $frameurl) = each($frameurls))
|
||||||
|
foreach ($frameurls as $frameurl)
|
||||||
{
|
{
|
||||||
if ($this->_framedepth < $this->maxframes)
|
if ($this->_framedepth < $this->maxframes)
|
||||||
{
|
{
|
||||||
|
|
@ -327,7 +328,8 @@ class Snoopy
|
||||||
$frameurls = $this->_frameurls;
|
$frameurls = $this->_frameurls;
|
||||||
$this->_frameurls = [];
|
$this->_frameurls = [];
|
||||||
|
|
||||||
while (list(, $frameurl) = each($frameurls))
|
//while (list(, $frameurl) = each($frameurls))
|
||||||
|
foreach ($frameurls as $frameurl)
|
||||||
{
|
{
|
||||||
if ($this->_framedepth < $this->maxframes)
|
if ($this->_framedepth < $this->maxframes)
|
||||||
{
|
{
|
||||||
|
|
@ -603,7 +605,8 @@ class Snoopy
|
||||||
|
|
||||||
// catenate the non-empty matches from the conditional subpattern
|
// catenate the non-empty matches from the conditional subpattern
|
||||||
|
|
||||||
while (list($key, $val) = each($links[2]))
|
//while (list($key, $val) = each($links[2]))
|
||||||
|
foreach ($links[2] as $key => $val)
|
||||||
{
|
{
|
||||||
if (!empty($val))
|
if (!empty($val))
|
||||||
{
|
{
|
||||||
|
|
@ -611,7 +614,8 @@ class Snoopy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while (list($key, $val) = each($links[3]))
|
//while (list($key, $val) = each($links[3]))
|
||||||
|
foreach ($links[3] as $key => $val)
|
||||||
{
|
{
|
||||||
if (!empty($val))
|
if (!empty($val))
|
||||||
{
|
{
|
||||||
|
|
@ -833,7 +837,8 @@ class Snoopy
|
||||||
{
|
{
|
||||||
$this->rawheaders = (array) $this->rawheaders;
|
$this->rawheaders = (array) $this->rawheaders;
|
||||||
}
|
}
|
||||||
while (list($headerKey, $headerVal) = each($this->rawheaders))
|
//while (list($headerKey, $headerVal) = each($this->rawheaders))
|
||||||
|
foreach ($this->rawheaders as $headerKey => $headerVal)
|
||||||
{
|
{
|
||||||
$headers .= $headerKey . ": " . $headerVal . "\r\n";
|
$headers .= $headerKey . ": " . $headerVal . "\r\n";
|
||||||
}
|
}
|
||||||
|
|
@ -1165,11 +1170,13 @@ class Snoopy
|
||||||
{
|
{
|
||||||
case "application/x-www-form-urlencoded":
|
case "application/x-www-form-urlencoded":
|
||||||
reset($formvars);
|
reset($formvars);
|
||||||
while (list($key, $val) = each($formvars))
|
//while (list($key, $val) = each($formvars))
|
||||||
|
foreach ($formvars as $key => $val)
|
||||||
{
|
{
|
||||||
if (is_array($val) || is_object($val))
|
if (is_array($val) || is_object($val))
|
||||||
{
|
{
|
||||||
while (list($cur_key, $cur_val) = each($val))
|
//while (list($cur_key, $cur_val) = each($val))
|
||||||
|
foreach ($val as $cur_key => $cur_val)
|
||||||
{
|
{
|
||||||
$postdata .= urlencode($key) . "[]=" . urlencode($cur_val) . "&";
|
$postdata .= urlencode($key) . "[]=" . urlencode($cur_val) . "&";
|
||||||
}
|
}
|
||||||
|
|
@ -1185,11 +1192,13 @@ class Snoopy
|
||||||
$this->_mime_boundary = "Snoopy" . md5(uniqid(microtime()));
|
$this->_mime_boundary = "Snoopy" . md5(uniqid(microtime()));
|
||||||
|
|
||||||
reset($formvars);
|
reset($formvars);
|
||||||
while (list($key, $val) = each($formvars))
|
//while (list($key, $val) = each($formvars))
|
||||||
|
foreach ($formvars as $key => $val)
|
||||||
{
|
{
|
||||||
if (is_array($val) || is_object($val))
|
if (is_array($val) || is_object($val))
|
||||||
{
|
{
|
||||||
while (list($cur_key, $cur_val) = each($val))
|
//while (list($cur_key, $cur_val) = each($val))
|
||||||
|
foreach ($val as $cur_key => $cur_val)
|
||||||
{
|
{
|
||||||
$postdata .= "--" . $this->_mime_boundary . "\r\n";
|
$postdata .= "--" . $this->_mime_boundary . "\r\n";
|
||||||
$postdata .= "Content-Disposition: form-data; name=\"$key\[\]\"\r\n\r\n";
|
$postdata .= "Content-Disposition: form-data; name=\"$key\[\]\"\r\n\r\n";
|
||||||
|
|
@ -1205,10 +1214,12 @@ class Snoopy
|
||||||
}
|
}
|
||||||
|
|
||||||
reset($formfiles);
|
reset($formfiles);
|
||||||
while (list($field_name, $file_names) = each($formfiles))
|
//while (list($field_name, $file_names) = each($formfiles))
|
||||||
|
foreach ($formfiles as $field_name => $file_name)
|
||||||
{
|
{
|
||||||
settype($file_names, "array");
|
settype($file_names, "array");
|
||||||
while (list(, $file_name) = each($file_names))
|
//while (list(, $file_name) = each($file_names))
|
||||||
|
foreach ($file_names as $file_name)
|
||||||
{
|
{
|
||||||
if (!is_readable($file_name))
|
if (!is_readable($file_name))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue