This repository was archived by the owner on Oct 30, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun.sh
More file actions
140 lines (114 loc) · 3.47 KB
/
Copy pathrun.sh
File metadata and controls
140 lines (114 loc) · 3.47 KB
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#!/bin/bash
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
chmod +x "$0"
echo -ne "\033]0;KiteAI Bot by @MeoMunDep\007"
check_node() {
if ! command -v node &> /dev/null; then
print_red "Node.js not found, installing..."
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
sudo apt update && sudo apt install -y nodejs npm
elif [[ "$OSTYPE" == "darwin"* ]]; then
brew install node
elif [[ "$OSTYPE" == "cygwin" || "$OSTYPE" == "msys" ]]; then
echo "Please install Node.js manually on Windows."
fi
print_green "Node.js installation completed."
else
print_green "Node.js is already installed."
fi
}
check_node
check_git() {
if ! command -v git &> /dev/null; then
print_red "Git not found, installing..."
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
sudo apt update && sudo apt install -y git
elif [[ "$OSTYPE" == "darwin"* ]]; then
brew install git
elif [[ "$OSTYPE" == "cygwin" || "$OSTYPE" == "msys" ]]; then
echo "Please install Git manually on Windows."
fi
print_green "Git installation completed."
else
print_green "Git is already installed."
fi
}
check_git
print_green() {
echo -e "${GREEN}$1${NC}"
}
print_yellow() {
echo -e "${YELLOW}$1${NC}"
}
print_red() {
echo -e "${RED}$1${NC}"
}
if [ -d "../node_modules" ]; then
print_green "Found node_modules in parent directory"
MODULES_DIR=".."
else
print_green "Using current directory for node_modules"
MODULES_DIR="."
fi
create_default_configs() {
cat > configs.json << EOL
{
"skipInvalidProxy": false,
"delayEachAccount": [1, 1],
"timeToRestartAllAccounts": 300,
"howManyAccountsRunInOneTime": 100,
"doOnboardingTasks": true,
"doDailyQuizz": true,
"updateName": true,
"chatWithAi": {
"enable": true,
"amount": 30
},
"claimBadges": true,
"stakeToken": {
"enable": true,
"amount": [1, 2]
},
"claimStakeRewards": {
"enable": true,
"amount": [0.1, 0.2]
},
"referralCodes": ["DO6Y47C3"],
"faucet": {
"enable": false,
"maxCaptchaAttempts": 20,
"2captchaApiKey": ""
}
}
EOL
}
check_configs() {
if ! node -e "try { const cfg = require('./configs.json'); if (!cfg.howManyAccountsRunInOneTime || typeof cfg.howManyAccountsRunInOneTime !== 'number' || cfg.howManyAccountsRunInOneTime < 1) throw new Error(); } catch { process.exit(1); }"; then
print_red "Invalid configuration detected. Resetting to default values..."
create_default_configs
print_green "Configuration reset completed."
fi
}
print_yellow "Checking configuration files..."
if [ ! -f configs.json ]; then
create_default_configs
print_green "Created configs.json with default values"
fi
check_configs
for file in privateKeys.txt proxies.txt; do
if [ ! -f "$file" ]; then
touch "$file"
print_green "Created $file"
fi
done
print_green "Configuration files have been checked."
print_yellow "Checking dependencies..."
cd "$MODULES_DIR"
npm install user-agents axios meo-forkcy-colors meo-forkcy-utils meo-forkcy-proxy meo-forkcy-logger ethers web3 viem crypto-js @faker-js/faker
cd - > /dev/null
print_green "Dependencies installation completed!"
print_green "Starting the bot..."
node meomundep