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

Check the PowerShell scripts for silly conversion errors, please #153

Open
peSHIr opened this issue Aug 4, 2017 · 0 comments
Open

Check the PowerShell scripts for silly conversion errors, please #153

peSHIr opened this issue Aug 4, 2017 · 0 comments

Comments

@peSHIr
Copy link

peSHIr commented Aug 4, 2017

Had a quick look at https://github.com/NARKOZ/hacker-scripts/blob/master/powershell/fucking_coffee.psm1 but I have some issues with the conversion from the original language:

  • I don't think "if ($env:Username.Count > 0) { return }" does what you think it does. Quick heads-up: PowerShell has no return statement, or a ">" operator (which is written as "-gt" in PowerShell).

  • You don't call defined functions with the "Send-TelNetCommands($Writer, "sys brew", 24)" syntax. Correct syntax here would be "Send-TelNetCommands -writer $Writer -command 'sys brew' -WaitTime 24".

  • Calls to Send-TelNetCommands give wait times in seconds (from the description of the what the script should do elsewhere), but inside the function that parameter value is used as milliseoonds, given "Start-Sleep -Milliseconds $WaitTime" (which by the way does use correct PowerShell parameter syntax)

This is sort of silly, really... :-/

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

1 participant