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

fixed injectSize type error for Post attacks #81

Merged
merged 3 commits into from
May 6, 2019

Conversation

alexdetrano
Copy link
Contributor

injectSize needs to be converted to an int before being passed to range argument. Otherwise we get a typeError since it is a string.

@alexdetrano
Copy link
Contributor Author

also added a fix for parsing a burp file, where the trailing newline is not trimmed when reading the host address. This is a quick fix, the better way would be to remove all trailing lines as soon as we read in the file. But if we make that fix, we should also not use readlines since it has to read the whole file into memory, but instead do something like:

reqData = []
with open(loadpath, "r") as fo:
    for line in fo:
        reqData.append(line.rstrip())

…. Also use 'with' to open files, to ensure file is automatically closed
@alexdetrano
Copy link
Contributor Author

figured I'd make the change I just mentioned. So now we strip each line in a file as soon as we read it in. Also moved the file open into a with block, so that we don't have to worry about closing the file once we're done with it.

@codingo codingo self-assigned this May 6, 2019
@codingo codingo merged commit c324ff7 into codingo:master May 6, 2019
@codingo
Copy link
Owner

codingo commented May 6, 2019

Excellent, thank-you! For a while now I've been rewriting this to take proper arguments / CLI input which will help to harden a lot of this. The pull request is still very appreciated however.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants