Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.

Random Variables in script isn't working #10

Closed
fabinet opened this issue Jan 14, 2022 · 8 comments
Closed

Random Variables in script isn't working #10

fabinet opened this issue Jan 14, 2022 · 8 comments

Comments

@fabinet
Copy link

fabinet commented Jan 14, 2022

Hello,
The Random in generated script for variables isn't working as tout can see on this screen :
16421764428604016464475742881022

@djsan15
Copy link

djsan15 commented Jan 14, 2022

Seems like an issue with the way Cryptor.VarNumberLength function provides the seed. This value doesn't change if this function is called multiple times in a row without any operation in between (too fast, eh?).

I created a temporary fix by replacing the call to Cryptor.VarNumberLength with my own function temp_cryptor that adds a 2 millisecond delay after generating the rand string:

func temp_cryptor() string{
    var a = Cryptor.VarNumberLength(4,9)
    time.Sleep(2*time.Millisecond)
    return a
}

@Tylous
Copy link
Contributor

Tylous commented Jan 15, 2022

Very odd, I have never seen this happen in any of the tools I've developed. Can you try recreating this two more times and see if this happens?

@fabinet
Copy link
Author

fabinet commented Jan 15, 2022

Yes I had the issue multiple Time on 2 diff windows host. @djsan15 fix is working

@Tylous
Copy link
Contributor

Tylous commented Jan 17, 2022

I've tested numerous times on Linux and Mac and discovered this might be an issue related to Windows. Can you confirm by trying one of those.

@Tylous
Copy link
Contributor

Tylous commented Jan 20, 2022

I will be updating the code shortly with this time delay.

@djsan15
Copy link

djsan15 commented Jan 20, 2022

I have tested on Linux and it seems to be working fine. I would agree that it's an issue for windows machines only.

@charnim
Copy link

charnim commented Jan 27, 2022

Can confirm having the same issue on windows.

@Tylous
Copy link
Contributor

Tylous commented Jan 28, 2022

Added this in version 1.11. Closing issue for now, feel free to reopen if you have future questions.

@Tylous Tylous closed this as completed Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants