2
0
mirror of https://github.com/narkoz/hacker-scripts synced 2025-08-23 02:47:14 +00:00
hacker-scripts/php/hangover.php
2015-12-04 10:36:31 +08:00

22 lines
603 B
PHP

#!/usr/bin/env php
<?php
require 'vendor/autoload.php';
(new Dotenv\Dotenv(__DIR__))->load();
(strpos(exec('who'), getenv('USER')) === false) or exit('session found');
$my_number = '+xxx';
$number_of_boss = '+xxx';
$excuse = ['Locked out', 'Pipes broke', 'Food poisoning', 'Not feeling well'];
$excuse = $excuse[array_rand($excuse)];
$twilio = new Services_Twilio(getenv('TWILIO_ACCOUNT_SID'), getenv('TWILIO_AUTH_TOKEN'));
$twilio->account->messages->sendMessage(
$my_number,
$number_of_boss,
"Gonna work from home. {$excuse}"
);
echo "Message sent at: #".date('Y-m-d')." | Excuse: {$excuse}";