-
Notifications
You must be signed in to change notification settings - Fork 13
Handle begin date complications #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, just small doc adjusts and some simplification re: port number
README.md
Outdated
@@ -2,7 +2,8 @@ | |||
|
|||
Use the `code42` command to interact with your Code42 environment. | |||
`code42 securitydata` is a CLI tool for extracting AED events. | |||
Additionally, `code42 securitydata` can record a checkpoint so that you only get events you have not previously gotten. | |||
Additionally, `code42 securitydata` can record a checkpoint so that you only get events you have not previously gotten |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would phrase this as you only get events that were reported to Code42 since the previous time you recorded a checkpoint
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about you only get events that Code42 previously did not observe since you last recorded a checkpoint
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that works for me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a little simplification on urlparsing still
src/code42cli/util.py
Outdated
|
||
def get_url_parts(url_str): | ||
parts = url_str.split(u":") | ||
if parts[0] == u"http" or parts[0] == u"https": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could be any protocol, not just http or https (sftp://, ftp:// ssh:// are all valid, for example).
It would probably be easier to use some thing like urlparse
and do something like
parsed_host = urlparse(url_str)
return parsed_host.netloc #(string that contains domain and port).
You could wrap that whole thing in a try/catch to error out on invalid addresses that can't be parsed
No description provided.