Skip to content
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

gef-extras stuff for #576 and #577 #26

Merged
merged 13 commits into from
Nov 15, 2020
Merged

gef-extras stuff for #576 and #577 #26

merged 13 commits into from
Nov 15, 2020

Conversation

theguly
Copy link
Contributor

@theguly theguly commented Nov 14, 2020

gef-extras stuff for hugsy/gef#576 and hugsy/gef#577

docs/glibc_function_args.md Outdated Show resolved Hide resolved
docs/glibc_function_args.md Show resolved Hide resolved
docs/glibc_function_args.md Outdated Show resolved Hide resolved
docs/glibc_function_args.md Outdated Show resolved Hide resolved
docs/glibc_function_args.md Outdated Show resolved Hide resolved

def gen_json(function_dict,_params,outfile_name):
_dict = {}
for _key,_value in function_dict.items():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix spaces after commas

if os.path.isfile(outfile_name):
print("file {} exists, overwrite? [Y/n]".format(outfile_name))
overwrite = input()
if 'n' in overwrite.lower():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's 'safer' to flip this: Assume no unless they put in a y, otherwise them mashing the keyboard would overwrite the file.


return

file_name = 'libc.txt.gz'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's put this all in a 'main' function, so that we can import this file to test the other functions, if we end up using it a lot.

function_name = get_function_name(line)
function_args = get_function_args(line)

#print("fname {} || fargs {}".format(function_name,function_args))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove


#print("fname {} || fargs {}".format(function_name,function_args))

# there is two dupes as of now, i'm ignoring the issue by having the last to rule by initializing dict key again
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# there is two dupes as of now, i'm ignoring the issue by having the last to rule by initializing dict key again
# there are two dupes as of now, get around the issue by using the last one found

theguly and others added 10 commits November 15, 2020 16:06
Co-authored-by: Grazfather <grazfather@gmail.com>
Co-authored-by: Grazfather <grazfather@gmail.com>
Co-authored-by: Grazfather <grazfather@gmail.com>
Co-authored-by: Grazfather <grazfather@gmail.com>
Co-authored-by: Grazfather <grazfather@gmail.com>
Co-authored-by: Grazfather <grazfather@gmail.com>
Co-authored-by: Grazfather <grazfather@gmail.com>
@Grazfather Grazfather merged commit 2d6a876 into hugsy:master Nov 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants