GridAttackSim
GridAttackSim copied to clipboard
pid is not extracted correctly in "attack_broker.py" file
In the file "attack_broker.py" the following two lines(line 102-103) attempt to execute a subprocess and extracts its pid.
child = subprocess.Popen('pgrep xterm', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, executable='/bin/bash')
pid = int(child.communicate()[0].split('\n')[0])
However, this doesn't give the correct pid.
I've raised the PR #4 which correctly extracts the pid. Please review it. Thanks.
Hi, Thank you for contacting us. From the pull request you submitted I noticed that you basically added "title().decode('utf-8')" before getting the pid. This makes me think that the error you encountered is caused by the fact that you use Unicode characters in your system. Note that we did not have such issue with our English language setup, so it may be an internationalization problem. Unfortunately I don't currently have a setup for testing your code, so I cannot verify it immediately. Therefore I shall keep this issue open in case other people encounter a similar problem. Hopefully I'll be able to test the code at some point in the future and make the suggested changes. Best wishes, Razvan