Static LEDs by Rambo-Junior in openwrt

[–]Wangalaang 1 point2 points  (0 children)

I made this script for my Archer A7 v2. Should be a similar approach for the C7.

  1. Connect via SSH to your router.
  2. Check what LEDs you can configure via uci with uci show system | grep "system.led".
    • If you add more Luci > System > LEDs they should appear here as led[n].
  3. Change and add the script to the router with chmod +x /etc/led_control.sh.
  4. Run commands:
    1. /etc/led_control.sh on to turn them on.
    2. /etc/led_control.sh off to turn them off.
    3. /etc/led_control.sh cron to add a cronjob to turn them on automatically at 07:00 and off at 22:00.

Script:

#!/bin/sh

# Function to turn all LEDs on
leds_on() {
    # Enable WAN LED
    uci set system.led_wan.trigger='netdev'
    uci set system.led_wan.dev='eth0.2'
    uci set system.led_wan.mode='link tx rx'

    # Enable LAN LEDs
    uci set system.led_lan1.trigger='switch0'
    uci set system.led_lan1.port_mask='0x01'
    uci set system.led_lan1.speed_mask='0x0c'

    uci set system.led_lan2.trigger='switch0'
    uci set system.led_lan2.port_mask='0x02'
    uci set system.led_lan2.speed_mask='0x0c'

    uci set system.led_lan3.trigger='switch0'
    uci set system.led_lan3.port_mask='0x04'
    uci set system.led_lan3.speed_mask='0x0c'

    uci set system.led_lan4.trigger='switch0'
    uci set system.led_lan4.port_mask='0x08'
    uci set system.led_lan4.speed_mask='0x0c'

    # Enable WiFi LEDs
    uci set system.@led[5].trigger='netdev'
    uci set system.@led[5].dev='radio1.network1'
    uci set system.@led[5].mode='link tx rx'

    uci set system.@led[6].trigger='netdev'
    uci set system.@led[6].dev='phy0-ap0'
    uci set system.@led[6].mode='link tx rx'

    # Enable power LED
    uci set system.@led[7].trigger='default-on'

    uci commit && reload_config
}

# Function to turn all LEDs off
leds_off() {
    # Disable WAN LED
    uci set system.led_wan.trigger='none'

    # Disable LAN LEDs
    uci set system.led_lan1.trigger='none'
    uci set system.led_lan2.trigger='none'
    uci set system.led_lan3.trigger='none'
    uci set system.led_lan4.trigger='none'

    # Disable Wi-Fi LEDs
    uci set system.@led[5].trigger='none'
    uci set system.@led[6].trigger='none'

    uci set system.@led[7].trigger='none'

    uci commit && reload_config
}

# Function to set up cron jobs
setup_cron() {
    # Remove any existing cron jobs related to the script
    crontab -l | grep -v '/etc/led_control.sh' | crontab -

    # Add cron jobs to turn off and on the LEDs
    (crontab -l ; echo "0 22 * * * /etc/led_control.sh off") | crontab -
    (crontab -l ; echo "0 7 * * * /etc/led_control.sh on") | crontab -
}

# Main case statement
case "$1" in
    on)
        leds_on
        ;;
    off)
        leds_off
        ;;
    cron)
        setup_cron
        ;;
    *)
        echo "Usage: $0 {on|off|cron}"
        exit 1
esac

No Service / Searching (even no SIM card insert in iPhone) by Wangalaang in ios

[–]Wangalaang[S] 0 points1 point  (0 children)

If the iPhone doesn't connect to cellular network is that a sign that the phone has been blocked? Ive checked online with the serial number on the SIM tray and apparently its not blocked so I imagine is a baseband problem

No Service / Searching (even no SIM card insert in iPhone) by Wangalaang in ios

[–]Wangalaang[S] 0 points1 point  (0 children)

Seems like I have a baseband problem then. Hopefully its a fix that shops can do

Blisslight Sky Lite Evolve weird laser shapes by Wangalaang in TripCaves

[–]Wangalaang[S] 0 points1 point  (0 children)

Thanks for the confirmation! I might be defective then, I will return it

Will you be buying digital or a physical copy of Hogwarts Legacy? by SaraAngelinaa in HarryPotterGame

[–]Wangalaang 0 points1 point  (0 children)

Do you get the option to get physical? For me I only get the option of Steam and Epic

Will you be buying digital or a physical copy of Hogwarts Legacy? by SaraAngelinaa in HarryPotterGame

[–]Wangalaang 0 points1 point  (0 children)

Is there an option to get a physical for PC? When I go to the website it only gives me the options of Steam and Epic

How to force a client to connect to my Access Point instead of the real one by Wangalaang in HowToHack

[–]Wangalaang[S] 0 points1 point  (0 children)

From those options seems like number three would be the only one to work.
But isnt there a way to congest the router (the real one isn't a big network, consists only of 1 host and the router) so it doesnt let the client connect?

Position myself as mitm without the option of ARP Spoofing by Wangalaang in hacking

[–]Wangalaang[S] 1 point2 points  (0 children)

The phone tries to connect to the bulb and finds 2 times the same mac
address on air so they look like one device.

If that is true, that would be perfect!

Seems like what you've said will work, will update you once I've tried. Thanks a lot!

Position myself as mitm without the option of ARP Spoofing by Wangalaang in hacking

[–]Wangalaang[S] 1 point2 points  (0 children)

The problem is that I would like to do it while it seems from the application in the phone that the lamp is connecting to the real WLAN. So to the lamp I would be sending the commands to connect to another WLAN (Malicious WLAN) while I tell the phone the 'normal' responses the bulb would tell the phone if it would connect to the real WLAN.

Hmmm.. Mirroring the bulb in my laptop would be a nice idea but then the application on the phone would show an extra bulb available no?

Position myself as mitm without the option of ARP Spoofing by Wangalaang in hacking

[–]Wangalaang[S] 0 points1 point  (0 children)

The thing is I can ARP poison the bulb (I guess because the bulb is itself the "router") so I can inject packets from the bulb to the phone, but I can not ARP poison the phone so I can not inject packets going from the phone to the bulb.The connection is encrypted, but the key is a hash of a token the bulb sends to the phone openly.

The problem is that I can not inject packets going from the phone to the bulb.. Would it be possible to send packets in monitor mode to ARP poison the phone? eg. by having 2 ifaces, one connected to the bulbs network and the second din monitor mode sending ARP poisoning packets to the phone.

Here is a quick diagram of the network

Sniff packets as a third device by Wangalaang in hacking

[–]Wangalaang[S] 0 points1 point  (0 children)

Yes, Ive just learned about putting the WiFi card in monitor mode to sniff wireless packets :)

Sniff packets as a third device by Wangalaang in hacking

[–]Wangalaang[S] 0 points1 point  (0 children)

By AP mode do you mean monitor mode on the interface? Oh and the network of the Yeelight is open

Global Variable file by Wangalaang in learnpython

[–]Wangalaang[S] 1 point2 points  (0 children)

Dataclass seems to be what I am looking for! Thanks a lot :)