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

Division by zero #3

Open
hub2 opened this issue Feb 28, 2015 · 1 comment
Open

Division by zero #3

hub2 opened this issue Feb 28, 2015 · 1 comment

Comments

@hub2
Copy link

hub2 commented Feb 28, 2015

From line 124 to 130:
start = time.time() while True: try: current = time.time() - start bps = (nbytes*8)/current pps = npackets/current
when this chunk of code gets executed fast enough, current is 0 and python throws and exception about float division error.
example Solution: setting current to non-zero value eg. 1 when it is 0

LandonPowell added a commit to LandonPowell/Saddam that referenced this issue Jun 12, 2016
Solution for OffensivePython#3 
Can't divide by zero.
@LandonPowell
Copy link

I implemented your idea in my pull request.

zhq1 added a commit to zhq1/Saddam that referenced this issue May 30, 2018
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

No branches or pull requests

2 participants