Snapshot URL without credentials box appearing

Apr 30, 2018
5
0
Hi All,

I have a Dashua model number DH IPC HDBW 4431R ZS IP camera and I am trying to get a snapshot from the device. I have tried many URLs but always come back to the point where a dialog box is displayed asking for a username/pwd combination. Most of the URLs I found include this information (un/pw) but it keeps being asked for anyways.

Has anyone had this issue before ?
 
Hi All,

I have a Dashua model number DH IPC HDBW 4431R ZS IP camera and I am trying to get a snapshot from the device. I have tried many URLs but always come back to the point where a dialog box is displayed asking for a username/pwd combination. Most of the URLs I found include this information (un/pw) but it keeps being asked for anyways.

Has anyone had this issue before ?

Both of these below work with my Amcrest IP2M-841 (re-branded Dahua) but like yourself, it asks for the credentials each time (unless you tell IE or Chrome to 'remember' the login info). Sorry I cannot offer more help.
Code:
http://cameraIP/cgi-bin/snapshot.cgi?loginuse=[USERNAME]&loginpas=[PASSWORD]
http://cameraIP/cgi-bin/snapshot.cgi?chn=1&u=[USERNAME]&p=[PASSWORD]
 
depending on your camera firmware version (it may or may not exist):
Login to the camera. Go to Setting -> System -> Safety (choices are Digest, Basic, or None)

Your camera may or may not have that setting. My guess is that it has hacked firmware, so no.
 
you can also try:
HTML:
http://login:password@cameraIP/cgi-bin/snapshot.cgi
 
While looking through the cam's settings, I found a Allow Anonymous access box I have checked. However, having tried many URLs I still can't get to an image without the credentials box.

Does anyone know how an anonymous URL would look like ?
 
I used to grab snapshots at my previous place of employment, and the login box always appeared at first fetch, then went away, as I refreshed often enough to maintain the session. I believe 'Digest' authentication is what you want. I should mention, I was using an older version of the Firefox browser at the time.
 
FYI, the very first one I give in post #2 works in this re-branded Dahua IF you login to admin, go to 'Setup', 'System', 'Manage Users' and check 'Anonymous Login', 'Save', log out, close browser, wait 30 seconds, open browser with the exact URL below (just change cam IP):

Code:
http://cameraIP/cgi-bin/snapshot.cgi?loginuse=&loginpas=

I had tried that yesterday but was in a hurry to go somewhere and failed to close a hidden browser window that was open when doing this.

amcrest_IP2M-841_anonymous.jpg
 
I must've bought a defective unit as even when trying anonymous login it asks for a password. I have tried the urls above plus many others found elsewhere.

Thank you for your help
 
I have the same problem has anyone find the solution? keeps asking me for the credentials. below is my camera info:
Device TypeIPC-HDW1230T1-S4
System VersionV2.680.0000000.7.R, Build Date: 2019-09-11
WEB VersionV3.2.1.26770
ONVIF Version18.12(V2.0.0.26587)
S/N5L045C8PAGFCBB5
Security Baseline VersionV1.4
 
Late to the party but JIC anyone is trying to access this camera's snapshot URL () programmatically, (using a programing language or script) - you have to use "HTTP Digest Auth" (not "Basic Auth"). The browser usually will figure this out auto-magically for you, but in code, something like this works:

import requests
from requests.auth import HTTPDigestAuth
from datetime import datetime

cam_IP = "192.168.1.111"
u = 'user'
p = 'pAssW0rd321!'
url = f"http://{cam_IP}/cgi-bin/snapshot.cgi?"

timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
filename = f"snap_{timestamp}.jpg"

response = requests.get(url, auth=HTTPDigestAuth(u, p))

if response.status_code == 200:
# Save the image to a file
with open(filename, 'wb') as file:
for chunk in response.iter_content(chunk_size=8192):
file.write(chunk)
print("Image saved as 'snap_[timestamp].jpg'")
else:
print(f"Failed to retrieve image. Status code: {response.status_code}")