Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

just try to extract a function name from sql comments in anon mode

  • Loading branch information...
commit 1966506b300280b700334dfe503fb79b4efd8289 1 parent 4aeec16
asher authored
Showing with 6 additions and 24 deletions.
  1. +3 −12 dashboard.php
  2. +3 −12 more.php
View
15 dashboard.php
@@ -84,18 +84,9 @@
$rows = array();
while ($row = mysql_fetch_assoc($result)) {
if ($conf['anon']) {
- if (preg_match('@/\*.*\*/@', $row['sample'], $matches)) {
- if (preg_match('@ 127.0.0.1 \*/@', $matches[0])) {
- $extra = $matches[0];
- } elseif (preg_match('@ \d+\.\d+\.\d+\.\d+ @', $matches[0])) {
- $extra = preg_replace('@\d+\.\d+\.\d+\.\d+@', 'External_IP', $matches[0]);
- } elseif (preg_match('@ \S+ \*/@', $matches[0])) {
- $extra = preg_replace('@ \S+ \*/@', ' User */', $matches[0]);
- }
- else {
- $extra = $matches[0];
- }
- $row['sample'] = $extra . ' ' . $row['fingerprint'];
+ if (preg_match('@/\* (\S+)(::\S+)?.*\*/@', $row['sample'], $matches)) {
+ $c = ($matches[2]) ? $matches[1] . $matches[2] : $matches[1];
+ $row['sample'] = '/* ' . $c . ' */ ' . $row['fingerprint'];
} else {
$row['sample'] = $row['fingerprint'];
}
View
15 more.php
@@ -33,18 +33,9 @@
$rows = array();
while ($row = mysql_fetch_assoc($result)) {
if ($conf['anon']) {
- if (preg_match('@/\*.*\*/@', $row['sample'], $matches)) {
- if (preg_match('@ 127.0.0.1 \*/@', $matches[0])) {
- $extra = $matches[0];
- } elseif (preg_match('@ \d+\.\d+\.\d+\.\d+ @', $matches[0])) {
- $extra = preg_replace('@\d+\.\d+\.\d+\.\d+@', 'External_IP', $matches[0]);
- } elseif (preg_match('@ \S+ \*/@', $matches[0])) {
- $extra = preg_replace('@ \S+ \*/@', ' User */', $matches[0]);
- }
- else {
- $extra = $matches[0];
- }
- $row['sample'] = $extra . ' ' . $row['fingerprint'];
+ if (preg_match('@/\* (\S+)(::\S+)?.*\*/@', $row['sample'], $matches)) {
+ $c = ($matches[2]) ? $matches[1] . $matches[2] : $matches[1];
+ $row['sample'] = '/* ' . $c . ' */ ' . $row['fingerprint'];
} else {
$row['sample'] = $row['fingerprint'];
}
Please sign in to comment.
Something went wrong with that request. Please try again.