Commit graph

133 commits

Author SHA1 Message Date
Simone Margaritelli
f35a8b98ac
Merge pull request #259 from picatz/minor-refactors
Minor refactors using golint
2018-05-02 10:21:11 +02:00
Kent Gruber
84864d5dc9 if block ends with a return statement drop this else and outdent its block
trying out some lint drive refactoring with golint :D
2018-05-01 23:02:28 -04:00
Kent Gruber
660f326806 add test for Clear 2018-05-01 22:40:40 -04:00
Kent Gruber
6911941fa2 add test for GetClient 2018-05-01 22:40:24 -04:00
Kent Gruber
07ba5e8d57 add test for Get 2018-05-01 22:40:03 -04:00
Kent Gruber
116ae12194 add test for AddIfNew 2018-05-01 22:39:47 -04:00
Kent Gruber
aa69d7499a add test for Remove 2018-05-01 22:39:32 -04:00
Kent Gruber
0024434944 add test for List 2018-05-01 22:39:19 -04:00
Kent Gruber
a9a37593a6 add test for Stations 2018-05-01 22:39:05 -04:00
Kent Gruber
36562bc7a9 add test for EachAccessPoint 2018-05-01 22:38:48 -04:00
Kent Gruber
dfa55d2a2e add test for MarshalJSON 2018-05-01 22:37:40 -04:00
Kent Gruber
74b387bf41 add test for NewWiFi 2018-05-01 22:37:20 -04:00
Kent Gruber
74c99d5ea1 add test for Dot11Chan2Freq 2018-05-01 22:37:03 -04:00
Kent Gruber
7e21ec9a97 add test for Dot11Freq2Chan 2018-05-01 22:36:45 -04:00
Kent Gruber
92395b6170 add helper function to build example WiFi struct
to be used in the rest of the tests, basically
2018-05-01 22:36:26 -04:00
Kent Gruber
7f34d0f6e7 start adding tests for wifi functions in network package
this is the base for all the tests
2018-05-01 22:35:54 -04:00
Kent Gruber
29ec4edc63 add test for OuiLookup 2018-05-01 15:47:33 -04:00
Kent Gruber
90676d0289 add basic oui variable check
should contain information for the known organizational unique
identifiers
2018-05-01 15:47:05 -04:00
Kent Gruber
c71113b321 start adding tests for oui related functions in the network package
this is the base for the test
2018-05-01 15:45:43 -04:00
Kent Gruber
d3c8afb3fb add test for shouldIgnore 2018-05-01 15:04:55 -04:00
Kent Gruber
d641fbf5c3 add test for GetAlias 2018-05-01 15:03:56 -04:00
Kent Gruber
65b28e028f add test for AddIfNew 2018-05-01 15:03:42 -04:00
Kent Gruber
dcc7ca2cbd add test for GetByIp
possible TODO: rename GetByIp to GetByIP like golint says to do?
2018-05-01 15:03:20 -04:00
Kent Gruber
4b82e917c7 add test for EachHost 2018-05-01 15:02:30 -04:00
Kent Gruber
050eaaf6bc add test for Has 2018-05-01 15:02:14 -04:00
Kent Gruber
effbf951b5 add TODO in test for Remove
adding a TODO to help remind myself to fix this later: the Remove
function seems to have an unnecessary argument called “ip” which is
never used.

To be fair, I guess I could’ve just wrote a test for this and changed
it later.
2018-05-01 15:01:58 -04:00
Kent Gruber
d94532c473 add test for WasMissed 2018-05-01 15:00:17 -04:00
Kent Gruber
50ebf3e53a add test for Aliases 2018-05-01 15:00:00 -04:00
Kent Gruber
a3e173a847 add test for List 2018-05-01 14:59:41 -04:00
Kent Gruber
e9697e0659 add test for Get 2018-05-01 14:59:25 -04:00
Kent Gruber
29486e1bf7 add test for SetAliasFor 2018-05-01 14:59:09 -04:00
Kent Gruber
bb493de4c9 add test for MarshalJSON 2018-05-01 14:58:51 -04:00
Kent Gruber
ba47e82e77 add test for NewLAN 2018-05-01 14:58:30 -04:00
Kent Gruber
9c4a43062c start adding tests for lan related functions in network package
includes required imports and two helper functions to build reusable
fresh-starts to be used in functions
2018-05-01 14:57:51 -04:00
Kent Gruber
7bff3bba79 add test for FindInterface in network package 2018-05-01 12:41:21 -04:00
Kent Gruber
dcd5001357 add basic matchByAddress test
checks both mac address and ip address cases
2018-05-01 11:01:31 -04:00
Kent Gruber
36fb416952 add basic findInterfaceByName test 2018-05-01 10:53:09 -04:00
Kent Gruber
3c920397b9 add basic buildEndpointFromInterface test 2018-05-01 10:07:13 -04:00
Kent Gruber
b188354c33 add basic ParseTargets test
Note: needs refactoring to include an actual alias map example. I was
unable to get this to work for the time being, but this test adds at
least some coverage.
2018-05-01 10:05:52 -04:00
Kent Gruber
9e59ca9bfe start adding tests for network net
* IsZeroMac
* IsBroadcastMac
* NormalizeMac
2018-04-30 22:42:02 -04:00
evilsocket
480f0daa8d
misc: small fix or general refactoring i did not bother commenting 2018-04-30 16:21:57 +02:00
evilsocket
ae0afc54b5
fixed a bug which caused a cidr being parsed as an ip and eventually a panic (fixes #241) 2018-04-26 19:33:05 +02:00
evilsocket
1afab5d7be
more lint driven refactoring 2018-04-26 12:19:52 +02:00
evilsocket
0de6f3a76e
more lint driven refactoring 2018-04-24 18:26:16 +02:00
evilsocket
3b22341e34
simplified Dockerfile and improved build process 2018-04-18 12:05:29 +02:00
evilsocket
a2e90769fe
new: added new Samsung mobile OUI 2018-04-17 18:39:47 +02:00
evilsocket
214d2a56da
misc: small fix or general refactoring i did not bother commenting 2018-04-10 12:13:06 +02:00
evilsocket
da2d837dfb
fix: using active udp probes if arp.spoof fails to resolve an IP to its MAC 2018-03-27 10:39:20 +02:00
evilsocket
096767622a
new: caplets can now be used as interactive session commands ( /usr/bin/zsh -> first argument, etc ) (closes #204) 2018-03-26 12:27:53 +02:00
evilsocket
6c50cc2918
new: added new arp.spoof.whitelist variable which supports macs, ips, ip ranges and aliases (closes #205) 2018-03-26 11:58:31 +02:00