GithubHelp home page GithubHelp logo

amrwc / derulo Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 2.3 MB

Prank your friends when they leave their machine unlocked

License: MIT License

Shell 68.37% Batchfile 31.63%
bash-script batch-script powershell-script prank desktop-background desktop-background-setter

derulo's Introduction

derulo

Give your co-workers a quick information security lesson by derulo'ing them. Maybe next time they will remember to lock their machine.

What?

The script instantly changes the desktop's background of the machine it's run on.

Why?

If your workplace is friendly enough to pull off pranks and some of you care about information security, the one and only Jason Derulo will be a perfect reminder of how quickly damage can be done and that an unattended computer should be locked.

Please note that the scripts may have to be run more than once for the changes to take effect.

Demo GIF

macOS

Tested on High Sierra, Mojave and Catalina. Admin privileges are not required. Common raster image types, such as JPG, PNG, BMP, GIF, etc. are supported.

  1. Open Terminal.app

    • press cmd + space,
    • type terminal,
    • press return.
  2. Run the script

    curl https://raw.githubusercontent.com/amrwc/derulo/main/mac | bash
    
    # Custom image from the web:
    curl https://raw.githubusercontent.com/amrwc/derulo/main/mac | bash -s https://html5box.com/html5gallery/images/Waves_1024.jpg
    
    # Custom image from disk:
    curl https://raw.githubusercontent.com/amrwc/derulo/main/mac | bash -s file://$HOME/Downloads/derulo.bmp
    curl https://raw.githubusercontent.com/amrwc/derulo/main/mac | bash -s file:///Users/john/Downloads/derulo.bmp
  3. There may appear a permission-related pop-up, which you have to accept.

    macOS warning pop-up

Windows

CMD doesn't include a curl-like program out-of-the-box, therefore this method requires more steps. The PowerShell one-liner is more succinct.

CMD + PowerShell

Tested on Windows 10. Admin privileges are not required.

This method utilises PowerShell to download the required files, but relies on the batch script to mitigate potential restrictions around .ps1 files.

In some restricted environments the PowerShell method may not work. In such case, try one of the CMD-only methods below.

  1. Open CMD

    • press Win + R,
    • type cmd,
    • press return.
  2. Run:

    :: Pro tip: triple-click on the line below to quickly highlight it
    powershell Invoke-RestMethod -Uri https://raw.githubusercontent.com/amrwc/derulo/main/powershell -OutFile derulo.bat && derulo.bat

CMD-only

Tested on Windows 7 and Windows 10. Admin privileges are not required.

Copy-paste

  1. Download any .bmp image (example), and call it derulo.bmp.

  2. Open CMD

    • press Win + R,
    • type cmd,
    • press return.
  3. Run:

    :: NOTE: The script assumes that the image is in the default 'Downloads' directory.
    reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d "" /f
    reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d "C:\Users\%USERNAME%\Downloads\derulo.bmp" /f
    
    :: Runs the 'update' dll multiple times to ensure an immediate effect
    start "" /b rundll32.exe user32.dll,UpdatePerUserSystemParameters
    start "" /b rundll32.exe user32.dll,UpdatePerUserSystemParameters
    start "" /b rundll32.exe user32.dll,UpdatePerUserSystemParameters
    start "" /b rundll32.exe user32.dll,UpdatePerUserSystemParameters
    start "" /b rundll32.exe user32.dll,UpdatePerUserSystemParameters
    
    :: Clear screen
    cls

Local batch file

  1. Save the cmd.bat script locally.

  2. Download any .bmp image (example), and call it derulo.bmp. Make sure it's placed in the same directory as the cmd.bat script.

  3. Double-click the cmd.bat script, or run it through CMD by typing the script's name after navigating to its directory.

    cd <path_to_script>
    cmd.bat

Caveats

  • Windows version
    • Only supports bitmaps (.bmp images).
    • Leaves the derulo.bmp image behind (it may be possible to delete it, but not immediately after the script is finished).
    • The pure batch version doesn't support automated script/image download.

derulo's People

Contributors

amrwc avatar

Stargazers

 avatar

Watchers

 avatar  avatar

derulo's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.