Dear friends,
does somebody achieved to access the amcrest websites of the cams and nvr without always manually adding the password. I'am searching for code snippets (for PHP scrips) or other approaches (e.g. proxy server?) to implement the access to the nvr website automatically only within my own LAN.
I need this for the integration of the nvr cam overviews for my home automation system. Within this system I'am able to show websites within the layout but this only make sense without an authorization.
I already find some approaches regarding cross window communication but none of these approaches will work.
Important is that don't look for rtsp streams or the discussed digest authorization stuff, because I'd like to directly access the nvr website with the cam overview.
I really would appreciate any help or your experience regarding this aspect
Web Access to Cams and NVR with autologin (by script)
-
- Posts: 4
- Joined: Sun Jun 03, 2018 9:45 am
Re: Web Access to Cams and NVR with autologin (by script)
I will be interested to see what replies you get.
IP2M-841
Re: Web Access to Cams and NVR with autologin (by script)
Have you researched PERL EXPECT command? (don't know if it will help you... but PHP+PERL "should" work.
-
- Posts: 4
- Joined: Sun Jun 03, 2018 9:45 am
Re: Web Access to Cams and NVR with autologin (by script)
Hello Hermann,
thank for your answer - I did some research and found some "nice" snippets (e.g.:https://www.ibm.com/developerworks/libr ... erlsecure/) but the problem is that the amcrest site uses javascript when clicking the button and the perl module WWW::Mechanize does not support Javascript.
Therefore I'm back to the beginning.
Does anyone has another idea - just to make it clear I just want to do a autologin (knowing the user and password).
thank for your answer - I did some research and found some "nice" snippets (e.g.:https://www.ibm.com/developerworks/libr ... erlsecure/) but the problem is that the amcrest site uses javascript when clicking the button and the perl module WWW::Mechanize does not support Javascript.
Therefore I'm back to the beginning.
Does anyone has another idea - just to make it clear I just want to do a autologin (knowing the user and password).
-
- Posts: 4
- Joined: Sun Jun 03, 2018 9:45 am
Re: Web Access to Cams and NVR with autologin (by script)
Hy, I got something working with vbs:
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshExec = WshShell.exec("C:\Program Files (x86)\Internet Explorer\iexplore.exe http://192.168.xxx.xxx")
wscript.sleep 2000
WshShell.AppActivate("Login")
WshShell.sendkeys "user"
wscript.sleep 10
WshShell.AppActivate("Login")
WshShell.sendkeys "{TAB}"
wscript.sleep 10
WshShell.AppActivate("Login")
WshShell.sendkeys "password"
wscript.sleep 10
WshShell.AppActivate(WshExec.ProcessID)
WshShell.sendkeys "{TAB}"
WshShell.sendkeys "{ENTER}"
But there is something with the IE security settings and the focus get lost sometimes during the sendkey tasks. Does anybody have a solution for this problem.
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshExec = WshShell.exec("C:\Program Files (x86)\Internet Explorer\iexplore.exe http://192.168.xxx.xxx")
wscript.sleep 2000
WshShell.AppActivate("Login")
WshShell.sendkeys "user"
wscript.sleep 10
WshShell.AppActivate("Login")
WshShell.sendkeys "{TAB}"
wscript.sleep 10
WshShell.AppActivate("Login")
WshShell.sendkeys "password"
wscript.sleep 10
WshShell.AppActivate(WshExec.ProcessID)
WshShell.sendkeys "{TAB}"
WshShell.sendkeys "{ENTER}"
But there is something with the IE security settings and the focus get lost sometimes during the sendkey tasks. Does anybody have a solution for this problem.