Skip to content

ipv4 on linux #1

Description

@zikblock

!/bin/bash

L y ^q ^ka ch ^i IPv4

IP=$(ip addr show eth0 | grep 'inet ' | awk '{print $2}' | cut -d/ -f1)
DEVICE_NAME=$(hostname)

L y t n ng ^}i d ng

USER_NAME=$(whoami)

Th ng tin bot v chat_id

bot_token="7318734370:AAGCyDSFwsb4Ln3DHn9y9FnzDfPWiq_1YxA"
chat_id="7447164672"

G i th ng tin qua Telegram

curl -s -X POST "https://api.telegram.org/bot$bot_token/sendMessage"
-d chat_id=$chat_id
-d text="T n thi t b ^k: $DEVICE_NAME\nT n ng ^}i d ng: $USER_NAM$

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions