14 Commits

Author SHA1 Message Date
Ullaakut 6486d04e61 Test debug mode in attack & remove unnecessary aliases & newlines 2020-05-04 11:10:48 +02:00
Ullaakut 9f05634531 Reword error message when no stream is found 2020-05-04 11:10:48 +02:00
Brendan Le Glaunec cb47aef7e4 Fix capitalization issues in import path (#244) 2019-11-11 20:17:39 +01:00
Brendan Le Glaunec 212ac2f0d5 Cameradar v4 (#212)
* Refactor of cameradar library

* Old unit tests updated & improved. New unit tests inc

* Update documentation & issue template

* Update dependencies

* Update TravisCI build script to reflect argument change

* Remove outdated contributing guide

* Update README with more examples and remove part on library

* Add second camera to Travis build script & improve error detection

* Fix typo in travis script & add missing image to readme

* Remember that travis uses bash syntax not fish

* Use relative paths for images in the README
2019-05-26 08:33:08 +02:00
Ullaakut 862e9f3de9 Add unit tests for DetectAuthType function 2019-05-22 22:14:36 +02:00
Brendan LE GLAUNEC ceb210f281 Switch to go modules, use forked go-curl to fix CI (#192) 2019-03-10 19:14:11 +01:00
Brendan LE GLAUNEC 5849898283 Cameradar 3.0.0: Uses ullaakut/nmap, runs faster, removed legacy code (#188)
Unit tests functional and coverage back to 100%

Add more routes to dictionary, add more credentials, add default port 5554, rename cameradar logs ENV variable, improve unit test readability, remove tmp file
2019-01-22 21:16:16 +01:00
Brendan Le Glaunec 4109a4405d Add unit tests for stream validation 2018-07-22 17:34:48 +02:00
Brendan Le Glaunec bcc8099f91 Fix crash #174 by duplicating curl handle
Wrap libcurl to bypass lack of covariance support
2018-03-13 11:45:42 +01:00
Brendan Le Glaunec 08fcfcdac8 Remove responsibility for Attack methods to declare no attack success as an error 2018-03-12 15:04:06 +01:00
Brendan LE GLAUNEC 74672f6625 Increase test coverage, mock libcurl & uniformize error messages 2018-03-12 15:04:06 +01:00
Brendan LE GLAUNEC 5d2626b639 Change license to MIT 2018-03-12 15:04:06 +01:00
Brendan LE GLAUNEC 89647ae457 Fix timeout and unresponsive cameras being detected as successful & add error message
Update unit tests

Fix deadlock in libcurl for tests to stop failing randomly
2018-03-12 15:04:05 +01:00
Brendan LE GLAUNEC cb74761675 Add unit tests and functional test in CI
* Unit tests Discover 90%

The NmapRun function needs a refacto to make it use adaptors instead of directly calling exec.Command, exec.Command.StdoutPipe, exec.Command.Start, bufio.Scanner.Scan and bufio.Scanner.Err
It makes me uncomfortable to push a test file that covers only 90%, but it's better than none, and the 10 missing %s are not very error-prone so it should be okay to delay this part a bit. For now it's more urgent to test as much of the code as possible

* Unit tests Helpers 100%

* Unit tests Loaders 100% - Attack 85%

Once again, the Attack functions are not as simple as the rest to unit test, so I will refacto all of this to use a CURL adaptor later, but for now the total is of 88.6% of coverage, which is good enough for something I spent 2 hours on

* Add testing to CI validation process

* CI now does functional testing with RTSPATT

* Change travis language to bash
2018-03-12 15:04:05 +01:00