Code Monkey home page Code Monkey logo

hikka's Introduction

#hikka — IP camera bruteforcer based on Hikvision SDK.


Building

I'm using a makefile, so you should be able to build it under Linux using this command:

make linux

You can also build it for Windows if you have a MinGW installed:

make windows

And you can make binaries for Linux and Windows by omiting a make target (it is useful for me as I distribute every build to people who don't know anything about compilers):

make

And now you have a build directory with compiled app.


How to compile:

apt install git golang-go mingw-w64
git clone https://github.com/superhacker777/hikka
export GOPATH=$HOME/go
go get https://github.com/fatih/color
cd hikka && make

Usage

You can define some options:

  • -logins, -passwords — files where your logins and passwords are stored; it looks for «logins» and «passwords» by default;
  • -check — very useful, but still experimental option which allows to check a host before trying to log in (I did some reverse-engineering and I'm not really sure if everything is OK);
  • -shoots — a directory where pictures from cameras will be stored; it doesn't download pictures by default;
  • -threads — there's no multithreading until you define in how many threads you want to do a job;
  • -csv — write results to CSV file.

Please note that it is hardcoded to read IPs from file called “hosts”!

A typical cammand is:

hikka -threads 200 -check -shoots pics/

Here you go, kid.


TODO

  1. Export result to JSON, iVMS-compatible CSV and m3u playlist.
  2. Some features like checking PTZ- and microphone-enabled cameras.
  3. Rewrite bruteforcing routine to make it possible to bruteforce a single camera in multiple threads (there's a one thread for every camera now).

Bugs

There's some bugs in SDK library (memory leaks and cycling that can fuck up everything) and I can't do anything with it, but all in all it isn't that bad.


Contributing

I'm a newbie in Go and this is my first Go program, so the code and some practices may be ugly. Please tell me if you'll find something that I did in wrong way.

Feel free to contribute, yeah.

hikka's People

Contributors

megapro17 avatar superhacker777 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hikka's Issues

bash: hikka: command not found

root@kali:~# cd /opt
root@kali:/opt# cd hikka
root@kali:/opt/hikka# hikka -threads 100 -check -shoots pics/
bash: hikka: command not found
root@kali:/opt/hikka# ^C
root@kali:/opt/hikka# 




Останавливается

Проверяет определенное количество айпи адресов и просто останавливается без причины.

проблемы со входом в учетку

после ввода полученных данных в ivms или даже в эксплорер, пишет - неверный пароль!
Хотя каким то образом хикке удалось получить фотографии с камер!
Как понять это?
Что делать в этой ситуации?
хик вижн - неверный пароль
rvi - неверный пароль
Хотя паролей даже несколько было подобрано, например к одной камере......

Не собирается на Windows

Поставил MinGW, поставил Go. Не собирается ни через go run, ни через make windows. Пробовал на Маке, на Windows x86, на Windows x64. Разные ошибки, результат один. Самое большое, что получилось, - запустить go run. Тогда программа ругалась на отсутствие hcnetsdk.h. Скачал его, положил в папку. Результат - куча ошибок, отсутствие компиляции. Это у меня проблема или сама программа сырая? Я довольно-таки наугад пробовал, потому что не силён в этих языках и Линуксе. Не могли бы вы попробовать скомпилировать для Шиндошс у себя и выложить?

Make error (color lib)

Who has a problem when compiling with the "color" library - install go version 18 or lower to make the "go get" command work. After successful installation I was helped by this command "go mod init src/hikka.go". Make. Done :D

Не собирается под linux

Клонировал, установил color, пишу make и

GOOS=linux CGO_CFLAGS="-I%BUILDPATH%/hikka/include" CGO_LDFLAGS="-L%BUILDPATH%/hikka/lib/Linux -Wl,-rpath=%BUILDPATH%/hikka/lib/Linux -lhcnetsdk" go build -ldflags "-s -w" -o build/Linux/hikka src/hikka.go
# command-line-arguments
cgo-gcc-prolog: В функции «_cgo_e19d878389bf_Cfunc_NET_DVR_CaptureJPEGPicture»:
cgo-gcc-prolog:56:68: предупреждение: в передаче аргумента 3 «NET_DVR_CaptureJPEGPicture»: несовместимый тип указателя [-Wincompatible-pointer-types]
In file included from src/hikka.go:4:
/drive/data/Linux/TEMP/builds/hikka/include/HCNetSDK.h:13330:103: замечание: ожидался тип «LPNET_DVR_JPEGPARA» {aka «struct *»}, но аргумент имеет тип «struct *»
13330 | NET_DVR_API BOOL __stdcall NET_DVR_CaptureJPEGPicture(LONG lUserID, LONG lChannel, LPNET_DVR_JPEGPARA lpJpegPara, const char *sPicFileName);
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
cgo-gcc-prolog: В функции «_cgo_e19d878389bf_Cfunc_NET_DVR_Login»:
cgo-gcc-prolog:160:79: предупреждение: в передаче аргумента 5 «NET_DVR_Login»: несовместимый тип указателя [-Wincompatible-pointer-types]
In file included from src/hikka.go:4:
/drive/data/Linux/TEMP/builds/hikka/include/HCNetSDK.h:13117:150: замечание: ожидался тип «LPNET_DVR_DEVICEINFO» {aka «struct *»}, но аргумент имеет тип «struct *»
13117 | NET_DVR_API LONG __stdcall NET_DVR_Login(const char *sDVRIP, const WORD wDVRPort, const char *sUserName, const char sPassword, LPNET_DVR_DEVICEINFO lpDeviceInfo);
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
# command-line-arguments
src/hikka.go:108:25: cannot use (
_Ctype_struct___6)(unsafe.Pointer(&imgParams)) (type *_Ctype_struct___6) as type _Ctype_struct___0 in argument to _Cfunc_NET_DVR_CaptureJPEGPicture
src/hikka.go:200:26: cannot use (
_Ctype_struct___1)(unsafe.Pointer(&device)) (type *_Ctype_struct___1) as type *_Ctype_struct___7 in argument to _Cfunc_NET_DVR_Login
make: *** [Makefile:7: linux] Ошибка 2

Увы, исправить своими силами путем замены NET_DVR_JPEGPARA на LPNET_DVR_JPEGPARA не удалось, не может преобразовать новый тип в Ctype_struct
ОС Manjaro x64
версия go go version go1.14.2 linux/amd64
Если необходима старая версия go, хорошо бы узнать какая версия конкретно требуется

Why is all of my ips dead?

Kportscan gave me the ips, it was more than a 500. But when i put it in hikka, bruteforce says they are all dead. I dont really think there are no cams in such a big city.

Make GO and cannot find package "github.com/fatih/color"

Hello. Please help
I do everything according to instructions, as you describe. During the execution of the command, "make" produces:

user@home ~/Загрузки/hikka-master $ make
GOOS=linux CGO_CFLAGS="-I/home/user/Загрузки/hikka-master/include" CGO_LDFLAGS="-L/home/user/Загрузки/hikka-master/lib/Linux -Wl,-rpath=/home/user/Загрузки/hikka-master/lib/Linux -lhcnetsdk" go build -ldflags "-s -w" -o build/Linux/hikka src/hikka.go
src/hikka.go:21:2: cannot find package "github.com/fatih/color" in any of:
/usr/lib/go-1.10/src/github.com/fatih/color (from $GOROOT)
/home/user/user/Загрузки/src/github.com/fatih/color (from $GOPATH)
Makefile:7: ошибка выполнения рецепта для цели «linux»
make: *** [linux] Ошибка 1


user@home/Загрузки/hikka-master $ go version
go version go1.10.1 linux/amd64

home user # uname -a
Linux home 4.10.0-38-generic #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

home user # gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I really need your help, how to solve the problem?

Ports?

How to change the port in hikka ? The program does not work with other ports, only 8000! How to change the port 8000 to hikka? For example, I want 80 or 8080 or 37777 or 34567. The program downloaded already ready, it contains files: (start.bat) (hikka.exe) (hcnetsdk.dll) (HPR.dll) (hosts) (logins) (passwords). How do I change the port 8000? All other ports scanned in (vnc_scanner_gui.exe) the program ignores not only works with the 8000. How to change the port 8000 to let's say 37777?

Make error

При вызове make:

src/hikka.go:108:30: error: argument 3 has incompatible type
(_C.NET_DVR_JPEGPARA)(unsafe.Pointer(&imgParams)),
^
src/hikka.go:200:31: error: argument 5 has incompatible type
(_C.NET_DVR_DEVICEINFO)(unsafe.Pointer(&device)),
^
make: *** [linux] Ошибка 2

exit status 2

Долго мучался, но вроде что-то близится к финалу. Не могу никак получить бинарник, при использовании make и даже при прямом build, выдает ошибку EXIT STATUS 2.
Гуглил, но не помогло ((

$ make windows
CGO_CFLAGS="-IC:/hikka/include" CGO_LDFLAGS="-LC:/hikka/lib/Windows -Wl,--enable-stdcall-fixup,-rpath=C:/hikka/lib/Windows -lHCNetSDK" GOOS=windows CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ go build -ldflags "-s -w" -o build/Windows/hikka.exe src/hikka.go
go build command-line-arguments: C:\Go\pkg\tool\windows_amd64\cgo.exe: exit status 2
makefile:17: recipe for target 'windows' failed
make: *** [windows] Error 1

undefined reference to `NET_DVR_CaptureJPEGPicture@16'

command-line-arguments

C:\Users\Admin\AppData\Local\Temp\go-build799002282\command-line-arguments_obj\hikka.cgo2.o:hikka.cgo2.c:(.text+0x3c): undefined reference to NET_DVR_CaptureJPEGPicture@16' C:\Users\Admin\AppData\Local\Temp\go-build799002282\command-line-arguments\_obj\hikka.cgo2.o:hikka.cgo2.c:(.text+0x7b): undefined reference to NET_DVR_Cleanup@0'
C:\Users\Admin\AppData\Local\Temp\go-build799002282\command-line-arguments_obj\hikka.cgo2.o:hikka.cgo2.c:(.text+0xf0): undefined reference to NET_DVR_GetDVRConfig@24' C:\Users\Admin\AppData\Local\Temp\go-build799002282\command-line-arguments\_obj\hikka.cgo2.o:hikka.cgo2.c:(.text+0x132): undefined reference to NET_DVR_GetLastError@0'
C:\Users\Admin\AppData\Local\Temp\go-build799002282\command-line-arguments_obj\hikka.cgo2.o:hikka.cgo2.c:(.text+0x16a): undefined reference to NET_DVR_Init@0' C:\Users\Admin\AppData\Local\Temp\go-build799002282\command-line-arguments\_obj\hikka.cgo2.o:hikka.cgo2.c:(.text+0x1d8): undefined reference to NET_DVR_Login@20'
C:\Users\Admin\AppData\Local\Temp\go-build799002282\command-line-arguments_obj\hikka.cgo2.o:hikka.cgo2.c:(.text+0x221): undefined reference to `NET_DVR_Logout@4'
collect2.exe: error: ld returned 1 exit status
make: *** [windows] Error 2

/usr/bin/ld: cannot find -lhcnetsdk

Привет. Подскажи, пожалуйста, если можешь.
У меня вот такая ошибка

GOOS=linux CGO_CFLAGS="-I/home/contzzz/hikka/include" 
CGO_LDFLAGS="-L/home/contzzz/hikka/lib/Linux -Wl,-rpath=/home/contzzz/hikka/lib/Linux
 -lhcnetsdk" go build -ldflags "-s -w" -o build/Linux/hikka src/hikka.go
# command-line-arguments
/usr/bin/ld: skipping incompatible /home/contzzz/hikka/lib/Linux/libhcnetsdk.so 
when searching for -lhcnetsdk
/usr/bin/ld: cannot find -lhcnetsdk
collect2: error: ld returned 1 exit status
Makefile:9: ошибка выполнения рецепта для цели «linux»
make: *** [linux] Ошибка 2

Гуглил по этому поводу но ничего не помогло из того что там писали. Или я калека просто лютая. Может ты знаешь как это исправить ?
Linux 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:34:49 UTC 2016 i686 i686 i686 GNU/Linux
go version go1.6.2 linux/386
gcc (Ubuntu 5.3.1-14ubuntu2) 5.3.1 20160413

HELP

Как скомпилировать это , про_б_лся весь день go gcc make git mingw все переставил в итоге только ошибки менялись. Помогите, как это установить или скиньте бинарник хоть с 20 вишмастерами.

ещё будут обновления?

Временами разрабы SDK обновляют, может и ты будешь обновлять свою прогу? Вдруг баг фиксы буду какие-нибудь

Сборка

Приветствую. В ходе поисков брута для iVMS наткнулся на вас. Я чайник в программировании, не понял как, в общем, запустить все это дело для брута. У меня Windows 32 bit. Какие мои дальнейшие действия? Что скачать, что прописывать?

after ~/Documents/hikka$ make linux

GOOS=linux CGO_CFLAGS="-I/home/private/Documents/hikka/include" CGO_LDFLAGS="-L/home/username/Documents/hikka/lib/Linux -Wl,-rpath=/home/username/Documents/hikka/lib/Linux -lhcnetsdk" go build -ldflags "-s -w" -o build/Linux/hikka src/hikka.go

command-line-arguments

cgo-gcc-prolog: In function ‘_cgo_b4a01acd0dff_Cfunc_NET_DVR_CaptureJPEGPicture’:
cgo-gcc-prolog:44:47: warning: passing argument 3 of ‘NET_DVR_CaptureJPEGPicture’ from incompatible pointer type [-Wincompatible-pointer-types]
In file included from src/hikka.go:4:0:
/home/username/Documents/hikka/include/HCNetSDK.h:13330:28: note: expected ‘LPNET_DVR_JPEGPARA {aka struct *}’ but argument is of type ‘struct *’
NET_DVR_API BOOL __stdcall NET_DVR_CaptureJPEGPicture(LONG lUserID, LONG lChannel, LPNET_DVR_JPEGPARA lpJpegPara, const char *sPicFileName);
^~~~~~~~~~~~~~~~~~~~~~~~~~
cgo-gcc-prolog: In function ‘_cgo_b4a01acd0dff_Cfunc_NET_DVR_Login’:
cgo-gcc-prolog:143:48: warning: passing argument 5 of ‘NET_DVR_Login’ from incompatible pointer type [-Wincompatible-pointer-types]
In file included from src/hikka.go:4:0:
/home/username/Documents/hikka/include/HCNetSDK.h:13117:28: note: expected ‘LPNET_DVR_DEVICEINFO {aka struct *}’ but argument is of type ‘struct *’
NET_DVR_API LONG __stdcall NET_DVR_Login(const char *sDVRIP, const WORD wDVRPort, const char *sUserName, const char *sPassword, LPNET_DVR_DEVICEINFO lpDeviceInfo);
^~~~~~~~~~~~~

command-line-arguments

src/hikka.go:108: cannot use (*_Ctype_struct___0)(unsafe.Pointer(&imgParams)) (type *_Ctype_struct___0) as type _Ctype_struct___7 in argument to _Cfunc_NET_DVR_CaptureJPEGPicture
src/hikka.go:200: cannot use (
_Ctype_struct___1)(unsafe.Pointer(&device)) (type *_Ctype_struct___1) as type *_Ctype_struct___6 in argument to _Cfunc_NET_DVR_Login
Makefile:7: recipe for target 'linux' failed
make: *** [linux] Error 2

question about ports checking

hey
im checking some IPs after hikka. great software! but what ports its checking by default? only 8000? what about 8080 or 554? how to choose to check them either?

Can't make

`god@PC:~/hikka$ sudo make linux
GOOS=linux CGO_CFLAGS="-I/include" CGO_LDFLAGS="-L/lib/Linux -Wl,-rpath=/lib/Linux -lhcnetsdk" go build -ldflags "-s -w" -o build/Linux/hikka src/hikka.go

runtime/cgo

/usr/bin/ld: cannot find -lhcnetsdk
collect2: error: ld returned 1 exit status
Makefile:7: recipe for target 'linux' failed
make: *** [linux] Error 2
`
What i need do for fix it?

Makefile:17: ошибка выполнения рецепта для цели «windows»

root@:/home/mega/hikka# make windows
CGO_CFLAGS="-I/home/mega/hikka/include" CGO_LDFLAGS="-L/home/mega/hikka/lib/Windows -Wl,--enable-stdcall-fixup,-rpath=/home/mega/hikka/lib/Windows -lHCNetSDK" GOOS=windows CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ go build -ldflags "-s -w" -o build/Windows/hikka.exe src/hikka.go
# runtime/cgo
/tmp/go-build272884674/runtime/cgo/_obj/_cgo_defun.c:8 6c: No such file or directory: runtime.h
Makefile:17: ошибка выполнения рецепта для цели «windows»
make: *** [windows] Ошибка 2

В чём проблема? make linux отрабатывает нормально

Problem - "hikka: command not found"

Hey, so I did everything what is in description but i still get this, i tried it again, on different computer and still nothing. I'm using Ubuntu. Any ideas how to fix it? Sending you log after opening hikka and make

cd hikka && make
GOOS=linux CGO_CFLAGS="-I/home/xxxx/hikka/include" CGO_LDFLAGS="-L/home/xxx/hikka/lib/Linux -Wl,-rpath=/home/xxxx/hikka/lib/Linux -lhcnetsdk" go build -ldflags "-s -w" -o build/Linux/hikka src/hikka.go
# command-line-arguments
cgo-gcc-prolog: In function ‘_cgo_e19d878389bf_Cfunc_NET_DVR_CaptureJPEGPicture’:
cgo-gcc-prolog:56:68: warning: passing argument 3 of ‘NET_DVR_CaptureJPEGPicture’ from incompatible pointer type [-Wincompatible-pointer-types]
In file included from src/hikka.go:4:
/home/xxxx/hikka/include/HCNetSDK.h:13330:103: note: expected ‘LPNET_DVR_JPEGPARA’ {aka ‘struct <anonymous> *’} but argument is of type ‘struct <anonymous> *’
13330 | NET_DVR_API BOOL __stdcall NET_DVR_CaptureJPEGPicture(LONG lUserID, LONG lChannel, LPNET_DVR_JPEGPARA lpJpegPara, const char *sPicFileName);
      |                                                                                    ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
cgo-gcc-prolog: In function ‘_cgo_e19d878389bf_Cfunc_NET_DVR_Login’:
cgo-gcc-prolog:160:79: warning: passing argument 5 of ‘NET_DVR_Login’ from incompatible pointer type [-Wincompatible-pointer-types]
In file included from src/hikka.go:4:
/home/xxxx/hikka/include/HCNetSDK.h:13117:150: note: expected ‘LPNET_DVR_DEVICEINFO’ {aka ‘struct <anonymous> *’} but argument is of type ‘struct <anonymous> *’
13117 | NET_DVR_API LONG __stdcall NET_DVR_Login(const char *sDVRIP, const WORD wDVRPort, const char *sUserName, const char *sPassword, LPNET_DVR_DEVICEINFO lpDeviceInfo);
      |                                                                                                                                 ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
cp lib/Linux/libhcnetsdk.so build/Linux/
cp lib/Linux/libHCCore.so build/Linux/
cp lib/Linux/libhpr.so build/Linux/
cp -r lib/Linux/HCNetSDKCom/ build/Linux/
cp dist/hosts build/Linux
cp dist/logins build/Linux
cp dist/passwords build/Linux
CGO_CFLAGS="-I/home/xxxx/hikka/include" CGO_LDFLAGS="-L/home/xxxx/hikka/lib/Windows -Wl,--enable-stdcall-fixup,-rpath=/home/xxxx/hikka/lib/Windows -lHCNetSDK" GOOS=windows CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ go build -ldflags "-s -w" -o build/Windows/hikka.exe src/hikka.go
# command-line-arguments
cgo-gcc-prolog: In function ‘_cgo_e19d878389bf_Cfunc_NET_DVR_CaptureJPEGPicture’:
cgo-gcc-prolog:56:68: warning: passing argument 3 of ‘NET_DVR_CaptureJPEGPicture’ from incompatible pointer type [-Wincompatible-pointer-types]
In file included from src/hikka.go:4:
/home/xxxx/hikka/include/HCNetSDK.h:13330:103: note: expected ‘LPNET_DVR_JPEGPARA’ {aka ‘struct <anonymous> *’} but argument is of type ‘struct <anonymous> *’
13330 | NET_DVR_API BOOL __stdcall NET_DVR_CaptureJPEGPicture(LONG lUserID, LONG lChannel, LPNET_DVR_JPEGPARA lpJpegPara, const char *sPicFileName);
      |                                                                                    ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
cgo-gcc-prolog: In function ‘_cgo_e19d878389bf_Cfunc_NET_DVR_Login’:
cgo-gcc-prolog:160:79: warning: passing argument 5 of ‘NET_DVR_Login’ from incompatible pointer type [-Wincompatible-pointer-types]
In file included from src/hikka.go:4:
/home/xxxx/hikka/include/HCNetSDK.h:13117:150: note: expected ‘LPNET_DVR_DEVICEINFO’ {aka ‘struct <anonymous> *’} but argument is of type ‘struct <anonymous> *’
13117 | NET_DVR_API LONG __stdcall NET_DVR_Login(const char *sDVRIP, const WORD wDVRPort, const char *sUserName, const char *sPassword, LPNET_DVR_DEVICEINFO lpDeviceInfo);
      |                                                                                                                                 ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
cp lib/Windows/HCNetSDK.dll build/Windows/
cp lib/Windows/HCCore.dll build/Windows/
cp -r lib/Windows/HCNetSDKCom/ build/Windows/
cp dist/hosts build/Windows/hosts
cp dist/logins build/Windows/logins
cp dist/passwords build/Windows/passwords
hikka
hikka: command not found

panic: runtime error: slice bounds out of range [7:0]

Hi sometimes the program block with an error, i trie to reduce threads but nothing change
the error is :

panic: runtime error: slice bounds out of range [7:0]

goroutine 144 [running]:
github.com/fatih/color/vendor/github.com/mattn/go-colorable.(*Writer).Write(0xc0000a4000, 0xc0005821c0, 0x7, 0x40, 0x0, 0x0, 0x7)
        /root/go/src/github.com/fatih/color/vendor/github.com/mattn/go-colorable/colorable_windows.go:499 +0x3345
fmt.Fprintf(0x5859e0, 0xc0000a4000, 0xc0007b8af4, 0x7, 0x0, 0x0, 0x0, 0xc0000c1912, 0x4, 0x8)
        /usr/lib/go-1.13/src/fmt/print.go:205 +0xac
github.com/fatih/color.(*Color).Set(0xc000004680, 0x647880)
        /root/go/src/github.com/fatih/color/color.go:140 +0x96
github.com/fatih/color.(*Color).Println(0xc000004680, 0xc00057dee8, 0x2, 0x2, 0x0, 0x0, 0x0)
        /root/go/src/github.com/fatih/color/color.go:248 +0x50
main.bruteforce(0xc0006fe760, 0xc, 0xc000018180)
        /root/hikka/src/hikka.go:270 +0x254
main.start.func2(0xc00000a360, 0xc0000181e0, 0xc000018180)
        /root/hikka/src/hikka.go:438 +0x8f
created by main.start
        /root/hikka/src/hikka.go:435 +0x26a

make: *** [Makefile:7: linux] Ошибка 2

GOOS=linux CGO_CFLAGS="-I/home/h0rse/hikka/include" CGO_LDFLAGS="-L/home/h0rse/hikka/lib/Linux -Wl,-rpath=/home/h0rse/hikka/lib/Linux -lhcnetsdk" go build -ldflags "-s -w" -o build/Linux/hikka src/hikka.go

command-line-arguments

cgo-gcc-prolog: In function ‘_cgo_b4a01acd0dff_Cfunc_NET_DVR_CaptureJPEGPicture’:
cgo-gcc-prolog:44:48: warning: passing argument 3 of ‘NET_DVR_CaptureJPEGPicture’ from incompatible pointer type [-Wincompatible-pointer-types]
In file included from src/hikka.go:4:
/home/h0rse/hikka/include/HCNetSDK.h:13330:103: note: expected ‘LPNET_DVR_JPEGPARA’ {aka ‘struct *’} but argument is of type ‘struct *’
NET_DVR_API BOOL __stdcall NET_DVR_CaptureJPEGPicture(LONG lUserID, LONG lChannel, LPNET_DVR_JPEGPARA lpJpegPara, const char *sPicFileName);
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
cgo-gcc-prolog: In function ‘_cgo_b4a01acd0dff_Cfunc_NET_DVR_Login’:
cgo-gcc-prolog:143:49: warning: passing argument 5 of ‘NET_DVR_Login’ from incompatible pointer type [-Wincompatible-pointer-types]
In file included from src/hikka.go:4:
/home/h0rse/hikka/include/HCNetSDK.h:13117:150: note: expected ‘LPNET_DVR_DEVICEINFO’ {aka ‘struct *’} but argument is of type ‘struct *’
NET_DVR_API LONG __stdcall NET_DVR_Login(const char *sDVRIP, const WORD wDVRPort, const char *sUserName, const char *sPassword, LPNET_DVR_DEVICEINFO lpDeviceInfo);
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

command-line-arguments

src/hikka.go:108: cannot use (*_Ctype_struct___0)(unsafe.Pointer(&imgParams)) (type *_Ctype_struct___0) as type _Ctype_struct___7 in argument to _Cfunc_NET_DVR_CaptureJPEGPicture
src/hikka.go:200: cannot use (
_Ctype_struct___1)(unsafe.Pointer(&device)) (type *_Ctype_struct___1) as type *_Ctype_struct___6 in argument to _Cfunc_NET_DVR_Login

Баг: Говорит что нет камер и не делает картинки, а на самом деле камер 5 штук и широкий канал

Вот пример IP на котором воспроизводиться баг: admin:[email protected] port 8000

Баг заключаеться в том что hikka говорит что на ip камер нет, а их там 5 штук, судя по всему камера какогото неизвестного хекке типа, поэтому она так реагирует, плюс еще пробовал запускать на ivms-bf, на этой камере он виснет намертво, даже если флаг -с есть

Баг воспроизводиться всегда, т.е. это не из за проблем с каналом с моей или камеры стороны, в программе iVMS-4200 камера прекрасно работает в прямом эфире и записи показывает.

$ echo "209.115.181.198" > hosts && ./hikka -check=true -port=8000 -threads=50 -shoots="pictures/"
Loaded 14 logins
Loaded 100 passwords
Starting work in 50 threads

Logged in: admin:[email protected]
No cameras on 209.115.181.198

ivms-bf уходит в бесконечный цикл:

$ ./ivms-bf -c -s pictures/ 209.115.181.198

Скриншот камер в iVMS-4200
http://prntscr.com/7bshyu

Can't log into

Привет,

Такое дело, роутер не отвечает на пинги, но порты rtspd http пропрошены и открыты. hikka соответственно пишет Can't log into ... Я с go не очень, можно как-то подкрутить этот момент? И еще одно, при сборке под линух make ругаеться на либу libhcnetsdk.so. Помогает если скопировать ее из проекта ivms-bf, тогда норм.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.