Spam: Difference between revisions

From Psygen Wiki
Jump to navigation Jump to search
(Created page with "How to find and stop spam. == Spam from Scripts == Find files that have a starting or ending line with a rediculous amount of characters: (probably a hacked page)<br /> <pre...")
 
Line 7: Line 7:
find `pwd` -type f -name '*.php'  ! -perm 000 | while read FILE; do FIRST_LINE_BYTES=$(head -n1 $FILE | wc -c); LAST_LINE_BYTES=$(tail -n1 $FILE | wc -c); echo -e "$FIRST_LINE_BYTES $FILE\n$LAST_LINE_BYTES $FILE" ;done | sort -n | uniq
find `pwd` -type f -name '*.php'  ! -perm 000 | while read FILE; do FIRST_LINE_BYTES=$(head -n1 $FILE | wc -c); LAST_LINE_BYTES=$(tail -n1 $FILE | wc -c); echo -e "$FIRST_LINE_BYTES $FILE\n$LAST_LINE_BYTES $FILE" ;done | sort -n | uniq
</pre>
</pre>
Use Filescout:
https://mattjung.net/wiki/filescout/

Revision as of 02:00, 12 October 2017

How to find and stop spam.

Spam from Scripts

Find files that have a starting or ending line with a rediculous amount of characters: (probably a hacked page)

find `pwd` -type f -name '*.php'  ! -perm 000 | while read FILE; do FIRST_LINE_BYTES=$(head -n1 $FILE | wc -c); LAST_LINE_BYTES=$(tail -n1 $FILE | wc -c); echo -e "$FIRST_LINE_BYTES $FILE\n$LAST_LINE_BYTES $FILE" ;done | sort -n | uniq


Use Filescout: https://mattjung.net/wiki/filescout/