|
42 | 42 | end
|
43 | 43 | end
|
44 | 44 |
|
45 |
| - describe "#cmd_workspace" do |
| 45 | + describe "#cmd_db_export" do |
46 | 46 | describe "-h" do
|
47 | 47 | it "should show a help message" do
|
48 |
| - db.cmd_workspace "-h" |
| 48 | + db.cmd_db_export "-h" |
49 | 49 | @output.should =~ [
|
50 | 50 | "Usage:",
|
51 |
| - " workspace List workspaces", |
52 |
| - " workspace [name] Switch workspace", |
53 |
| - " workspace -a [name] ... Add workspace(s)", |
54 |
| - " workspace -d [name] ... Delete workspace(s)", |
55 |
| - " workspace -r <old> <new> Rename workspace", |
56 |
| - " workspace -h Show this help information" |
| 51 | + " db_export -f <format> [-a] [filename]", |
| 52 | + " Format can be one of: xml, pwdump" |
| 53 | + ] |
| 54 | + end |
| 55 | + end |
| 56 | + end |
| 57 | + |
| 58 | + describe "#cmd_db_import" do |
| 59 | + describe "-h" do |
| 60 | + it "should show a help message" do |
| 61 | + db.cmd_db_import "-h" |
| 62 | + @output.should =~ [ |
| 63 | + "Usage: db_import <filename> [file2...]", |
| 64 | + "Filenames can be globs like *.xml, or **/*.xml which will search recursively", |
| 65 | + "Currently supported file types include:", |
| 66 | + " Acunetix", |
| 67 | + " Amap Log", |
| 68 | + " Amap Log -m", |
| 69 | + " Appscan", |
| 70 | + " Burp Session XML", |
| 71 | + " CI", |
| 72 | + " Foundstone", |
| 73 | + " FusionVM XML", |
| 74 | + " IP Address List", |
| 75 | + " IP360 ASPL", |
| 76 | + " IP360 XML v3", |
| 77 | + " Libpcap Packet Capture", |
| 78 | + " Metasploit PWDump Export", |
| 79 | + " Metasploit XML", |
| 80 | + " Metasploit Zip Export", |
| 81 | + " Microsoft Baseline Security Analyzer", |
| 82 | + " NeXpose Simple XML", |
| 83 | + " NeXpose XML Report", |
| 84 | + " Nessus NBE Report", |
| 85 | + " Nessus XML (v1)", |
| 86 | + " Nessus XML (v2)", |
| 87 | + " NetSparker XML", |
| 88 | + " Nikto XML", |
| 89 | + " Nmap XML", |
| 90 | + " OpenVAS Report", |
| 91 | + " OpenVAS XML", |
| 92 | + " Outpost24 XML", |
| 93 | + " Qualys Asset XML", |
| 94 | + " Qualys Scan XML", |
| 95 | + " Retina XML", |
| 96 | + " Spiceworks CSV Export", |
| 97 | + " Wapiti XML" |
57 | 98 | ]
|
58 | 99 | end
|
59 | 100 | end
|
|
80 | 121 | end
|
81 | 122 | end
|
82 | 123 |
|
| 124 | + describe "#cmd_loot" do |
| 125 | + describe "-h" do |
| 126 | + it "should show a help message" do |
| 127 | + db.cmd_loot "-h" |
| 128 | + @output.should =~ [ |
| 129 | + "Usage: loot <options>", |
| 130 | + " Info: loot [-h] [addr1 addr2 ...] [-t <type1,type2>]", |
| 131 | + " Add: loot -f [fname] -i [info] -a [addr1 addr2 ...] [-t [type]", |
| 132 | + " Del: loot -d [addr1 addr2 ...]", |
| 133 | + " -a,--add Add loot to the list of addresses, instead of listing", |
| 134 | + " -d,--delete Delete *all* loot matching host and type", |
| 135 | + " -f,--file File with contents of the loot to add", |
| 136 | + " -i,--info Info of the loot to add", |
| 137 | + " -t <type1,type2> Search for a list of types", |
| 138 | + " -h,--help Show this help information", |
| 139 | + " -S,--search Search string to filter by" |
| 140 | + ] |
| 141 | + end |
| 142 | + end |
| 143 | + |
| 144 | + end |
| 145 | + |
| 146 | + describe "#cmd_notes" do |
| 147 | + describe "-h" do |
| 148 | + it "should show a help message" do |
| 149 | + db.cmd_notes "-h" |
| 150 | + @output.should =~ [ |
| 151 | + "Usage: notes [-h] [-t <type1,type2>] [-n <data string>] [-a] [addr range]", |
| 152 | + " -a,--add Add a note to the list of addresses, instead of listing", |
| 153 | + " -d,--delete Delete the hosts instead of searching", |
| 154 | + " -n,--note <data> Set the data for a new note (only with -a)", |
| 155 | + " -t <type1,type2> Search for a list of types", |
| 156 | + " -h,--help Show this help information", |
| 157 | + " -R,--rhosts Set RHOSTS from the results of the search", |
| 158 | + " -S,--search Regular expression to match for search", |
| 159 | + " --sort <field1,field2> Fields to sort by (case sensitive)", |
| 160 | + "Examples:", |
| 161 | + " notes --add -t apps -n 'winzip' 10.1.1.34 10.1.20.41", |
| 162 | + " notes -t smb.fingerprint 10.1.1.34 10.1.20.41", |
| 163 | + " notes -S 'nmap.nse.(http|rtsp)' --sort type,output" |
| 164 | + ] |
| 165 | + |
| 166 | + end |
| 167 | + end |
| 168 | + |
| 169 | + end |
| 170 | + |
83 | 171 | describe "#cmd_services" do
|
84 | 172 | describe "-h" do
|
85 | 173 | it "should show a help message" do
|
|
167 | 255 |
|
168 | 256 | end
|
169 | 257 |
|
170 |
| - describe "#cmd_notes" do |
171 |
| - describe "-h" do |
172 |
| - it "should show a help message" do |
173 |
| - db.cmd_notes "-h" |
174 |
| - @output.should =~ [ |
175 |
| - "Usage: notes [-h] [-t <type1,type2>] [-n <data string>] [-a] [addr range]", |
176 |
| - " -a,--add Add a note to the list of addresses, instead of listing", |
177 |
| - " -d,--delete Delete the hosts instead of searching", |
178 |
| - " -n,--note <data> Set the data for a new note (only with -a)", |
179 |
| - " -t <type1,type2> Search for a list of types", |
180 |
| - " -h,--help Show this help information", |
181 |
| - " -R,--rhosts Set RHOSTS from the results of the search", |
182 |
| - " -S,--search Regular expression to match for search", |
183 |
| - " --sort <field1,field2> Fields to sort by (case sensitive)", |
184 |
| - "Examples:", |
185 |
| - " notes --add -t apps -n 'winzip' 10.1.1.34 10.1.20.41", |
186 |
| - " notes -t smb.fingerprint 10.1.1.34 10.1.20.41", |
187 |
| - " notes -S 'nmap.nse.(http|rtsp)' --sort type,output" |
188 |
| - ] |
189 |
| - |
190 |
| - end |
191 |
| - end |
192 |
| - |
193 |
| - end |
194 |
| - |
195 |
| - describe "#cmd_loot" do |
196 |
| - describe "-h" do |
197 |
| - it "should show a help message" do |
198 |
| - db.cmd_loot "-h" |
199 |
| - @output.should =~ [ |
200 |
| - "Usage: loot <options>", |
201 |
| - " Info: loot [-h] [addr1 addr2 ...] [-t <type1,type2>]", |
202 |
| - " Add: loot -f [fname] -i [info] -a [addr1 addr2 ...] [-t [type]", |
203 |
| - " Del: loot -d [addr1 addr2 ...]", |
204 |
| - " -a,--add Add loot to the list of addresses, instead of listing", |
205 |
| - " -d,--delete Delete *all* loot matching host and type", |
206 |
| - " -f,--file File with contents of the loot to add", |
207 |
| - " -i,--info Info of the loot to add", |
208 |
| - " -t <type1,type2> Search for a list of types", |
209 |
| - " -h,--help Show this help information", |
210 |
| - " -S,--search Search string to filter by" |
211 |
| - ] |
212 |
| - end |
213 |
| - end |
214 |
| - |
215 |
| - end |
216 |
| - |
217 |
| -=begin |
218 |
| - describe "#cmd_creds" do |
219 |
| - describe "-h" do |
220 |
| - it "should show a help message" do |
221 |
| - db.cmd_creds "-h" |
222 |
| - @output.should =~ [ |
223 |
| - "Usage: creds [addr range]", |
224 |
| - "List credentials. If an address range is given, show only credentials with", |
225 |
| - "logins on hosts within that range.", |
226 |
| - " -h,--help Show this help information", |
227 |
| - " -c,--columns Columns of interest", |
228 |
| - " -P,--password <regex> List passwords that match this regex", |
229 |
| - " -p,--port <portspec> List creds with logins on services matching this port spec", |
230 |
| - " -s <svc names> List creds matching comma-separated service names", |
231 |
| - " -u,--user <regex> List users that match this regex", |
232 |
| - "Examples:", |
233 |
| - " creds # Default, returns all credentials", |
234 |
| - " creds 1.2.3.4/24 # nmap host specification", |
235 |
| - " creds -p 22-25,445 # nmap port specification", |
236 |
| - " creds -s ssh,smb # All creds associated with a login on SSH or SMB services" |
237 |
| - ] |
238 |
| - end |
239 |
| - end |
240 |
| - end |
241 |
| -=end |
242 |
| - |
243 |
| - describe "#cmd_db_import" do |
244 |
| - describe "-h" do |
245 |
| - it "should show a help message" do |
246 |
| - db.cmd_db_import "-h" |
247 |
| - @output.should =~ [ |
248 |
| - "Usage: db_import <filename> [file2...]", |
249 |
| - "Filenames can be globs like *.xml, or **/*.xml which will search recursively", |
250 |
| - "Currently supported file types include:", |
251 |
| - " Acunetix", |
252 |
| - " Amap Log", |
253 |
| - " Amap Log -m", |
254 |
| - " Appscan", |
255 |
| - " Burp Session XML", |
256 |
| - " CI", |
257 |
| - " Foundstone", |
258 |
| - " FusionVM XML", |
259 |
| - " IP Address List", |
260 |
| - " IP360 ASPL", |
261 |
| - " IP360 XML v3", |
262 |
| - " Libpcap Packet Capture", |
263 |
| - " Metasploit PWDump Export", |
264 |
| - " Metasploit XML", |
265 |
| - " Metasploit Zip Export", |
266 |
| - " Microsoft Baseline Security Analyzer", |
267 |
| - " NeXpose Simple XML", |
268 |
| - " NeXpose XML Report", |
269 |
| - " Nessus NBE Report", |
270 |
| - " Nessus XML (v1)", |
271 |
| - " Nessus XML (v2)", |
272 |
| - " NetSparker XML", |
273 |
| - " Nikto XML", |
274 |
| - " Nmap XML", |
275 |
| - " OpenVAS Report", |
276 |
| - " OpenVAS XML", |
277 |
| - " Outpost24 XML", |
278 |
| - " Qualys Asset XML", |
279 |
| - " Qualys Scan XML", |
280 |
| - " Retina XML", |
281 |
| - " Spiceworks CSV Export", |
282 |
| - " Wapiti XML" |
283 |
| - ] |
284 |
| - end |
285 |
| - end |
286 |
| - end |
287 |
| - |
288 |
| - describe "#cmd_db_export" do |
| 258 | + describe "#cmd_workspace" do |
289 | 259 | describe "-h" do
|
290 | 260 | it "should show a help message" do
|
291 |
| - db.cmd_db_export "-h" |
| 261 | + db.cmd_workspace "-h" |
292 | 262 | @output.should =~ [
|
293 | 263 | "Usage:",
|
294 |
| - " db_export -f <format> [-a] [filename]", |
295 |
| - " Format can be one of: xml, pwdump" |
| 264 | + " workspace List workspaces", |
| 265 | + " workspace [name] Switch workspace", |
| 266 | + " workspace -a [name] ... Add workspace(s)", |
| 267 | + " workspace -d [name] ... Delete workspace(s)", |
| 268 | + " workspace -r <old> <new> Rename workspace", |
| 269 | + " workspace -h Show this help information" |
296 | 270 | ]
|
297 | 271 | end
|
298 | 272 | end
|
|
0 commit comments