T O P

  • By -

threepts27

Not exactly what you are talking about but I created an onboarding script. I feel bad for whoever happens to onboard a Rick Astley.


Tpower1000

Ok. Now I have to put this one in my onboarding script too. Why didn't I think of this xD


technomancing_monkey

YUP! Thats getting hashed into my onboarding script


[deleted]

Imagining the real life version of Michael Bolton from Office Space getting trolled by the computer while on boarding...


jrobiii

Sort of similar or maybe just interesting names... I once worked with someone whose last name was Null. Always thought he was some DBA's nightmare. Same place there was a guy with the last name Batman. Nothing real notable... just jealous I guess. Whenever my name was called for attendance I'd say, "I am Batman"


[deleted]

Kinda like the whole name your baby "Robert'); drop table \*;--" thing


Spartan117458

Little Bobby Tables


jrobiii

It's a database thing :-)


orgdbytes

Funny! I did the exact same thing. Plays the music and a GIF of him dancing!


SysAdminDennyBob

copyrighted by me Write-Host "Hello World" do not duplicate without my permission. /s I steal code, you steal code, we all steal code. This is the nature of scripting. Embrace it.


sld126

I steal my own code from my last 4 jobs.


Ghost4000

Best thing about this is when you look at something you wrote 5 years ago and thinkg "what idiot wrote this".


[deleted]

[удалено]


BlackV

hahhahahaha ah yes, all the things that we forgot


sld126

Depends on how much free time I want :-)


BitDreamer23

Wait, I know how many people have done this. Let's see there's almost 8 billion people, so, there. 8 billion people have done this. OK, not everybody writes scripts, but you get the point! Wait, 8 billion minus 1. I've never done that, and I've never lied.


anonymousITCoward

I do that with things i scripted 5 weeks ago lol


fayerboll

Did past-you loathe current-you?


sld126

Nah, 90% of the work pre done is never bad


BlackV

nah, they just hid memes in their code


technomancing_monkey

LOL! ME TOO!


bab29-CA

My old boss who laid me off made a big deal about how I couldn’t take anything with me when I left so I didn’t take anything. I had some old coworkers contact me and tell me they couldn’t understand it (I was the only one with scripting experience) and needed help because of change. I told my old coworker I couldn’t help because I didn’t have the scripts. They send me the entire repository so I could help them. I helped them that once (it was great getting all my scripts back so I can reuse the code and still being able to say I didn’t take anything) then added them to my junk mail list.


sld126

Monthly zip of my scripts folder to backup. Copy to home computer once in a while.


BlackV

I just clone my repo


sld126

But you should have billed them :-)


anonymousITCoward

release it as open source on git... or what i did was start a blank script and release that, then update it from work as a change request =)


twistingtheaces

I mean, what do you get out of finding out that someone used your code? An ego boost? Totally not worth it for that purpose, IMO.


datnodude

Not worth it


routetehpacketz

You mean a piece of text that someone can just delete? Are you expecting to find them published on a blog or something? Are you publishing your scripts yourself?


AbsoluteGarbage1

Yeah, any time I grab someone's code I do a big sweep of it to make sure it won't destroy something. Very easy to find the "Easter egg" and just.. remove it. Lol


Thotaz

The closest thing would be to use "famous" names, phrases or numbers in comments/help files like: `# Enter the password in plaintext. Example: Hunter2` I don't like the idea of adding distracting code or even comments where the only purpose is to humor me or someone else. I also don't need to do anything special to make my code recognizable by me because literally none of my past or current team mates care enough to format things properly and consistently so I can simply assume that if it looks good then it was written by me.


vermyx

Most people cut and paste code without modifying it or understanding it so the closes thing you can do is coding style or variable names as those tend to not be changed. Closest you will come.


qordita

Yes, but not for that. I add Easter eggs for me and my team, and most of them are buried in notifications or log files. If you don't want people to steal your code then you need to not put it someplace where someone can steal it.


post4u

Same. I just wrote a few lines into a script that does some processing of records in a system of ours that have a code of "305". When run, it writes Mr. Worldwide! and Dale! to the console over and over for the duration of the script. Admins that run this script in the future are going to be pretty confused until they read the comments.


technomancing_monkey

I have a script that once it has gather all the needed inputs will log "PULL THE LEVER KRONK!" If it errors out it logs "WRONG LEVER!"


sojumaster

I suppose you never copy pasta any code from the internet, ever. This is powershell, it is not that serious. Without a "call home" function, how would you even know?


lxaccord

One of my scripts that is essentially a homebrewed version of user state migration will run the star wars imperial march over beeps once completed. ​ Another one uses TTS midway through to say "Execute Order 66" when deleting the temp files from systems.


Flannakis

Yeah, people love it if a script is sending information covertly externally. Why not just count the downloads Edit; but if this is a work situation, a log system is acceptable


Certain-Community438

If you want to dissuade people from re-using your code - and piss off the community - then just obfuscate it so it looks like malware. Hardly anyone will want to deobfuscate it, meaning they'd need to take all of the script/module or none of it. This method relies on you being able to recognise the obfuscated code.


missingMBR

If you're concerned about teammates using your scripts, and you're licensed for Defender for Endpoint (MDE), MDE can centrally log all PowerShell executions and the code used. You could then query MDE for the exact code. This might save writing anything specific into your code.


crazyantnc

Turn the script into an EXE or use PowerShell Studio.


BlackV

you can just extract it or use script block logging to get the code


1iioiioii1

I use #^# to make comments instead of just #.


technomancing_monkey

YES! ​ I currently have one in the End Of Day report script I made. If a specific co-worker launches the script it will set his system volume to 100% and then start playing "barbie girl" Its just him. Doesnt happen for/to anyone else. ​ Every now and again I change up the song it plays, just to keep things fresh. ​ ​ I know thats not the kind of easter egg you mean, but yes I do those other kind too.


SonsOfSithrak

I throw nonsensical comments in mine, and insulting error messages. I had a script that would take an input and poll our ticket system for that ticket. If you entered an invalid ticket or ticket type i'd roast you for it then post an ascii picture pf a jackie chan meme.


jpbras

No. But you can always format a random remote machine, each time the script is run without the parameter -giveMeCredit /s


DalekKahn117

I’ll sign it… but PowerShell doesn’t compile so not much else to do


hillbillytiger

I like to use silly variable names and funny messages in my code. But if you really wanted to, you could randomize all of your variables after you're finished coding 😁


enforce1

I made an onboarding script that uses fastfood menus and strips out words to use as passphrases. I know that at that place, new passwords still come out like "McMuffin23Steak44" or the like.


ass-holes

I left my company, came back. Someone in helpdesk had issues with a script, I looked along. One of the comments was #fill in your fukken password here It was my comment, they got it from my account when I left. Was cool.


I-Like-IT-Stuff

I leave Easter eggs but not for this reason, mostly for whoever sees it to maybe get a kick if they get the references.


timetraveller1977

I do, but not telling you as you may steal my code and remove them! :P


ScubaMiike

Pop the stack overflow link into the script comments, then people know where to go!


technomancing_monkey

If I find a clever solution to something, or an idea that I start building off of, then I will do this. Its more so I can go back and refresh my memory as to what I was trying to do when I come in the next day and cant remember why i thought "THIS" was a good use of my time LOL


Sad-Sundae2124

I usually code in a way I can recognize that it’s me that’s coded it. It’s not just one indice but a lot of habits I took that apparently other coder did not use


[deleted]

In the past I've included annoy-ware in projects where I was donating time or outside the scope of my paycheck. Sure I'll work for peanuts. But it makes the noises I want, at the intervals I want.


Taki183

You can use SNOW. Steganographic Nature Of Whitespace.


anonymousITCoward

I havent done it for a since i left webdev, but i used to place the konami code sites that i built... i would have it play the theme to super contra...


that_1_doode

I've done a conditional statement looking to see if specific users are running the script and adding additional text to the terminal through write-host


BlackV

why? really why? what is so unique in your code? how would you know they used your code unless you could see *their* code It's not a competition, share the code, then everyone gets better


MouseboyFPGA

Not exactly the same, but when I create a script I want to run 'forever' - basically until the admin closes/terminates the script, I'll encapsulate the whole thing in a Do {} Until ($Hell -eq "Freezes Over") and I never declare $Hell in the script :P