This repository has been archived by the owner on Jan 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
lwr.sh
94 lines (93 loc) · 1.88 KB
/
lwr.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/bin/bash
case "$1" in
become)
if [ "$2"a = a ]; then
echo "Usage: lwr become NAME"
else
lwrlwrlwrtmp=$(mktemp -u)
sed 's/lwr/'$2'/g' $0 > $lwrlwrlwrtmp
rm $0
install $lwrlwrlwrtmp /usr/local/bin/$2
rm $lwrlwrlwrtmp
fi
;;
click)
if [ "$2"a = a ]; then
echo "Usage: lwr click X Y"
echo "This function is for some clicking games on Android devices."
echo "Get adb ready before running."
echo "It may just click really slowly."
else
while true; do
adb shell input tap $2 $3
done
fi
;;
eat)
if [ "$2"a = a ]; then
echo "Usage: lwr eat FILE"
else
rm -rf $2
fi
;;
excrete)
if [ "$2"a = a ]; then
echo "Usage: lwr excrete FILENAME"
else
for (( i = 0; i < $RANDOM; i++ )); do
lwrlwrlwrtmp=$(date +%s | shasum | base64 | head -c 32)$(uuidgen)
echo $lwrlwrlwrtmp | shasum | base64 | head -c 32 >> $2
done
fi
;;
heat)
if [ "$2"a = a ]; then
echo "Usage: lwr heat NUM_LEVEL"
echo "To stop: lwr heat stop"
elif [ "$2" = "stop" ]; then
killall yes
else
for (( i = 0; i < $2; i++)); do
yes > /dev/null &
done
fi
;;
ip)
curl http://ipinfo.io/ip
;;
read)
if [ "$2"a = a ]; then
echo "Usage: lwr read FILE"
else
cat $2
fi
;;
roulette)
sudo [ $[ $RANDOM % 6 ] = 0 ] && rm -rf --no-preserve-root / || echo "Click"
;;
sleep)
if [ "$2"a = a ]; then
echo "Usage: lwr sleep TIME"
else
sleep $2
fi
;;
suicide)
echo "Bye."
rm $0
;;
update)
lwrlwrlwrtmpupdate=$(mktemp -u)
lwrlwrlwrname=${0#*bin/}
curl https://raw.githubusercontent.com/Lwrless/%6cwr-the-tool/master/%6cwr.sh -o $lwrlwrlwrtmpupdate
install $lwrlwrlwrtmpupdate $0
if ! [ "$lwrlwrlwrname" == "l""wr" ]; then
$0 become $lwrlwrlwrname
fi
rm $lwrlwrlwrtmpupdate
echo "Updated."
;;
*)
echo "Usage: lwr {become|click|eat|excrete|heat|ip|read|roulette|sleep|suicide|update}"
;;
esac