-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
33b0b0f
commit e448fc7
Showing
55 changed files
with
1,189 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"title": "Command 'bat': of an existing remote file", | ||
"category": "commands", | ||
"subcategory": "bat", | ||
"parameters": { | ||
"-d": "{auth_domain}", | ||
"-u": "{auth_username}", | ||
"-p": "{auth_password}", | ||
"--host": "{target_host}" | ||
}, | ||
"smbclientng_commands": [ | ||
"use 'C$'", | ||
"bat './Users/John/Documents/file.txt'" | ||
], | ||
"expected_output": { | ||
"messages": [ | ||
"Contents of './Users/John/Documents/file.txt':", | ||
"This is a test file." | ||
], | ||
"error": false, | ||
"traceback": false | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
testing/tests/commands/bat/bat_insufficient_permissions.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"title": "Command 'bat': of a remote file with insufficient permissions", | ||
"category": "commands", | ||
"subcategory": "bat", | ||
"parameters": { | ||
"-d": "{auth_domain}", | ||
"-u": "{auth_username}", | ||
"-p": "{auth_password}", | ||
"--host": "{target_host}" | ||
}, | ||
"smbclientng_commands": [ | ||
"use 'C$'", | ||
"bat './Windows/System32/protected_file.txt'" | ||
], | ||
"expected_output": { | ||
"messages": [ | ||
"Error: Permission denied for './Windows/System32/protected_file.txt'." | ||
], | ||
"error": true, | ||
"traceback": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"title": "Command 'bat': without specifying a file", | ||
"category": "commands", | ||
"subcategory": "bat", | ||
"parameters": { | ||
"-d": "{auth_domain}", | ||
"-u": "{auth_username}", | ||
"-p": "{auth_password}", | ||
"--host": "{target_host}" | ||
}, | ||
"smbclientng_commands": [ | ||
"use 'C$'", | ||
"bat" | ||
], | ||
"expected_output": { | ||
"messages": [ | ||
"Error: No file specified." | ||
], | ||
"error": true, | ||
"traceback": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"title": "Command 'bat': of a non-existing remote file", | ||
"category": "commands", | ||
"subcategory": "bat", | ||
"parameters": { | ||
"-d": "{auth_domain}", | ||
"-u": "{auth_username}", | ||
"-p": "{auth_password}", | ||
"--host": "{target_host}" | ||
}, | ||
"smbclientng_commands": [ | ||
"use 'C$'", | ||
"bat './Users/John/Documents/non_existing_file.txt'" | ||
], | ||
"expected_output": { | ||
"messages": [ | ||
"Error: File './Users/John/Documents/non_existing_file.txt' not found." | ||
], | ||
"error": true, | ||
"traceback": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"title": "Command 'cat': of an existing remote file", | ||
"category": "commands", | ||
"subcategory": "cat", | ||
"parameters": { | ||
"-d": "{auth_domain}", | ||
"-u": "{auth_username}", | ||
"-p": "{auth_password}", | ||
"--host": "{target_host}" | ||
}, | ||
"smbclientng_commands": [ | ||
"use 'C$'", | ||
"cat './Users/John/Documents/file.txt'" | ||
], | ||
"expected_output": { | ||
"messages": [ | ||
"This is a test file." | ||
], | ||
"error": false, | ||
"traceback": false | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
testing/tests/commands/cat/cat_insufficient_permissions.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"title": "Command 'cat': of a remote file with insufficient permissions", | ||
"category": "commands", | ||
"subcategory": "cat", | ||
"parameters": { | ||
"-d": "{auth_domain}", | ||
"-u": "{auth_username}", | ||
"-p": "{auth_password}", | ||
"--host": "{target_host}" | ||
}, | ||
"smbclientng_commands": [ | ||
"use 'C$'", | ||
"cat './Windows/System32/protected_file.txt'" | ||
], | ||
"expected_output": { | ||
"messages": [ | ||
"Error: Permission denied for './Windows/System32/protected_file.txt'." | ||
], | ||
"error": true, | ||
"traceback": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"title": "Command 'cat': without specifying a file", | ||
"category": "commands", | ||
"subcategory": "cat", | ||
"parameters": { | ||
"-d": "{auth_domain}", | ||
"-u": "{auth_username}", | ||
"-p": "{auth_password}", | ||
"--host": "{target_host}" | ||
}, | ||
"smbclientng_commands": [ | ||
"use 'C$'", | ||
"cat" | ||
], | ||
"expected_output": { | ||
"messages": [ | ||
"Error: No file specified." | ||
], | ||
"error": true, | ||
"traceback": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"title": "Command 'cat': attempts to get the contents of a non-existing remote file", | ||
"category": "commands", | ||
"subcategory": "cat", | ||
"parameters": { | ||
"-d": "{auth_domain}", | ||
"-u": "{auth_username}", | ||
"-p": "{auth_password}", | ||
"--host": "{target_host}" | ||
}, | ||
"smbclientng_commands": [ | ||
"use 'C$'", | ||
"cat './Users/John/Documents/non_existing_file.txt'" | ||
], | ||
"expected_output": { | ||
"messages": [ | ||
"Error: File './Users/John/Documents/non_existing_file.txt' not found." | ||
], | ||
"error": true, | ||
"traceback": false | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
testing/tests/commands/cd/cd_a_non_existing_directory_in_cwd.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"title": "Command 'cd': with a non-existing directory in CWD", | ||
"category": "commands", | ||
"subcategory": "cd", | ||
"parameters": { | ||
"-d": "{auth_domain}", | ||
"-u": "{auth_username}", | ||
"-p": "{auth_password}", | ||
"--host": "{target_host}" | ||
}, | ||
"smbclientng_commands": [ | ||
"use 'C$'", | ||
"cd './{random_string_8}/'" | ||
], | ||
"expected_output": { | ||
"messages": ["[error] Remote directory '", "' does not exist."], | ||
"error": true, | ||
"traceback": false | ||
} | ||
} |
Oops, something went wrong.