Skip to content

Commit

Permalink
[Fix] importconf was setting invalid vars for custom signature import…
Browse files Browse the repository at this point in the history
…s; correct

      variables are import_sigs_md5_url and import_sigs_hex_url
[Fix] added use of sed flag -E for FreeBSD compatibility with GNU sed usage
  • Loading branch information
rfxn committed Jan 13, 2017
1 parent cf756e1 commit 968a3c3
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion files/VERSION.hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
09b93cbbc7a572eec62c23cb319b5ab98b9bb20d7ac0f916793d8239dcc6b25d
09b93cbbc7a572eec62c23cb319b5ab9968e70acaf56bce46759c94ddeaadc3b
2 changes: 1 addition & 1 deletion files/clean/base64.inject.unclassed
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# $1 file path, $2 signature name, $3 file owner, $4 file mode, $5 file size (b), $6 file md5sum
if [ -f "$1" ]; then
sed -i -e 's/<?.*eval(base64_decode(.*?>//' -e 's/<?php.*eval(base64_decode(.*?>//' -e 's/eval(base64_decode([^;]*;//' "$1"
sed -E -i -e 's/<?.*eval(base64_decode(.*?>//' -e 's/<?php.*eval(base64_decode(.*?>//' -e 's/eval(base64_decode([^;]*;//' "$1"
fi
2 changes: 1 addition & 1 deletion files/clean/gzbase64.inject.unclassed
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# $1 file path, $2 signature name, $3 file owner, $4 file mode, $5 file size (b), $6 file md5sum
if [ -f "$1" ]; then
sed -i -e 's/<?.*eval(gzinflate(base64_decode(.*?>//' -e 's/<?php.*eval(gzinflate(base64_decode(.*?>//' -e 's/eval(gzinflate(base64_decode(.*);//' "$1"
sed -E -i -e 's/<?.*eval(gzinflate(base64_decode(.*?>//' -e 's/<?php.*eval(gzinflate(base64_decode(.*?>//' -e 's/eval(gzinflate(base64_decode(.*);//' "$1"
fi
2 changes: 1 addition & 1 deletion files/clean/js.inject.VisitorTracker
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# $1 file path, $2 signature name, $3 file owner, $4 file mode, $5 file size (b), $6 file md5sum
if [ -f "$1" ]; then
sed -i -e '/var visitortrackerin = setInterval(function(){/,/}\/\*visitorTracker\*\//d' -e '/\/\*visitorTracker\*\//d' "$1"
sed -E -i -e '/var visitortrackerin = setInterval(function(){/,/}\/\*visitorTracker\*\//d' -e '/\/\*visitorTracker\*\//d' "$1"
fi
2 changes: 1 addition & 1 deletion files/clean/js.inject.fakejquery02
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# $1 file path, $2 signature name, $3 file owner, $4 file mode, $5 file size (b), $6 file md5sum
if [ -f "$1" ]; then
sed -i -e '/<script>var.*jquery.min.php?.*encodeURIComponent.*jquery.min.php.*document.getElementsByTagName.*window.location.search.match.*;}<\/script>/d' "$1"
sed -E -i -e '/<script>var.*jquery.min.php?.*encodeURIComponent.*jquery.min.php.*document.getElementsByTagName.*window.location.search.match.*;}<\/script>/d' "$1"
fi

2 changes: 1 addition & 1 deletion files/clean/php.brute.bf1lic
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# $1 file path, $2 signature name, $3 file owner, $4 file mode, $5 file size (b), $6 file md5sum
if [ -f "$1" ]; then
sed -i -e 's/^<?php if(!isset($GLOBALS\[\"\\x.*; ?>//' "$1"
sed -E -i -e 's/^<?php if(!isset($GLOBALS\[\"\\x.*; ?>//' "$1"
fi
5 changes: 3 additions & 2 deletions files/internals/functions
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ prerun() {
fi

if [ "$user" == "root" ]; then
sed -i '/^$/d' $ignore_paths $ignore_sigs $ignore_inotify $ignore_file_ext
sed -E -i -e '/^$/d' $ignore_paths $ignore_sigs $ignore_inotify $ignore_file_ext
fi

if [ -z "$EDITOR" ]; then
Expand All @@ -149,6 +149,7 @@ prerun() {
if [ ! "$scan_cpunice" ]; then
scan_cpunice=19
fi

if [ ! "$scan_ionice" ]; then
scan_ionice=6
fi
Expand Down Expand Up @@ -1103,7 +1104,7 @@ scan_strlen() {
elif [ "$string_length_scan" == "1" ] && [ "$type" == "list" ]; then
list="$tmpdir/.strlen.flist.$$"
cp $file $list
sed -i "s/'/\\\\'/g" $list
sed -E -i -e "s/'/\\\\'/g" $list
cat $list | xargs wc -L 2> /dev/null | grep -vw total >> $list.strlen
awk "{if (\$1>=$string_length) print\$2}" $list.strlen >> $list.hits
for i in `cat $list.hits`; do
Expand Down
4 changes: 2 additions & 2 deletions files/internals/importconf
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ import_config_url=""
# SIGNATURE FILES! It is recommended for large-scale deployments to define these
# variables within a import_config_url file.
# [ some IP use dns caption recommendation goes here ]
import_custsigs_md5_url=""
import_custsigs_hex_url=""
import_sigs_md5_url="$import_sigs_md5_url"
import_sigs_hex_url="$import_sigs_hex_url"

##
# [ SCAN OPTIONS ]
Expand Down

0 comments on commit 968a3c3

Please sign in to comment.