Make it look like I'm working

  • Often, I find myself running a script or query that will take a significant amount of time to run. I can leave that script open and enjoy some guilt-free procrastination.


    Now, what if I could write a script that seems to be one of the above scripts to any onlookers, but in looks only? I could put it up on a screen and enjoy days of kitten livestreams before anyone realised that all the complicated rigmarole on the screen didn't have anything to do with my actual job.


    Your challenge is to write this script for me (yes, I'm that lazy).


    A good answer will:



    • Make something appear on the screen that looks like a script is doing work. "Screen" can be terminal, browser, etc.

    • Be fairly original (yes, we've all seen the neverending progress bar programs)

    • Survive cursory examination by a technical person


    A bad answer will:



    • Get me fired

    • Rehash something we all were forwarded in the 90's


    A stellar answer might:



    • Transcend one of the bad bullet points above (for instance)

    • Survive critical examination

    • *gasp* actually do something that's useful or aids in my work shirking


    Acceptance will be based on votes, with bonus from real-life results. I will actually run these scripts (Linux Mint 16) at work when my screen is visible (meetings and the like) to determine detection. If anyone notices that it's faking, you're out of the running. If someone comments on how hard I'm working, +5 bonus upvotes for you.


    "Useful" in this case can apply to any coder, but if you're looking for that extra shine on your teacher-bound apple, I'm a full-stack webdev who works in code roughly according to my tags.


    Question partially inspired by this.


    Results


    Disappointingly, I didn't get any comments either way on these entries. They're all awesome, so you're all winners in my heart. However, Loktar has the most votes by a long shot, so he gets the +15 from the accept. Congrats!


    What's the winning criteria, [tag:popularity-contest]?

    I think it's technically code-challenge.

    Just so you know, Linux Mint 17 (LTS) is out!

    still waiting for someone to reimplement http://visikord.com/ghostzilla/

    @KyleKanos Clarified winning condition.

    @WChargin I've been meaning to upgrade. I need it!

    So... what happens if you test an answer and it actually does get you fired?

    This gives me an idea for another code golf question. "Make it look like my question shouldn't be put on hold"

    Just write one of these programs, and compile!

    @german_guy the only problem with hackertyper is it requires user intervention

    I saw a really good remake of the Tron Legacy boardroom on Github the other day: https://github.com/arscan/encom-boardroom

    @Chron wow thats really good actually!

    "Your challenge is to write this script for me." I think I fractured a funny bone LoL!

    @Chron, i'm impressed. Gonna bookmark that page and use it a lot ^_^

    5 bonus upvotes? Do you have sock puppets? ;-)

    @CanadianLuke When it comes to the scoring.

    I feel like I shouldn't upvote that really great question - future employees now reading StackExchange network messages.

    It may be relevant for people to know what your job actually _is_. Then again, it may not.

    Is there a way to do this so I can watch the world cup and make it look like I am working?

    I love the thought that dozens of people are not doing productive work to help you (and the rest of the technical workers in the world) avoid doing productive work.

    Why don't you do other work if you don't like it...

    I hope your boss doesn't see this thread...

    Back in the early 90s, "Chessmaster" had a button labeled "The Boss" which brought up a screenshot of some spreadsheet program. Took me a while to figure out what the heck it was for.

  • Loktar

    Loktar Correct answer

    7 years ago

    JavaScript



    So I went a little crazy with this. I did it between breaks from working on my GUI to track IP's using Visual Basic.



    You can access it by going to the super serious domain I made for it tonight as well so you can look busy anywhere Gui Hacker and fork and create your own from the following sources





    Basically, if you have this running no one will bother you because they know you are doing some serious stuff.





    var canvas = document.querySelector(".hacker-3d-shiz"),
    ctx = canvas.getContext("2d"),
    canvasBars = document.querySelector(".bars-and-stuff"),
    ctxBars = canvasBars.getContext("2d"),
    outputConsole = document.querySelector(".output-console");

    canvas.width = (window.innerWidth / 3) * 2;
    canvas.height = window.innerHeight / 3;

    canvasBars.width = window.innerWidth / 3;
    canvasBars.height = canvas.height;

    outputConsole.style.height = (window.innerHeight / 3) * 2 + 'px';
    outputConsole.style.top = window.innerHeight / 3 + 'px'


    /* Graphics stuff */
    function Square(z) {
    this.width = canvas.width / 2;
    this.height = canvas.height;
    z = z || 0;

    this.points = [
    new Point({
    x: (canvas.width / 2) - this.width,
    y: (canvas.height / 2) - this.height,
    z: z
    }),
    new Point({
    x: (canvas.width / 2) + this.width,
    y: (canvas.height / 2) - this.height,
    z: z
    }),
    new Point({
    x: (canvas.width / 2) + this.width,
    y: (canvas.height / 2) + this.height,
    z: z
    }),
    new Point({
    x: (canvas.width / 2) - this.width,
    y: (canvas.height / 2) + this.height,
    z: z
    })
    ];
    this.dist = 0;
    }

    Square.prototype.update = function() {
    for (var p = 0; p < this.points.length; p++) {
    this.points[p].rotateZ(0.001);
    this.points[p].z -= 3;
    if (this.points[p].z < -300) {
    this.points[p].z = 2700;
    }
    this.points[p].map2D();
    }
    }

    Square.prototype.render = function() {
    ctx.beginPath();
    ctx.moveTo(this.points[0].xPos, this.points[0].yPos);
    for (var p = 1; p < this.points.length; p++) {
    if (this.points[p].z > -(focal - 50)) {
    ctx.lineTo(this.points[p].xPos, this.points[p].yPos);
    }
    }

    ctx.closePath();
    ctx.stroke();

    this.dist = this.points[this.points.length - 1].z;

    };

    function Point(pos) {
    this.x = pos.x - canvas.width / 2 || 0;
    this.y = pos.y - canvas.height / 2 || 0;
    this.z = pos.z || 0;

    this.cX = 0;
    this.cY = 0;
    this.cZ = 0;

    this.xPos = 0;
    this.yPos = 0;
    this.map2D();
    }

    Point.prototype.rotateZ = function(angleZ) {
    var cosZ = Math.cos(angleZ),
    sinZ = Math.sin(angleZ),
    x1 = this.x * cosZ - this.y * sinZ,
    y1 = this.y * cosZ + this.x * sinZ;

    this.x = x1;
    this.y = y1;
    }

    Point.prototype.map2D = function() {
    var scaleX = focal / (focal + this.z + this.cZ),
    scaleY = focal / (focal + this.z + this.cZ);

    this.xPos = vpx + (this.cX + this.x) * scaleX;
    this.yPos = vpy + (this.cY + this.y) * scaleY;
    };

    // Init graphics stuff
    var squares = [],
    focal = canvas.width / 2,
    vpx = canvas.width / 2,
    vpy = canvas.height / 2,
    barVals = [],
    sineVal = 0;

    for (var i = 0; i < 15; i++) {
    squares.push(new Square(-300 + (i * 200)));
    }

    //ctx.lineWidth = 2;
    ctx.strokeStyle = ctxBars.strokeStyle = ctxBars.fillStyle = '#00FF00';

    /* fake console stuff */
    var commandStart = ['Performing DNS Lookups for',
    'Searching ',
    'Analyzing ',
    'Estimating Approximate Location of ',
    'Compressing ',
    'Requesting Authorization From : ',
    'wget -a -t ',
    'tar -xzf ',
    'Entering Location ',
    'Compilation Started of ',
    'Downloading '
    ],
    commandParts = ['Data Structure',
    'http://wwjd.com?au&2',
    'Texture',
    'TPS Reports',
    ' .... Searching ... ',
    'http://zanb.se/?23&88&far=2',
    'http://ab.ret45-33/?timing=1ww'
    ],
    commandResponses = ['Authorizing ',
    'Authorized...',
    'Access Granted..',
    'Going Deeper....',
    'Compression Complete.',
    'Compilation of Data Structures Complete..',
    'Entering Security Console...',
    'Encryption Unsuccesful Attempting Retry...',
    'Waiting for response...',
    '....Searching...',
    'Calculating Space Requirements '
    ],
    isProcessing = false,
    processTime = 0,
    lastProcess = 0;


    function render() {
    ctx.clearRect(0, 0, canvas.width, canvas.height);

    squares.sort(function(a, b) {
    return b.dist - a.dist;
    });
    for (var i = 0, len = squares.length; i < len; i++) {
    squares[i].update();
    squares[i].render();
    }

    ctxBars.clearRect(0, 0, canvasBars.width, canvasBars.height);

    ctxBars.beginPath();
    var y = canvasBars.height / 6;
    ctxBars.moveTo(0, y);

    for (i = 0; i < canvasBars.width; i++) {
    var ran = (Math.random() * 20) - 10;
    if (Math.random() > 0.98) {
    ran = (Math.random() * 50) - 25
    }
    ctxBars.lineTo(i, y + ran);
    }

    ctxBars.stroke();

    for (i = 0; i < canvasBars.width; i += 20) {
    if (!barVals[i]) {
    barVals[i] = {
    val: Math.random() * (canvasBars.height / 2),
    freq: 0.1,
    sineVal: Math.random() * 100
    };
    }

    barVals[i].sineVal += barVals[i].freq;
    barVals[i].val += Math.sin(barVals[i].sineVal * Math.PI / 2) * 5;
    ctxBars.fillRect(i + 5, canvasBars.height, 15, -barVals[i].val);
    }

    requestAnimationFrame(render);
    }

    function consoleOutput() {
    var textEl = document.createElement('p');

    if (isProcessing) {
    textEl = document.createElement('span');
    textEl.textContent += Math.random() + " ";
    if (Date.now() > lastProcess + processTime) {
    isProcessing = false;
    }
    } else {
    var commandType = ~~(Math.random() * 4);
    switch (commandType) {
    case 0:
    textEl.textContent = commandStart[~~(Math.random() * commandStart.length)] + commandParts[~~(Math.random() * commandParts.length)];
    break;
    case 3:
    isProcessing = true;
    processTime = ~~(Math.random() * 5000);
    lastProcess = Date.now();
    default:
    textEl.textContent = commandResponses[~~(Math.random() * commandResponses.length)];
    break;
    }
    }

    outputConsole.scrollTop = outputConsole.scrollHeight;
    outputConsole.appendChild(textEl);

    if (outputConsole.scrollHeight > window.innerHeight) {
    var removeNodes = outputConsole.querySelectorAll('*');
    for (var n = 0; n < ~~(removeNodes.length / 3); n++) {
    outputConsole.removeChild(removeNodes[n]);
    }
    }

    setTimeout(consoleOutput, ~~(Math.random() * 200));
    }

    render();
    consoleOutput();

    window.addEventListener('resize', function() {
    canvas.width = (window.innerWidth / 3) * 2;
    canvas.height = window.innerHeight / 3;

    canvasBars.width = window.innerWidth / 3;
    canvasBars.height = canvas.height;

    outputConsole.style.height = (window.innerHeight / 3) * 2 + 'px';
    outputConsole.style.top = window.innerHeight / 3 + 'px';

    focal = canvas.width / 2;
    vpx = canvas.width / 2;
    vpy = canvas.height / 2;
    ctx.strokeStyle = ctxBars.strokeStyle = ctxBars.fillStyle = '#00FF00';
    });

    @font-face {
    font-family: 'Source Code Pro';
    font-style: normal;
    font-weight: 400;
    src: local('Source Code Pro'), local('SourceCodePro-Regular'), url(http://themes.googleusercontent.com/static/fonts/sourcecodepro/v4/mrl8jkM18OlOQN8JLgasDxM0YzuT7MdOe03otPbuUS0.woff) format('woff');
    }
    body {
    font-family: 'Source Code Pro';
    background: #000;
    color: #00FF00;
    margin: 0;
    font-size: 13px;
    }
    canvas {
    position: absolute;
    top: 0;
    left: 0;
    }
    .bars-and-stuff {
    left: 66.6%;
    }
    .output-console {
    position: fixed;
    overflow: hidden;
    }
    p {
    margin: 0
    }

    <canvas class='hacker-3d-shiz'></canvas>
    <canvas class='bars-and-stuff'></canvas>
    <div class="output-console"></div>




    The painting/maintenance guys realized that i'm a programmer and not just some guy listening to music!! I wonder if this would survive some examination by a tech guy :P

    I want it as my new screensaver!! In fact, how would you do that in ubuntu?

    Not quite sure actually, lol i've had it running on my third monitor in fullscreen mode all day.

    The best part is the bars bouncing up and down; it's clear they don't represent any real data!

    Why the graphics too? Wouldn't having the console alone make it look more believable??

    Hollywood-style might fool the average person, but not the average techie (even cursory): green text (unless that's what you have your terminal/command line set to) is not normal, and the visualizations don't make much sense.

    @TimS. lol I agree, maybe Ill add some customization options to it (color, removing or adding the graphic outputs ect.) regardless it would be hard to fool a tech person with it, I could definitely fool my mother in law though.

    I sat in the Toronto Public Library with this open and I noticed people behind me looking at my screen. This looks pretty 'scary' to a nontech guy. Can you can make guihacker.com allow us 2 change the title of the page to whatever we'd like, and if we can add in our own lines which will appear in the green text? I was thinking about making the title of the page 'Toronto Public Library Internet Access' and making the green lines say 'Accessing Toronto Public Library Security Database..' 'Accessing usernames and passwords...' 'Access Granted..' This may get me in some trouble but it will be fun.

    @user2719875 haha yeah for sure, Im going to put it on github tonight as well. Thats hilarious. Something else to do is put it in fullscreen mode (F11) then you wont see the page title anymore

    I just created a jsfiddle for this. Pretty neat stuff! http://jsfiddle.net/XR393/

    @Pathachiever11 I have it on codepen as well http://codepen.io/loktar00/details/jbCzt/

    `'Performing DNS Lookups for'` needs a space at the end of the string. I like it a lot :)

    @Lembik If you can port it to an SWF file I think you can do it

    @Cruncher you could probably use node-webkit as well actually... might give that a shot today.

    @Loktar please let me know if you get success!

    It needs some bleeping sounds when you hit keys.

    @marczellm no, it needs those completely meaningless bleeping noises whenever it prints a line, like it would have if it were in any TV show (e.g. CSI or 24).

    Had this running for all of 30 seconds before my fellow developers came over to ask what I was hacking into. I *think* that counts as a success, so +1

    You should add fake `wget` and `nmap` output! People might actually recognize them from movies, and the commands can be 'confirmed' with real output...

    "TPS Reports"...brilliant.

    If you want something that looks a little like this, but actually does stuff, try cracking a WPA2 WiFi password with aircrack-ng. Here is a picture (OK. It doesn't look much like it at all... =P)

    @daviewales: prolly not a good thing to be doing at the office...

    What if you work as a security tester?

    then you're not faking it! :)

    please, post a **jsfiddle!**

License under CC-BY-SA with attribution


Content dated before 7/24/2021 11:53 AM