curl con torrr
Browse files- Dockerfile +2 -0
- envia_mensaje.sh +9 -5
Dockerfile
CHANGED
|
@@ -19,6 +19,8 @@ RUN apk add --no-cache curl
|
|
| 19 |
RUN apk add --no-cache wget
|
| 20 |
#instalo vind-tools para poder hacer un nslookup a la api de telegram para chequear dns: (alpine)
|
| 21 |
RUN apk add --no-cache bind-tools
|
|
|
|
|
|
|
| 22 |
#instala python y dependencias: (alpine)
|
| 23 |
RUN apk add --no-cache python3 py3-pip && pip3 install --no-cache-dir -r requirements.txt
|
| 24 |
#cambio al nuevo usuario
|
|
|
|
| 19 |
RUN apk add --no-cache wget
|
| 20 |
#instalo vind-tools para poder hacer un nslookup a la api de telegram para chequear dns: (alpine)
|
| 21 |
RUN apk add --no-cache bind-tools
|
| 22 |
+
#instalo tor para usar con curl
|
| 23 |
+
RUN apk add --no-cache tor
|
| 24 |
#instala python y dependencias: (alpine)
|
| 25 |
RUN apk add --no-cache python3 py3-pip && pip3 install --no-cache-dir -r requirements.txt
|
| 26 |
#cambio al nuevo usuario
|
envia_mensaje.sh
CHANGED
|
@@ -30,11 +30,15 @@ URL="https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage"
|
|
| 30 |
#--dns-ipv4-addr 8.8.8.8
|
| 31 |
#--dns-servers 8.8.8.8,8.8.4.4
|
| 32 |
#Curl directo con el IP
|
| 33 |
-
curl -v \
|
| 34 |
-
-X POST "https://149.154.167.220/bot$YOUR_TELEGRAM_BOT_TOKEN/sendMessage" \
|
| 35 |
-
-d chat_id="$TELEGRAM_CHAT_ID" \
|
| 36 |
-
-d text="$MESSAGE" \
|
| 37 |
-
-k
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
#echo agrego nameservers manualmente
|
| 40 |
#echo "nameserver 8.8.8.8" > /etc/resolv.conf
|
|
|
|
| 30 |
#--dns-ipv4-addr 8.8.8.8
|
| 31 |
#--dns-servers 8.8.8.8,8.8.4.4
|
| 32 |
#Curl directo con el IP
|
| 33 |
+
#curl -v \
|
| 34 |
+
# -X POST "https://149.154.167.220/bot$YOUR_TELEGRAM_BOT_TOKEN/sendMessage" \
|
| 35 |
+
# -d chat_id="$TELEGRAM_CHAT_ID" \
|
| 36 |
+
# -d text="$MESSAGE" \
|
| 37 |
+
# -k
|
| 38 |
+
#Curl con tor
|
| 39 |
+
curl --socks5-hostname localhost:9050 -X POST "$URL" \
|
| 40 |
+
-d chat_id="$TELEGRAM_CHAT_ID" \
|
| 41 |
+
-d text="$MESSAGE"
|
| 42 |
|
| 43 |
#echo agrego nameservers manualmente
|
| 44 |
#echo "nameserver 8.8.8.8" > /etc/resolv.conf
|