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

Not reseting the tokens properly for multiple executions of the script #7

Open
mlinton opened this issue Nov 22, 2017 · 3 comments
Open

Comments

@mlinton
Copy link

mlinton commented Nov 22, 2017

When attempting to test this script, I have a users.txt file with one email address listed. Upon attempting the invoke-lyncspray, it fails on invalid credential provided at the command line. But when I use the correct password once (correctly shows the Found credentials message) subsequent calls also return the valid credential message even with invalid password entries.

@dmchell
Copy link
Contributor

dmchell commented Nov 22, 2017

Can you give me an anonymised example of what you're doing, along with the contents of the supplied files to illustrate this a bit better?

@Raikia
Copy link
Contributor

Raikia commented Dec 6, 2017

Potentially related to #8 ? It would trigger the "valid credential" message even when it was invalid because the exception created would bypass the "return". Did you update lyncsniper between uses?

The issue could also potentially be caching with Invoke-WebRequest (although I personally have not had an issue like this). You could add the following to Invoke-Authenticate and see if it works for you:

 -Headers @{"Cache-Control"="no-cache"}

Specifically on

$data = Invoke-WebRequest -Uri "$baseurl/WebTicket/oauthtoken" -Method POST -Body $postParams -UseBasicParsing

@mdsecresearch
Copy link
Owner

@mlinton can you try in the latest release and let us know if @Raikia's PR solved it?

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

4 participants