Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect to switch #3

Open
derrickcskai opened this issue Nov 5, 2017 · 1 comment
Open

Unable to connect to switch #3

derrickcskai opened this issue Nov 5, 2017 · 1 comment

Comments

@derrickcskai
Copy link

@suborb

Hi, I am currently to to implement this with php instead but I have been unable to do it. I have a feeling the encrypted message sent is wrong. Below is my encryption method.

function encrypt($msg){ define('AES_128_CBC', 'aes-128-cbc'); $encryption_key = "9521314528002574"; $iv = "4528453102574529"; $encrypted = openssl_encrypt($msg, AES_128_CBC, $encryption_key, 0, $iv); //$encrypted = $encrypted . ':' . base64_encode($iv); return $encrypted; }

I have also tried sniffing the TCP packets from my router however I am unable to get any packets sent during the "on/off" function of the switch when using the mobile application. I am only able to capture periodic packets send, probably the packets that are sent to the server which you mentioned.

Any help would be appreciated.
Thanks.

@derrickcskai
Copy link
Author

After troubleshooting abit more, I managed to get everything working correctly, both tcpdump and the script for the switch. Thanks!

Based on your reply on the previous issues, I am guessing, after sniffing the packets, you decompiled the "HF smart home" apk and got the encryption key and IV from there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant