bot-mwsm 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/FUNDING.yml +2 -0
- package/.github/workflows/Mwsm.yml +188 -0
- package/.github/workflows/publish.yml +62 -0
- package/LICENSE +21 -0
- package/README.md +204 -0
- package/bash/mwsm.sh +1060 -0
- package/bash/setup.sh +173 -0
- package/docs/pix.html +146 -0
- package/fonts/OpenSans-Regular-webfont.html +0 -0
- package/fonts/css/font-awesome.min.css +4 -0
- package/fonts/fontawesome-webfont (1).eot +0 -0
- package/fonts/fontawesome-webfont.eot +0 -0
- package/fonts/fontawesome-webfont.ttf +0 -0
- package/fonts/fontawesome-webfont.woff +0 -0
- package/fonts/fontawesome-webfont.woff2 +0 -0
- package/fonts/fonts/fontawesome-webfont3e6e-2.html +0 -0
- package/fonts/fonts/fontawesome-webfont3e6e.eot +0 -0
- package/fonts/fonts/fontawesome-webfont3e6e.html +0 -0
- package/fonts/fonts/fontawesome-webfont3e6e.svg +2671 -0
- package/fonts/fonts/fontawesome-webfont3e6e.woff +0 -0
- package/fonts/fonts/fontawesome-webfontd41d.eot +0 -0
- package/fonts/glyphicons-halflings-regular.eot +0 -0
- package/fonts/glyphicons-halflings-regular.html +0 -0
- package/fonts/glyphicons-halflings-regular.svg +288 -0
- package/fonts/glyphicons-halflings-regular.woff +0 -0
- package/fonts/glyphicons-halflings-regulard41d.eot +0 -0
- package/fonts/texgyreadventor-regular-webfont.html +0 -0
- package/icon.png +0 -0
- package/img/Mwsm.png +0 -0
- package/img/auth.png +0 -0
- package/img/autobot.png +0 -0
- package/img/autupdate.png +0 -0
- package/img/cli.png +0 -0
- package/img/cronshed.png +0 -0
- package/img/debug.log +0 -0
- package/img/debug.png +0 -0
- package/img/delay.png +0 -0
- package/img/dev.png +0 -0
- package/img/endpoint.png +0 -0
- package/img/find.png +0 -0
- package/img/log.png +0 -0
- package/img/mkauth.png +0 -0
- package/img/msn.png +0 -0
- package/img/paycon.png +0 -0
- package/img/prevent.png +0 -0
- package/img/resent.png +0 -0
- package/img/reset.png +0 -0
- package/img/resync.png +0 -0
- package/img/settings.png +0 -0
- package/img/shifts.png +0 -0
- package/img/spam.png +0 -0
- package/img/spam2.png +0 -0
- package/img/status.png +0 -0
- package/img/status2.png +0 -0
- package/img/stop.png +0 -0
- package/img/success.png +0 -0
- package/img/sync.png +0 -0
- package/img/terminal.png +0 -0
- package/img/timers.png +0 -0
- package/img/uid.png +0 -0
- package/img/update.png +0 -0
- package/img/whatsapp.png +0 -0
- package/index.html +1543 -0
- package/jquery.js +2 -0
- package/mwsm.db +0 -0
- package/mwsm.js +4979 -0
- package/mwsm.json +25 -0
- package/mwsm.py +91 -0
- package/nodemon.json +3 -0
- package/package.json +62 -0
- package/script.js +24815 -0
- package/socket.io.js +9 -0
- package/style.css +8744 -0
- package/version.json +8 -0
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
name: 🔄 Mwsm Version & Badge Sync
|
|
2
|
+
|
|
3
|
+
# 🔐 Permite push com token pessoal
|
|
4
|
+
permissions:
|
|
5
|
+
contents: write
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
release:
|
|
9
|
+
types: [published, edited] # também dispara se a release for editada
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
sync:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: 📥 Clonar repositório
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
persist-credentials: false # desativa o token padrão
|
|
22
|
+
ref: main
|
|
23
|
+
|
|
24
|
+
- name: 📦 Instalar dependências
|
|
25
|
+
run: sudo apt-get install -y jq
|
|
26
|
+
|
|
27
|
+
- name: 🔍 Detectar e atualizar versões
|
|
28
|
+
id: detect
|
|
29
|
+
env:
|
|
30
|
+
GITHUB_API_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
|
|
31
|
+
run: |
|
|
32
|
+
set -euo pipefail
|
|
33
|
+
|
|
34
|
+
# 1) Tenta extrair tag do event JSON (robusto tanto em release event quanto em workflow_dispatch)
|
|
35
|
+
EVENT_FILE="${GITHUB_EVENT_PATH:-/dev/null}"
|
|
36
|
+
TAG_RELEASE=$(jq -r '.release.tag_name // ""' "$EVENT_FILE" 2>/dev/null || echo "")
|
|
37
|
+
TAG_RELEASE="${TAG_RELEASE##v}" # remove "v" no início (ex: v2.0.55 → 2.0.55)
|
|
38
|
+
|
|
39
|
+
# 2) Se estiver vazio, busca a última release via API (autenticada)
|
|
40
|
+
if [ -z "$TAG_RELEASE" ]; then
|
|
41
|
+
echo "🔎 Nenhuma tag presente no evento — buscando última release publicada via API..."
|
|
42
|
+
if [ -z "${GITHUB_API_TOKEN:-}" ]; then
|
|
43
|
+
echo "⚠️ PERSONAL_TOKEN não encontrado — fazendo chamada não autenticada (pode rate-limit)."
|
|
44
|
+
TAG_RELEASE=$(curl -s "https://api.github.com/repos/${{ github.repository }}/releases/latest" | jq -r '.tag_name // empty')
|
|
45
|
+
else
|
|
46
|
+
TAG_RELEASE=$(curl -s -H "Authorization: Bearer ${GITHUB_API_TOKEN}" -H "Accept: application/vnd.github+json" \
|
|
47
|
+
"https://api.github.com/repos/${{ github.repository }}/releases/latest" | jq -r '.tag_name // empty')
|
|
48
|
+
fi
|
|
49
|
+
TAG_RELEASE="${TAG_RELEASE##v}"
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
if [ -z "$TAG_RELEASE" ] || [ "$TAG_RELEASE" = "null" ]; then
|
|
53
|
+
echo "❌ Nenhuma release encontrada. Abortando atualização para evitar sobrescrita de versões."
|
|
54
|
+
echo "updated=false" >> "$GITHUB_OUTPUT"
|
|
55
|
+
exit 0
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
echo "🔎 Release detectada: $TAG_RELEASE"
|
|
59
|
+
|
|
60
|
+
# valores atuais
|
|
61
|
+
PKG_VER=$(jq -r '.version' package.json)
|
|
62
|
+
JSON_REL=$(jq -r '.version[0].release' version.json)
|
|
63
|
+
JSON_PATCH=$(jq -r '.version[0].patch' version.json || true)
|
|
64
|
+
|
|
65
|
+
echo "📦 package.json.version = $PKG_VER"
|
|
66
|
+
echo "🧩 version.json.release = $JSON_REL"
|
|
67
|
+
echo "🕒 version.json.patch = $JSON_PATCH"
|
|
68
|
+
|
|
69
|
+
PATCH=$(TZ="America/Sao_Paulo" date +"%Y-%m-%d %H:%M:%S")
|
|
70
|
+
|
|
71
|
+
# 4) Atualiza somente se houver tag válida (não grava vazios)
|
|
72
|
+
jq --arg v "$TAG_RELEASE" --arg d "$PATCH" \
|
|
73
|
+
'.version[0].release=$v | .version[0].patch=$d' version.json > version.tmp && mv version.tmp version.json
|
|
74
|
+
|
|
75
|
+
jq --arg v "$TAG_RELEASE" '.version=$v' package.json > package.tmp && mv package.tmp package.json
|
|
76
|
+
|
|
77
|
+
echo "release=$TAG_RELEASE" >> "$GITHUB_OUTPUT"
|
|
78
|
+
echo "patch=$PATCH" >> "$GITHUB_OUTPUT"
|
|
79
|
+
echo "updated=true" >> "$GITHUB_OUTPUT"
|
|
80
|
+
|
|
81
|
+
- name: 🕒 Converter patch (americano → brasileiro)
|
|
82
|
+
id: datefmt
|
|
83
|
+
run: |
|
|
84
|
+
PATCH="${{ steps.detect.outputs.patch }}"
|
|
85
|
+
if [ -n "$PATCH" ]; then
|
|
86
|
+
DATE_BR=$(date -d "$PATCH" +"%d/%m/%Y %H:%M")
|
|
87
|
+
echo "formatted=$DATE_BR" >> $GITHUB_OUTPUT
|
|
88
|
+
else
|
|
89
|
+
echo "formatted=" >> $GITHUB_OUTPUT
|
|
90
|
+
fi
|
|
91
|
+
|
|
92
|
+
- name: 📝 Atualizar badges no README.md
|
|
93
|
+
if: steps.detect.outputs.updated == 'true'
|
|
94
|
+
run: |
|
|
95
|
+
# -------------------------------
|
|
96
|
+
# 🔹 Carrega versão e data formatada
|
|
97
|
+
# -------------------------------
|
|
98
|
+
RELEASE="${{ steps.detect.outputs.release }}"
|
|
99
|
+
[ -z "$RELEASE" ] && RELEASE=$(jq -r '.version' package.json)
|
|
100
|
+
|
|
101
|
+
DATE_BR="${{ steps.datefmt.outputs.formatted }}"
|
|
102
|
+
DATE_URL=${DATE_BR//\//%2F}
|
|
103
|
+
DATE_URL=${DATE_URL// /%20}
|
|
104
|
+
|
|
105
|
+
echo "🪶 Atualizando badges -> BUILD-${RELEASE} / UPDATE-${DATE_BR}"
|
|
106
|
+
|
|
107
|
+
# -------------------------------
|
|
108
|
+
# 🔹 Atualiza badges de BUILD e UPDATE
|
|
109
|
+
# -------------------------------
|
|
110
|
+
sed -i -E "s|https://img.shields.io/badge/[Bb][Uu][Ii][Ll][Dd]-[^\" >]*|https://img.shields.io/badge/Build-${RELEASE}-blue|gI" README.md
|
|
111
|
+
sed -i -E "s|https://img.shields.io/badge/[Uu][Pp][Dd][Aa][Tt][Ee]-[^\" >]*|https://img.shields.io/badge/Update-${DATE_URL}-green|gI" README.md
|
|
112
|
+
|
|
113
|
+
# -------------------------------
|
|
114
|
+
# 🔧 Corrige apenas src de badges (mantendo HTML e indentação)
|
|
115
|
+
# -------------------------------
|
|
116
|
+
# -------------------------------
|
|
117
|
+
# 🔧 Corrige badges mantendo HTML, espaçamento e evita duplicações
|
|
118
|
+
# -------------------------------
|
|
119
|
+
awk '
|
|
120
|
+
match($0, /src="([^"]*img\.shields\.io[^"]*)"/, m) {
|
|
121
|
+
url = m[1]
|
|
122
|
+
|
|
123
|
+
# Normaliza o URL (remove duplicações, erros, etc.)
|
|
124
|
+
gsub(/\?style=for-the-badge/, "", url)
|
|
125
|
+
gsub(/&style=for-the-badge/, "", url)
|
|
126
|
+
|
|
127
|
+
# Corrige escapes comuns
|
|
128
|
+
gsub(/\\\?/, "?", url)
|
|
129
|
+
gsub(/\\&/, "&", url)
|
|
130
|
+
gsub(/\\%2F/, "%2F", url)
|
|
131
|
+
gsub(/\\%20/, "%20", url)
|
|
132
|
+
|
|
133
|
+
# Se o style não existe, adiciona corretamente
|
|
134
|
+
if (url !~ /\?/) {
|
|
135
|
+
url = url "?style=for-the-badge"
|
|
136
|
+
} else if (url !~ /[?&]style=for-the-badge/) {
|
|
137
|
+
url = url "&style=for-the-badge"
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
# Garante que não repita
|
|
141
|
+
gsub(/\?style=for-the-badge\?style=for-the-badge/, "?style=for-the-badge", url)
|
|
142
|
+
gsub(/&style=for-the-badge&style=for-the-badge/, "&style=for-the-badge", url)
|
|
143
|
+
|
|
144
|
+
# Reconstrói a linha preservando indentação (10 espaços fixos)
|
|
145
|
+
prefix = substr($0, 1, match($0, /<img/) - 1)
|
|
146
|
+
printf "%10s<img src=\"%s\" alt=\"%s\">\n", "", url, "Badge"
|
|
147
|
+
next
|
|
148
|
+
}
|
|
149
|
+
{ print }
|
|
150
|
+
' README.md > README.tmp && mv README.tmp README.md
|
|
151
|
+
|
|
152
|
+
- name: ⏱️ Delay de segurança
|
|
153
|
+
if: steps.detect.outputs.updated == 'true'
|
|
154
|
+
run: |
|
|
155
|
+
echo "⏳ Aguardando 10 segundos antes do commit/push..."
|
|
156
|
+
sleep 10
|
|
157
|
+
|
|
158
|
+
- name: 🔍 Verificar resultado final
|
|
159
|
+
run: |
|
|
160
|
+
echo "🧾 Trecho atualizado do README:"
|
|
161
|
+
grep "img.shields.io" README.md | head -n 10
|
|
162
|
+
|
|
163
|
+
- name: 💾 Commit e push das alterações
|
|
164
|
+
if: steps.detect.outputs.updated == 'true'
|
|
165
|
+
env:
|
|
166
|
+
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
|
|
167
|
+
run: |
|
|
168
|
+
set -e
|
|
169
|
+
echo "💾 Preparando commit..."
|
|
170
|
+
git config --global user.name "Bot-Mwsm 🤖"
|
|
171
|
+
git config --global user.email "143403919+MKCodec@users.noreply.github.com"
|
|
172
|
+
git config --global commit.gpgsign false
|
|
173
|
+
|
|
174
|
+
# Evita erro de rebase (unstaged changes)
|
|
175
|
+
git stash --include-untracked || true
|
|
176
|
+
git pull --rebase origin main || true
|
|
177
|
+
git stash pop || true
|
|
178
|
+
|
|
179
|
+
git add README.md package.json version.json
|
|
180
|
+
|
|
181
|
+
if git diff --cached --quiet; then
|
|
182
|
+
echo "✅ Nenhuma alteração detectada — encerrando."
|
|
183
|
+
else
|
|
184
|
+
echo "🔄 Commitando e enviando alterações..."
|
|
185
|
+
git commit -m "🔄 Bot-Mwsm"
|
|
186
|
+
git push https://x-access-token:${PERSONAL_TOKEN}@github.com/${{ github.repository }}.git main
|
|
187
|
+
fi
|
|
188
|
+
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
name: 📦 Mwsm Publish Sync
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
id-token: write # necessário para OIDC / Trusted Publisher
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
publish:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- name: 🧩 Checkout do repositório
|
|
17
|
+
uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: ⚙️ Instalar jq (para editar package.json)
|
|
20
|
+
run: sudo apt-get update && sudo apt-get install -y jq
|
|
21
|
+
|
|
22
|
+
- name: 🧱 Corrigir nome do pacote temporariamente
|
|
23
|
+
run: |
|
|
24
|
+
cp package.json package_original.json
|
|
25
|
+
NAME=$(jq -r '.name' package.json)
|
|
26
|
+
LOWER=$(echo "$NAME" | tr '[:upper:]' '[:lower:]')
|
|
27
|
+
if [ "$NAME" != "$LOWER" ]; then
|
|
28
|
+
echo "🔧 Corrigindo nome do pacote: $NAME → $LOWER"
|
|
29
|
+
jq --arg name "$LOWER" '.name = $name' package.json > tmp.json && mv tmp.json package.json
|
|
30
|
+
else
|
|
31
|
+
echo "✅ Nome já está em minúsculas: $NAME"
|
|
32
|
+
fi
|
|
33
|
+
jq '.name' package.json
|
|
34
|
+
|
|
35
|
+
- name: ⚙️ Configurar Node.js (Trusted Publisher)
|
|
36
|
+
uses: actions/setup-node@v4
|
|
37
|
+
with:
|
|
38
|
+
node-version: 20
|
|
39
|
+
registry-url: 'https://registry.npmjs.org/'
|
|
40
|
+
always-auth: true
|
|
41
|
+
|
|
42
|
+
- name: 📦 Instalar dependências
|
|
43
|
+
run: |
|
|
44
|
+
if [ -f package-lock.json ]; then
|
|
45
|
+
npm ci --no-audit --no-fund
|
|
46
|
+
else
|
|
47
|
+
npm install --no-audit --no-fund
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
- name: 🚀 Publicar no npm (via OIDC / Trusted Publisher)
|
|
51
|
+
run: |
|
|
52
|
+
echo "🛰️ Publicando pacote via OIDC..."
|
|
53
|
+
npm publish --access public
|
|
54
|
+
continue-on-error: false
|
|
55
|
+
|
|
56
|
+
- name: ♻️ Restaurar package.json original
|
|
57
|
+
if: always()
|
|
58
|
+
run: |
|
|
59
|
+
if [ -f package_original.json ]; then
|
|
60
|
+
mv -f package_original.json package.json
|
|
61
|
+
echo "♻️ package.json restaurado ao original"
|
|
62
|
+
fi
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 ArsNova
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
<h1 align="center">📦 MkAuth WhatsApp Send Message (Mwsm)</h1>
|
|
2
|
+
<p align="center">
|
|
3
|
+
<a href="javascript:void(0)">
|
|
4
|
+
<img src="https://img.shields.io/badge/Build-3.0.1-blue?style=for-the-badge" alt="Badge">
|
|
5
|
+
</a>
|
|
6
|
+
<a href="javascript:void(0)">
|
|
7
|
+
<img src="https://img.shields.io/badge/Update-14%2F10%2F2025%2020:44-green?style=for-the-badge" alt="Badge">
|
|
8
|
+
</a>
|
|
9
|
+
<a href="https://github.com/MKCodec/Mwsm">
|
|
10
|
+
<img src="https://img.shields.io/github/stars/MKCodec/Mwsm?style=for-the-badge" alt="Badge">
|
|
11
|
+
</a>
|
|
12
|
+
<a href="https://github.com/MKCodec/Mwsm/issues">
|
|
13
|
+
<img src="https://img.shields.io/github/issues/MKCodec/Mwsm?style=for-the-badge" alt="Badge">
|
|
14
|
+
</a>
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<p align="center">
|
|
18
|
+
<img src="https://raw.githubusercontent.com/MKCodec/Mwsm/main/img/Mwsm.png?style=for-the-badge" width="600" alt="Mwsm Logo"/>
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
<h3 align="center">💖 Apoie o projeto Mwsm:</h3>
|
|
22
|
+
<p align="center">
|
|
23
|
+
<a href="https://github.com/sponsors/MKCodec" target="_blank">
|
|
24
|
+
<img src="https://img.shields.io/github/sponsors/MKCodec?label=Sponsors&logo=github&style=for-the-badge" alt="Badge">
|
|
25
|
+
</a>
|
|
26
|
+
<a href="https://ko-fi.com/mkcodec" target="_blank">
|
|
27
|
+
<img src="https://img.shields.io/badge/Ko--fi-5-FF5E5B?logo=ko-fi&logoColor=white&style=for-the-badge" alt="Badge">
|
|
28
|
+
</a>
|
|
29
|
+
<a href="https://mkcodec.github.io/Mwsm/pix.html" target="_blank">
|
|
30
|
+
<img src="https://img.shields.io/badge/PIX-Doar-32CD32?logo=pix&logoColor=white&style=for-the-badge" alt="Badge">
|
|
31
|
+
</a>
|
|
32
|
+
</p>
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## 🚀 Sobre o Projeto
|
|
40
|
+
|
|
41
|
+
O **Mwsm** é uma API que integra notificações automatizadas por **WhatsApp** ao sistema **MkAuth**.
|
|
42
|
+
Ela permite disparar mensagens, sincronizar cobranças e automatizar comunicações com seus clientes.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 🧩 Compatibilidade
|
|
47
|
+
|
|
48
|
+
| Gateway/Banco | BAR | PIX | QR | QRL | PDF |
|
|
49
|
+
| -------------- | --- | --- | -- | --- | --- |
|
|
50
|
+
| **Gerencianet** | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
51
|
+
| **Iugu** | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
52
|
+
| **GalaxPay** | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
53
|
+
| **Santander** | ✅ | ❌ | ❌ | ❌ | ✅ |
|
|
54
|
+
|
|
55
|
+
> ⚠️ Compatibilidade relatada por usuários. Pode funcionar com outros gateways não listados.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 🧠 Requisitos
|
|
60
|
+
|
|
61
|
+
- Servidor Linux (Ubuntu, Debian ou Proxmox)
|
|
62
|
+
- [API MkAuth](https://github.com/MKCodec/MkAuth-API) modificada para uso com Mwsm
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## ⚙️ Instalação
|
|
67
|
+
|
|
68
|
+
### Pré-instalação
|
|
69
|
+
|
|
70
|
+
Execute no MkAuth se o Mwsm for instalado separadamente:
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
cd ~ && sudo wget https://raw.githubusercontent.com/MKCodec/MkAuth-API/main/titulo.api -O /opt/mk-auth/api/titulo.api
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Instalação
|
|
77
|
+
|
|
78
|
+
Rode o instalador (Ubuntu/Proxmox ou Debian/MkAuth):
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
bash <(wget -qO- "https://raw.githubusercontent.com/MKCodec/Mwsm/refs/heads/main/bash/setup.sh?nocache=$(date +%s)")
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
<details>
|
|
87
|
+
<summary>🧭 Configuração</summary>
|
|
88
|
+
|
|
89
|
+
### 1️⃣ Ative o Túnel Dev API no MkAuth
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
Opções > Rede do Servidor > MkTunel > (Ativar e Gravar)
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+

|
|
96
|
+
|
|
97
|
+
### 2️⃣ Ative os Endpoints `titulo.api GET` e `cliente.api GET`
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
Provedor > Controle de Usuarios > API
|
|
101
|
+
ou
|
|
102
|
+
Provedor > DEV > API do Usuario
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+

|
|
106
|
+
|
|
107
|
+
### 3️⃣ Acesse o servidor via IP:PORTA
|
|
108
|
+
|
|
109
|
+

|
|
110
|
+
|
|
111
|
+
### 4️⃣ Escaneie o QR Code com o WhatsApp
|
|
112
|
+
|
|
113
|
+

|
|
114
|
+
|
|
115
|
+
### 5️⃣ Configure a API do MkAuth no Mwsm
|
|
116
|
+
|
|
117
|
+
| Campo | Descrição |
|
|
118
|
+
| ------ | ---------- |
|
|
119
|
+
| `TUNEL` | URL do túnel configurado no MkAuth |
|
|
120
|
+
| `CLIENT` | Código do cliente |
|
|
121
|
+
| `SECRET` | Código secreto |
|
|
122
|
+
| `DOMAIN` | Domínio/IP do servidor MkAuth |
|
|
123
|
+
| `VERSION` | Selecione v1 ou v2 |
|
|
124
|
+
| `MODE` | Escolha o tipo de conexão |
|
|
125
|
+
|
|
126
|
+

|
|
127
|
+
|
|
128
|
+
</details>
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
<details>
|
|
133
|
+
<summary>📊 Gerenciamento</summary>
|
|
134
|
+
|
|
135
|
+
Escolha seu gerenciador principal: **MkAuth** ou **Mwsm**.
|
|
136
|
+
|
|
137
|
+
### 🧩 MkAuth
|
|
138
|
+
|
|
139
|
+
1️⃣ Configure o servidor no MkAuth seguindo as instruções do painel web.
|
|
140
|
+
|
|
141
|
+
**Senha:** insira o *Token fixo* de acesso.
|
|
142
|
+
|
|
143
|
+
#### MkAuth até versão 24.02
|
|
144
|
+
```
|
|
145
|
+
Opções > Servidor de SMS > Servidor
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+

|
|
149
|
+
|
|
150
|
+
#### MkAuth 24.03 ou superior
|
|
151
|
+
```
|
|
152
|
+
Opções > Servidor de WhatsApp > Servidor
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+

|
|
156
|
+
|
|
157
|
+
### 🧩 Mwsm
|
|
158
|
+
|
|
159
|
+
No Mwsm:
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
Settings > API > Tela 2
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
As mensagens são disparadas conforme o agendamento configurado na API.
|
|
166
|
+
|
|
167
|
+

|
|
168
|
+
|
|
169
|
+
</details>
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## 💬 Dúvidas, Erros e Suporte
|
|
174
|
+
|
|
175
|
+
Se ocorrerem erros, ative o modo **Debug** em:
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
Settings > Extras > Debug ON
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Em caso de persistência, visite o fórum oficial:
|
|
182
|
+
🔗 [https://mk-auth.com.br/forum/topics/envio-de-mensagem-via-whatsapp-100-gratuito](https://mk-auth.com.br/forum/topics/envio-de-mensagem-via-whatsapp-100-gratuito)
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## 💖 Doações PIX
|
|
187
|
+
|
|
188
|
+
Apoie o projeto e ajude a manter o **Mwsm** gratuito e atualizado.
|
|
189
|
+
|
|
190
|
+

|
|
191
|
+
|
|
192
|
+
**Chave:**
|
|
193
|
+
```sh
|
|
194
|
+
e9b9d669-4412-4dec-994c-310005904088
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**Copia e Cola:**
|
|
198
|
+
```sh
|
|
199
|
+
00020126580014BR.GOV.BCB.PIX0136e9b9d669-4412-4dec-994c-3100059040885204000053039865802BR5924CLEBER FERREIRA DE SOUZA6007CARUARU62070503***63045854
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
<p align="center">© 2025 MkAuth WhatsApp Send Message - Desenvolvido por MKCodec</p>
|