-
-
Notifications
You must be signed in to change notification settings - Fork 517
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
curl: Couldn't resolve host name #342
Comments
Help me @Ullaakut |
Hi @nguyentrungduc1. I'm not sure why, but it's looking like Cameradar is attempting to access not one URL but two:
This one works fine.
That one does not. I assume this is due to the network configuration of your machine, that attempts to reach the camera using both IPv4 and IPv6. Regardless, the IPv4 attempt seems to have worked, and Cameradar simply failed because the default credentials from its dictionaries do not match with the camera. |
Thank you @Ullaakut . I think the problem is that when you say http://myuser:myp@[email protected]/file, it sees the username as myuser, the password as myp, and the host as [email protected] which is obviously wrong. |
|
Ah indeed, that is the problem. Cameradar currently does not support passwords and users with |
Thank you so much @Ullaakut |
hi,dude
|
use net/url demo to get userinfo,Don't have both @、: in username or password. package main
import (
"fmt"
"net/url"
"strings"
)
func main() {
// Define RTSP URL
// rtspURL := "rtsp://192.168.1.7:554/test"
//rtspURL := "rtsp://admin:[email protected]:554/test"
//rtspURL := "rtsp://ad@min:9phuong@[email protected]:554/test"
rtspURL := "rtsp://admin:9phuong@[email protected]:554/test"
// Parse RTSP URL
_, err := url.Parse(rtspURL)
if err != nil {
fmt.Println("URL parsing error:", err)
return
}
// Find the position of the last '@' symbol
lastAt := strings.LastIndex(rtspURL, "@")
if lastAt == -1 {
fmt.Println("Missing '@' in URL")
return
}
// Extract the part from "rtsp://" to the last '@', which is the username and password
userInfoPart := rtspURL[len("rtsp://"):lastAt]
// Find the position of the last ':' symbol
lastColon := strings.LastIndex(userInfoPart, ":")
if lastColon == -1 {
fmt.Println("Incorrect format of user information part")
return
}
// Username is the part from the beginning to the last colon
username := userInfoPart[:lastColon]
// Password is the part from the last colon to the end
password := userInfoPart[lastColon+1:]
// Print the extracted username and password
fmt.Println("Username:", username)
fmt.Println("Password:", password)
}
|
Thank you so much @Mr-xn |
Hello, currently -t parameter does not support the attack target in the form of files, batch url attack Loading credentials...ok
|
Issue with CURL (Ullaakut/cameradar#342)
Context
Please select one:
Please select one:
Environment
My operating system:
OS version: <kali linux 2023.4>
OS architecture:
Issue
<curl: Couldn't resolve host name>
What was expected
<escape '@' in curl password>
What happened
<when the password file has the @ character. curl notification: curl: Couldn't resolve host name. That's my camera password.>
Logs
The text was updated successfully, but these errors were encountered: