brav0hax / easy-creds

274 stars 97 forks source link

Fixed a bug where an xterm window was launching even if an X session was... #7

Closed karthikrangarajan closed 10 years ago

karthikrangarajan commented 11 years ago

The code was launching an xterm window in spite of an already present X Session. The check was against the variable $isxrunning, and it looks like the conditions were inverted. If the variable was null, screen was used, and if the variable was not null, xterm was used.

That code has been replaced by $isrunning -eq 1 to check whether the variable has been set to 1 in the f_isxrunning() function.

Thanks to connection for help with these fixes.

noncetonic commented 11 years ago

Yea it looks like the original line is actually correct; spawn xterm windows if X is running otherwise use screen for the management of all the different input buffers. I think we may have just interpreted the code wrong

karthikrangarajan commented 11 years ago

connection is right, we may have interpreted the code wrong. The way I read it was if X or XOrg was running, launch the attacks in a screen, else launch it in xterm...which was obviously not correct. So yes, please ignore this pull request. :)

brav0hax commented 11 years ago

Yeah so -z is unset ! -z is set. weird I know. There is an issue I need to fix with some of the wireless xterms not closing when the attack is stopped. I thought I had the code right, but its not working. For example sslstrip, it actually runs python so I can't just kill python, what if they have something else running. So I wrote out the pids to a file and try to kill that pid, but for some reason, they are not closing.

karthikrangarajan commented 11 years ago

Yeah I noticed that issue myself. I had to close the xterms manually. A (very hacky) way I can think of doing it is opening screens in an xterm, and then closing all of these screens. Yes, I know, incredibly hacky, but it could potentially work.

ZeroChaos- commented 11 years ago

Perhaps using "-n" would be a little more readable than "! -z". It requires the variable being set and equal to something non-empty but that seems to already be the case.

brav0hax commented 11 years ago

Def a possibility. I try to use the -z only in places where the variable is either set or unset. Or I am checking for that, not truly if it is equal to anything, just has a value set.

On Sat, Sep 7, 2013 at 4:03 PM, ZeroChaos notifications@github.com wrote:

Perhaps using "-n" would be a little more readable than "! -z". It requires the variable being set and equal to something non-empty but that seems to already be the case.

— Reply to this email directly or view it on GitHubhttps://github.com/brav0hax/easy-creds/pull/7#issuecomment-24011619 .