2
0
mirror of https://github.com/narkoz/hacker-scripts synced 2025-08-23 19:07:33 +00:00

Get random reason easier

This commit is contained in:
alexesprit 2015-11-30 00:19:03 +03:00
parent ab3d661212
commit fedb6faca1

View File

@ -14,21 +14,19 @@ if (-not (QWINSTA | FINDSTR $env:USERNAME)) {
$MY_NUMBER='+xxx' $MY_NUMBER='+xxx'
$HER_NUMBER='+xxx' $HER_NUMBER='+xxx'
$REASONS= $REASONS =
'Working hard', 'Working hard',
'Gotta ship this feature', 'Gotta ship this feature',
'Someone fucked the system again' 'Someone fucked the system again'
$reason = $REASONS | Get-Random
$RAND = Get-Random -Maximum $REASONS.Count $message = "Late at work. $reason."
$MSG="Late at work. $REASONS[$RAND]"
$API_URL = "https://api.twilio.com/2010-04-01/Accounts/$env:TWILIO_ACCOUNT_SID/Messages" $API_URL = "https://api.twilio.com/2010-04-01/Accounts/$env:TWILIO_ACCOUNT_SID/Messages"
$BASE64AUTHINFO = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $env:TWILIO_ACCOUNT_SID,$env:TWILIO_AUTH_TOKEN))) $BASE64AUTHINFO = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $env:TWILIO_ACCOUNT_SID,$env:TWILIO_AUTH_TOKEN)))
$body = @{ $body = @{
From = $MY_NUMBER; From = $MY_NUMBER;
To = $HER_NUMBER; To = $HER_NUMBER;
Body = $MSG; Body = $message;
} }
#Send a text message and Log errors #Send a text message and Log errors