-
Notifications
You must be signed in to change notification settings - Fork 0
/
verify.sh
executable file
·44 lines (41 loc) · 2.27 KB
/
verify.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
for injection in 'coinhive' \
'cdn.rawgit.com' \
'void 0===window'
do
echo "Searching for $injection. This takes time, please wait ...";
for file in `grep -Ril "$injection" dist/*`; do
echo "****************************************************************************************"
echo " $injection Injection found in the file : $file"
echo " Please correct the file before running the code!!"
echo "****************************************************************************************"
done
for file in `grep -Ril "$injection" dist-server/*`; do
echo "****************************************************************************************"
echo " $injection Injection found in the file : $file"
echo " Please correct the file before running the code!!"
echo "****************************************************************************************"
done
for file in `grep -Ril "$injection" node_modules/* | grep -vi readme.md`; do
echo "****************************************************************************************"
echo " $injection Injection found in the file : $file"
echo " Please correct the file before running the code!!"
echo "****************************************************************************************"
done
## scan the Drupal code
for file in `grep -Ril "$injection" ../maker-back/*`; do
echo "****************************************************************************************"
echo " $injection Injection found in the file : $file"
echo " Please correct the file before running the code!!"
echo "****************************************************************************************"
done
## scan the Rio Drupal code
for file in `grep -Ril "$injection" ../makershare/* | grep -vi readme.md`; do
echo "****************************************************************************************"
echo " $injection Injection found in the file : $file"
echo " Please correct the file before running the code!!"
echo "****************************************************************************************"
done
done
bdiff=$(git status | grep "modified: ")
echo "$bdiff"