-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
libcdb-cli: add --offline-only
, refactor unstrip and add fetch parser for download libc-database
#2478
base: dev
Are you sure you want to change the base?
Conversation
--offline-only
, refactor unstrip and add fetch parser for download libc-database
help = 'Set libc-database path, If it is empty, the default path will be `context.local_libcdb` (%s)' % context.local_libcdb | ||
) | ||
|
||
fetch_parser.add_argument( |
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.
It's weird to run libcdb fetch
and have the command do nothing. Maybe do the update by default and ask if you want to clone/init first if the directory is still empty?
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 think init and upgrade repository is better, and remove --init
.
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.
Now the second time you run libcdb fetch
it does nothing. I'd remove all arguments and just update the database if it exists and install it first if its the first time you run the command.
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.
Sorry, I didn't quite understand. Currently, the expected behavior of second time run libcdb fetch
will upgrade the repo.
If we want update database, we should pass -u
fetch_parser.add_argument(
'-u', '--update',
metavar = 'update',
nargs = '*',
choices = ['all', 'ubuntu', 'debian', 'rpm', 'centos', 'arch', 'alpine', 'kali', 'parrotsec', 'launchpad'],
help = 'Fetch the desired libc categories'
)
First time run libcdb fetch
or database path didn't exists, it will ask if you want init repo.
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.
Setting a default value for -u
meet your requirements?
df274b5
to
92bb948
Compare
92bb948
to
77b737a
Compare
unstrip
as default behavior, except file parserreturn_raw
forsearch_by_symbol_offsets