mirror of
https://github.com/narkoz/hacker-scripts
synced 2025-08-22 18:37:10 +00:00
commit
5422e24d3d
@ -1,6 +1,7 @@
|
||||
{
|
||||
"require": {
|
||||
"bestnetwork/telnet": "^1.0",
|
||||
"vlucas/phpdotenv": "^2.0"
|
||||
"vlucas/phpdotenv": "^2.0",
|
||||
"twilio/sdk": "^4.6"
|
||||
}
|
||||
}
|
||||
|
21
php/hangover.php
Normal file
21
php/hangover.php
Normal file
@ -0,0 +1,21 @@
|
||||
#!/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}";
|
Loading…
x
Reference in New Issue
Block a user