Now that's what I call hacker



  • A build engineer who is an automation fanatic leaves for greener pastures. These scripts are discovered on his machine:

    xxx: smack-my-bitch-up.sh - sends a text message "late at work" to his wife (apparently). Automatically picks reasons from an array of strings, randomly. Runs inside a cron-job. The job fires if there are active SSH-sessions on the server after 9pm with his login.

    xxx: kumar-asshole.sh - scans the inbox for emails from "Kumar" (a DBA at our clients). Looks for keywords like "help", "trouble", "sorry" etc. If keywords are found - the script SSHes into the clients server and rolls back the staging database to the latest backup. Then sends a reply "no worries mate, be careful next time".

    xxx: hangover.sh - another cron-job that is set to specific dates. Sends automated emails like "not feeling well/gonna work from home" etc. Adds a random "reason" from another predefined array of strings. Fires if there are no interactive sessions on the server at 8:45am.

    xxx: (and the oscar goes to) fuckingcoffee.sh - this one waits exactly 17 seconds (!), then opens an SSH session to our coffee-machine (we had no frikin idea the coffee machine is on the network, runs linux and has SSHD up and running) and sends some weird gibberish to it. Looks binary. Turns out this thing starts brewing a mid-sized half-caf latte and waits another 24 (!) seconds before pouring it into a cup. The timing is exactly how long it takes to walk to the machine from the dudes desk.

    Just in case you think it didn't happen...

    (Filed under: probably not real, but still funny)



  • I thought my gutenberg -> latex scripts were pretty good.



  • It can't be serious, that would risk restore a client database backup after an unrelated email from that dba containing that words.

    I'll assume he wrote these scripts as a joke and they weren't really running



  • I would totally do all of those things if I were afforded the opportunity. But for the DB revert I'd probably have it ask me for confirmation first.



  • Chech the script. It doesn't even touch the db.

    I call hoax.

    ...still funny, though.



  • @Mikael_Svahnberg said:

    Chech the script. It doesn't even touch the db.

    I call hoax.

    ...still funny, though.

    I think the github repo is a joke based on the original article. Since the OP is some third hand translation from Russian, who knows.



  • Pfft. Cron.



  • @blakeyrat said:

    Pfft. Cron.

    How uncool would it be with windows scheduler?

    There'd probably be some boring group policy that would have sounded alarm and then he'd have to attend boring meetings in a boring suit and listen to boring lectures of why he shouldn't do this thing. Boring.



  • @cartman82 said:

    There'd probably be some boring group policy that would have sounded alarm

    Group policy is now big brother? And all this time I thought it was just for setting settings!!



  • @rc4 said:

    Group policy is now big brother

    You can set auditing and let it send off the event viewer events to somewhere else ...



  • God bless this man! He's a Software Engineer inspiration!



  • There are other tools that excel at that job; I've never heard of anyone using GPOs for that. I suppose anything is possible, however...



  • @rc4 said:

    Group policy is now big brother? And all this time I thought it was just for setting settings!!

    I thought Group Policy was that website where everyone gets together to buy Chipotle / haircut / carwash / grand canyon helicopter flight vouchers for less than half price?



  • No, that's Groupon. Group Policy is an english rock band



  • @fbmac said:

    No, that's Groupon. Group Policy is an english rock band

    The one with Sting? Right enough - thanks for the correction.



  • @rc4 said:

    other tools that excel at that job

    I wouldn't have suggested Excel ... but if it works for you ...



  • cron is great. It is so great I once decided to have it pipe a fortune -o to my phone every morning to welcome me into this WTF world. (-o selects from the quotes which were deemed offensive.) Because I wanted the message to arrive at eight o'clock in the morning, this is the line I wrote:

    * 8 * * * /usr/games/fortune -osn 110 | /home/gleemonk/bin/msg 753 071 485
    

    And lo! The next morning precisely at 8:00 I receive a message:

    Bi now, gay later!

    It's working great!

    Precisely at 8:01 I receive this message:

    "California is proud to be the home of the freeway."
    -- Ronald Reagan

    Which is less great because :wtf: shitty quote and why do I get two?

    Confucious say:
    man who suck nipples make clean breast of things.

    It dawns on me that I must have fucked the cron-config as I usually

    I went into a bar feeling a little depressed, the bartender said,
    "What'll you have, Bud"?
    I said," I don't know, surprise me".
    So he showed me a nude picture of my wife.
    -- Rodney Dangerfield

    have trouble understanding the finer points of cron syntax.

    This PIZZA symbolizes my COMPLETE EMOTIONAL RECOVERY!!

    I knew exactly which character I wanted to change.

    QOTD:
    "What would the world be like without men? A lot of fat,
    happy women."

    And so it went for thirty more until I managed to ssh-in and stop the madness.


  • SockDev

    @gleemonk said:

    * 8 * * * /usr/games/fortune -osn 110 | /home/gleemonk/bin/msg 753 071 485

    And lo! The next morning precisely at 8:00 I receive a message:

    ah. the classic mistake.....

    you wanted

    0 8 * * * /usr/games/fortune -osn 110 | /home/gleemonk/bin/msg 753 071 485
    

    otherwise that would fire once per minute for the entire hour starting at 0800

    generally i find that you don't want any stars to the left of any actually provided values, but that's just me. YMMV

    i'm also surprised i still remembered that off the top of my head! i only looked it up to confirm i had the format right

    .... i may have done a bit too much CLI linux in my younger days before i saw the GUI light...



  • @accalia said:

    ah. the classic mistake.....

    you wanted

    0 8 * * * /usr/games/fortune -osn 110 | /home/gleemonk/bin/msg 753 071 485

    otherwise that would fire once per minute for the entire hour starting at 0800



  • I once sent myself 144(!) emails and texts in ~15 seconds(!) using Splunk alerts.


  • Fake News

    I hope this software has a "scram" button...



  • @accalia said:

    generally i find that you don't want any stars to the left of any actually provided values

    Yes I would go so far as to call it an error crontab could catch. But I'm sure someone will come out of the woods and explain why they need that feature.

    @rc4 said:

    I once sent myself 144(!) emails and texts in ~15 seconds

    :smirk: as long as it wasn't someone else right? I'd considered adding a few other people's number to the list to get quotes too, sharing is caring after all. But in a fit of rarewise restraintegoticism I'd decided to keep it to myself.


  • SockDev

    @gleemonk said:

    But I'm sure someone will come out of the woods and explain why they need that feature.

    well obviously someone's business process has been tailored to that behavior over the years.

    like maybe some process needs to ingest some file that got FTPd to the server starting at 0200 and they want to start processing it as soon as it stops growing in size so they trigger crontab to poll it every minute and process it once it fails to grow in size for an entire minute.

    okay so that's a stupid way to do that, but someone's done it.

    personally i'd add a --use-the-force-luke option to crontab -e that disables the error checking so the sane among us get the sanity of the error checkings and the insane can get to feel superior while they shoot themselves in the foot with a blaster rifle



  • @accalia said:

    okay so that's a stupid way to do that, but someone's done it.

    The world is big and full of crontab users.

    @accalia said:

    the insane can get to feel superior while they shoot themselves in the foot with a blaster rifle

    So basically every crontab user? I quote man 5 crontab

    The entire command portion of the line, up to a newline or % character, will be executed by /bin/sh or by the shell specified in the SHELL variable of the crontab file. Percent-signs (%) in the command, unless escaped with backslash (\), will be changed into newline characters, and all data after the first % will be sent to the command as standard input.

    It's nice how they thought that feature made sense at the time.


  • SockDev

    @gleemonk said:

    So basically every crontab user?

    nah. not all of them. just most of them.


  • Discourse touched me in a no-no place

    @gleemonk said:

    Yes I would go so far as to call it an error crontab could catch. But I'm sure someone will come out of the woods and explain why they need that feature.

    Hi! But we use a homegrown scheduler rather than cron.

    The use case is "poll every x minutes between y o'clock and z o'clock."



  • @Weng said:

    Hi! But we use a homegrown scheduler rather than cron.

    TRWTF?

    @Weng said:

    The use case is "poll every x minutes between y o'clock and z o'clock."

    Well we could make allowances for the */period syntax. Then if you wanted force something run every minute on wednesday you'd */1 * * * 3 it. At least that way the dubious intent is obvious :smile:


  • Discourse touched me in a no-no place

    @gleemonk said:

    TRWTF?

    We're on Windows and its distributed. Cron does neither.

    Plus we have the schedules self modify and stuff. It's perfectly legitimate.



  • @Weng said:

    It's perfectly legitimate.

    :sadface:



  • @gleemonk said:

    But I'm sure someone will come out of the woods and explain why they need that feature.

    I do have some similar things (not using cron though). I have one job that's scheduled to run every 5 minutes during the approximate hours of our nightly BI load (the same use case that @Weng mentioned), and alerts me to things that may have gone wrong. (Informatica doesn't actually directly support this kind of schedule, so what I have is actually a monitoring workflow that's scheduled to run every five minutes, and a pair of workflows scheduled at specific times daily which schedule or unschedule the monitoring workflow.)

    Also, our commissions processing workflow kicks off various jobs for which there is no option to wait until the job is done, we just get a job number back. So what happens there is we have a small table of pending jobs, and a polling workflow that is scheduled to run every minute which checks them. The main workflow schedules the polling workflow the first time it submits one of these jobs, and unschedules it after the last one has completed.

    @gleemonk said:

    I once sent myself 144(!) emails and texts in ~15 seconds

    Ouch. The worst I've done is the abovementioned polling workflow, before I set up auto-forwarding of its failure messages to my phone; it had encountered a failure on the weekend and sent about 1400 emails (at one-minute intervals) to alert my manager and myself about it, before he logged on to check his email and saw them all. Since I was out when he contacted me, he just turned off the polling workflow and I dealt with the issue later.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.