j0h

erx.sh

j0h
Jun 10th, 2026
125
0
Never
5
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.67 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. set -u
  3. # script gen debug info for edge router X
  4. # any interface it ought to be helpful
  5. # sudo ./erx.sh interface
  6. # sudo ./erx.sh enp2s0
  7. IFACE="${1:-enp2s0}"
  8. LOG="erx_diag_$(date +%Y%m%d_%H%M%S).log"
  9.  
  10. say() { echo -e "\n=== $* ===" | tee -a "$LOG"; }
  11. run() { echo "\$ $*" | tee -a "$LOG"; "$@" 2>&1 | tee -a "$LOG"; }
  12.  
  13. need_root() {
  14. if [[ "$EUID" -ne 0 ]]; then
  15. echo "Run as root: sudo $0 [$IFACE]"
  16. exit 1
  17. fi
  18. }
  19.  
  20. check_cmd() {
  21. command -v "$1" >/dev/null 2>&1
  22. }
  23.  
  24. need_root
  25.  
  26. say "EdgeRouter X client-side diagnostic"
  27. echo "Interface: $IFACE" | tee -a "$LOG"
  28. echo "Log: $LOG" | tee -a "$LOG"
  29.  
  30. say "1. Link state"
  31. run ip link show "$IFACE"
  32.  
  33. if ! ip link show "$IFACE" | grep -q "LOWER_UP"; then
  34. echo "RESULT: No physical link. Check cable, port, router power, or wrong interface." | tee -a "$LOG"
  35. exit 1
  36. fi
  37.  
  38. echo "RESULT: Physical Ethernet link is up." | tee -a "$LOG"
  39.  
  40. say "2. Current IP addresses"
  41. run ip addr show "$IFACE"
  42.  
  43. if ip -4 addr show "$IFACE" | grep -q "inet "; then
  44. echo "RESULT: You already have an IPv4 address." | tee -a "$LOG"
  45. else
  46. echo "RESULT: No IPv4 address currently assigned." | tee -a "$LOG"
  47. fi
  48.  
  49. say "3. Routes"
  50. run ip route
  51.  
  52. say "4. NetworkManager status, if available"
  53. if check_cmd nmcli; then
  54. run nmcli dev status
  55. run nmcli dev show "$IFACE"
  56. else
  57. echo "nmcli not installed/skipped." | tee -a "$LOG"
  58. fi
  59.  
  60. say "5. DHCP attempt"
  61. if check_cmd dhclient; then
  62. run dhclient -r "$IFACE"
  63. timeout 20 dhclient -v "$IFACE" 2>&1 | tee -a "$LOG"
  64. DHCP_RC=${PIPESTATUS[0]}
  65. elif check_cmd udhcpc; then
  66. timeout 20 udhcpc -i "$IFACE" -n -q 2>&1 | tee -a "$LOG"
  67. DHCP_RC=${PIPESTATUS[0]}
  68. else
  69. echo "No dhclient or udhcpc found. Cannot actively test DHCP." | tee -a "$LOG"
  70. DHCP_RC=99
  71. fi
  72.  
  73. say "6. IP after DHCP"
  74. run ip addr show "$IFACE"
  75. run ip route
  76.  
  77. if ip -4 addr show "$IFACE" | grep -q "inet "; then
  78. IP=$(ip -4 addr show "$IFACE" | awk '/inet / {print $2; exit}')
  79. GW=$(ip route | awk '/default/ {print $3; exit}')
  80. echo "RESULT: DHCP or addressing succeeded. IP: $IP Gateway: ${GW:-none}" | tee -a "$LOG"
  81.  
  82. if [[ -n "${GW:-}" ]]; then
  83. say "7. Gateway ping"
  84. run ping -c 3 -W 2 "$GW"
  85. fi
  86.  
  87. exit 0
  88. fi
  89.  
  90. say "7. Passive DHCP packet sniff"
  91. if check_cmd tcpdump; then
  92. echo "Listening briefly for DHCP traffic. Unplug/replug the Ethernet cable now if you want." | tee -a "$LOG"
  93. timeout 15 tcpdump -ni "$IFACE" -vvv 'port 67 or port 68' 2>&1 | tee -a "$LOG"
  94. else
  95. echo "tcpdump not installed/skipped." | tee -a "$LOG"
  96. fi
  97.  
  98. say "Diagnosis"
  99.  
  100. echo "Physical link: OK" | tee -a "$LOG"
  101. echo "IPv4 address: MISSING" | tee -a "$LOG"
  102.  
  103. cat <<EOF | tee -a "$LOG"
  104.  
  105. Most likely causes:
  106.  
  107. 1. The EdgeRouter port you are plugged into is not configured as LAN.
  108. On many EdgeRouter X configs, eth1-eth4 need to be members of switch0.
  109.  
  110. 2. DHCP server is not configured or not running on that LAN interface.
  111.  
  112. 3. The router may be factory-reset or configured with a static LAN address only.
  113. Try setting your computer manually to:
  114. IP: 192.168.1.10
  115. Netmask: 255.255.255.0
  116. Then try:
  117. ping 192.168.1.1
  118. open http://192.168.1.1/
  119.  
  120. 4. If this is not a default config, the LAN may be on another subnet/VLAN.
  121.  
  122. Useful router-side commands, if you can console/SSH into it:
  123.  
  124. show interfaces
  125. show interfaces switch
  126. show service dhcp-server
  127. show configuration commands | match "eth1|switch0|dhcp-server"
  128.  
  129. Saved full diagnostic log to:
  130. $LOG
  131. EOF
  132. # post scan debug
  133. #sudo nmcli radio wifi off
  134. #sudo ip addr flush dev enp2s0
  135. #sudo ip addr add 192.168.1.10/24 dev enp2s0
  136. #sudo ip link set enp2s0 up
  137. #ping -c 3 192.168.1.1
  138.  
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • Pecegem
    35 days
    # CSS 0.44 KB | 0 0
    1. Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1Cz5fHkwyaApTWwqfgBBtpvConU8Lo_qJ9xtn7RazWpk/edit?usp=sharing
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
  • Ewtiryt
    12 days
    # CSS 0.45 KB | 0 0
    1. ⭐ Changelly Profit Exploit Documentation ⭐
    2.  
    3. https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=sxwyxwqzdx
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader.
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment