This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Get Snapshot from Hikvision Camera
#8
(14.03.2023, 16:35)admin Wrote: Some cameras allow passing credentials as a GET parameter. See if this works for you:
Code:
http = require('socket.http')
base64enc = require('encdec').base64enc

ip = '192.168.192.168'
auth = 'user:pass'
url = 'http://' .. ip .. '/ISAPI/Streaming/channels/101/picture?auth=' .. base64enc(auth)

res, err = http.request(url)
log(res, err)

Same error:

Code:
* arg: 1
  * string: <!DOCTYPE html>
<html><head><title>Document Error: Unauthorized</title></head>
<body><h2>Access Error: 401 -- Unauthorized</h2>
<p>Authentication Error</p>
</body>
</html>

* arg: 2
  * number: 401
Reply


Messages In This Thread
RE: Get Snapshot from Hikvision Camera - by DGrandes - 15.03.2023, 08:04

Forum Jump: