First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
ARGS="_GET _POST _REQUEST"
|
||||
|
||||
for file in *.php
|
||||
do
|
||||
echo $file
|
||||
cp $file tempfile.txt
|
||||
|
||||
for arg in $ARGS
|
||||
do
|
||||
pattern="if (\\\$$arg\\['\\([_a-z0-9]*\\)'\\]) "
|
||||
replacement="if (array_key_exists('\\1',\$$arg)) "
|
||||
# echo $pattern
|
||||
# echo $replacement
|
||||
cat tempfile.txt | sed "s#$pattern#$replacement#" > temp.txt
|
||||
mv temp.txt tempfile.txt
|
||||
|
||||
pattern="isset(\\\$$arg\\['\\([_a-z0-9]*\\)'\\])"
|
||||
replacement="array_key_exists('\\1',\$$arg)"
|
||||
# echo $pattern
|
||||
# echo $replacement
|
||||
cat tempfile.txt | sed "s#$pattern#$replacement#" > temp.txt
|
||||
mv temp.txt tempfile.txt
|
||||
|
||||
done
|
||||
|
||||
mv tempfile.txt new/$file
|
||||
done
|
||||
|
||||
chown -R webftp.http new
|
||||
|
||||
Reference in new issue
Block a user