guino / BazzDoorbell

128 stars 22 forks source link

Same as #105 NO Telnet NO port 8554 #107

Open aladin2000 opened 1 year ago

aladin2000 commented 1 year ago

I followed all the #105 case and I have same doorbell and get trouble to make hack work.... tmp/hack has only time inside, "Thu Jan 1 08:00:13 CST 1970" but not done. Thought #105 helped but nothing work , no telnet, no video ... What I noticed is that env file is 'corrupted' truncated as the following

mem=64M console=ttySAK0,115200n8 loglevel=10 mtdparts=spi0.0:256k(bld),64k(env),64k(enc),64k(sysflg),3m(sys),4032k(app),640k(cfg) ppsAppParts=5 ip=0 - ip=30;/mnt/mmc01/initrun.sh)&:::::;date>/tmp/hack;(sleep

http://192.168.1.44:8090/devices/deviceinfo { "devname": "Smart Home Camera", "model": "Bell 8S", "serialno": "0652*", "softwareversion": "4.0.7", "hardwareversion": "BE8S_A2_V10_433", "firmwareversion": "ppstrong-a3-tuya2_general-4.0.7.20210513", "identity": "M4L0125C7***", "authkey": "8aDs**", "deviceid": "pp0134393e6****", "pid": "aaa", "WiFi MAC": "84:7a:::**", "ETH MAC": "00:00:00:00:00:00" }

http://192.168.1.44:8090/proc/self/root/home/cfg/tuya_config.json: { "version": 1, "sleep_mode": 0, "alarm_fun_onoff": 0, "alarm_fun_sensitivity": 1, "alarm_fun_mode_switch": 0, "alarm_fun_time_start": 0, "alarm_fun_time_end": 0, "flip_onoff": 0, "light_onoff": 1, "night_mode": 0, "sound_detect_onoff": 0, "sound_detect_sensitivity": 0, "watermark_onoff": 1, "event_record_time": 60, "enable_event_record": 1, "record_enable": 1, "motion_trace": 1, "motion_area_switch": 0, "motion_area": "", "motion_tracking": 0, "cry_detection_switch": 0, "humanoid_filter": 0, "loudspeaker_vol_pct": 50, "jingle_mode": 1, "jingle_sound": 1, "jingle_volume": 100, "jingle_exist": 1, "onvif_enable": 1, "onvif_pwd": "****" }

I also test y=the size of busybox seems correct bewteen two test one is 1084K (old recommanded in the case) and the other one is the recommanded one ~1226Ko

Question: I follow your recommandations "here to root your device: https://github.com/guino/Merkury1080P#conclusion -- you can't use https://github.com/guino/BazzDoorbell/issues/90..."

any idea/clue of what could be wrong...

guino commented 1 year ago

@aladin2000 can you post a zip of your SD card files (without the SDT folder) so I can review it ? The cmdline you have seems correct, so we just need to check your SD card files.

aladin2000 commented 1 year ago

@aladin2000 can you post a zip of your SD card files (without the SDT folder) so I can review it ? The cmdline you have seems correct, so we just need to check your SD card files.

--deleted--

guino commented 1 year ago

@aladin2000 with your current set of files I'd expect telnet to be working as your busybox file seems correct and your telnet line has -l /bin/sh so it should not need a password.

I did notice your mqtt_pub and dropbearmulti files were downloaded incorrectly but that should not affect telnet.

Can you try removing the ppsapp file from the SD card to see how it behaves ? Some devices don't like it when you kill ppsapp and run it again (which is what happens when that file is in the root of the SD card).

Additionally, I suggest you to remove/comment the line calling the offline.sh script (for testing) -- that script will basically turn off the wifi for some time to force-drop connections to the tuya servers then turn it back on, so if you're trying to connect to telnet while this is happening it won't work (because it is disconnected).

Other than that make sure you're using telnet on port 23 (not ssh on port 22) .

Have you tried browsing the files in the device with http://IP:8080/ to see if it works ?

aladin2000 commented 1 year ago

I am in action for your remarks... I will tell you soon in fact my nmap does not find 8080 as opened show anly port Nmap scan report for 192.168.1.44 Host is up (0.055s latency). Not shown: 997 closed ports PORT STATE SERVICE 6668/tcp open irc 8000/tcp open http-alt 8090/tcp open opsmessaging another ry with -p 8080

8080/tcp closed http-proxy

another try with -p 23

PORT STATE SERVICE 23/tcp closed telnet

of course telnet not ssh as basic telnet not OK, ssh will be next step....

aladin2000 commented 1 year ago

Can you try removing the ppsapp file from the SD card to see how it behaves ? Some devices don't like it when you kill ppsapp and run it again (which is what happens when that file is in the root of the SD card).

Additionally, I suggest you to remove/comment the line calling the offline.sh script (for testing) -- that script will basically turn off the wifi for some time to force-drop connections to the tuya servers then turn it back on, so if you're trying to connect to telnet while this is happening it won't work (because it is disconnected).

Other than that make sure you're using telnet on port 23 (not ssh on port 22) .

  Can you try removing the ppsapp file from the SD = Done
  comment the line calling the offline.sh script (for testing) --Done

  root@Mini-PC:/tmp # nmap 192.168.1.44
      Starting Nmap 7.80 ( https://nmap.org ) at 2023-05-30 18:57 CEST
      Nmap scan report for 192.168.1.44
      Host is up (0.069s latency).
      Not shown: 997 closed ports
      PORT     STATE SERVICE
      6668/tcp open  irc
      8000/tcp open  http-alt
      8090/tcp open  opsmessaging

same thing not telnet at all....

Do you have the realPath of Debug file ?

guino commented 1 year ago

There's no debug file, the ppsapp output log is discarded by the device unless we redirect it somewhere.

At a closer look, it seems your custom.sh file is in windows format (so it has CR+LF at the end of each line) -- I assume this is causing the custom.sh file to not run/correctly.

Please download/unzip/try this custom.sh (the file you sent me with the format converted to linux): custom.zip

aladin2000 commented 1 year ago

Yep , it works now . 23 open 8080 opened ... Great !!! you are magic... So crasy to fall in that Basics.... what a shame on me !

aladin2000 commented 1 year ago

Let me ask you another things about password defintion (DES ). I create a couple myuser:MyDESCrypto:0:0:root:/bin/sh
I used the new runinit.sh ( like in #90 script with all services included version for homeassistant but without offline.sh )

I can't connect with that credentials and the process telnetd died .... on port 8080 , I tried to connnect with firefox browther without success too. pb of credentials

I will come backward with original initrun.sh but wanted to know how to have a respawn of telnetd in case of process crash like now ? do you have a clue for getting ride of that credentials problem ?

guino commented 1 year ago

@aladin2000 you could use the telneton/off scripts from here: https://github.com/guino/LSCOutdoor1080P/tree/main/mmc/cgi-bin and just remove it from custom.sh if you don't want to worry about setting credentials.

I just verified this worked on my device: myuser:KNPzX1G7pptjU:0:0:root:/bin/sh (password is: secret )

If this doesn't work on your device maybe there's something different about your firmware.

Usually when the process dies is either because of memory or networking issues. I'm not very familiar with the #90 script so I can't say for sure what's going on.

Is there a specific reason you're using #90 and not the standard scripts ? on firmware 4.0.7 you can usually enable RTSP using the json file, and you can get log_parser to work without having to kill/re-run ppsapp so the only reason to use #90 would be if you made 'some other' modification to ppsapp ?

aladin2000 commented 1 year ago

Hi I am not at home for june. May be do recommandation end of june I will let you Know as soin as possible Regards

2 juin 2023 17:22:56 Wagner @.***>:

@aladin2000[https://github.com/aladin2000] you could use the telneton/off scripts from here: https://github.com/guino/LSCOutdoor1080P/tree/main/mmc/cgi-bin and just remove it from custom.sh if you don't want to worry about setting credentials.

I just verified this worked on my device: myuser:KNPzX1G7pptjU:0:0:root:/bin/sh (password is: secret )

If this doesn't work on your device maybe there's something different about your firmware.

Usually when the process dies is either because of memory or networking issues. I'm not very familiar with the #90[https://github.com/guino/BazzDoorbell/issues/90] script so I can't say for sure what's going on.

Is there a specific reason you're using #90[https://github.com/guino/BazzDoorbell/issues/90] and not the standard scripts ? on firmware 4.0.7 you can usually enable RTSP using the json file, and you can get log_parser to work without having to kill/re-run ppsapp so the only reason to use #90[https://github.com/guino/BazzDoorbell/issues/90] would be if you made 'some other' modification to ppsapp ?

— Reply to this email directly, view it on GitHub[https://github.com/guino/BazzDoorbell/issues/107#issuecomment-1573919014], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AD7K4I6WZJTYX6PI57MUWBDXJIAM7ANCNFSM6AAAAAAYUFCX44]. You are receiving this because you were mentioned.[Image de pistage][https://github.com/notifications/beacon/AD7K4I5ZZEZC3R4TKC7K2D3XJIAM7A5CNFSM6AAAAAAYUFCX46WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTS52AMSM.gif]