Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #28807

Homework sabotage [Was: Re: assignments]

From Eric Sosman <esosman@comcast-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Homework sabotage [Was: Re: assignments]
Date 2014-06-21 08:46 -0400
Organization A noiseless patient Spider
Message-ID <lo3us4$v31$1@dont-email.me> (permalink)
References <6aafa91c-4b8c-4884-a30d-2c4af8b443c2@googlegroups.com> <lo00ib$omt$1@dont-email.me> <8e2976e4-f31f-4363-9797-9e8d9a755708@googlegroups.com> <lo0311$7p2$1@dont-email.me> <6noaq9p5vipknufe8nviilroc2mbp025aq@4ax.com>

Show all headers | View raw


On 6/21/2014 6:51 AM, Gordon Levi wrote:
> Eric Sosman <esosman@comcast-dot-net.invalid> wrote:
>
>> One particularly nasty variant is a program that
>>         does what was asked but also prints "Ruben Ongayo is a lazy
>>         slimeball" *and* won't do anything at all if the message is
>>         removed or altered.
>
> I liked this idea so I took it as my homework. I added the condition
> that mere obfuscation was not allowed. Even it was, we know the
> homework shirker has a single stepping debugger. I have failed to
> produce the program. Can you help me with my homework?

     Most of the details have faded from my fading memory, but I
dimly recall somebody posting something along these lines here,
perhaps about a decade ago.  My hazy recollection is that the
code used reflection to extract its own class name (or was it
a method name?), used that name to decrypt a compiled-in byte[]
of gibberish into a byte[] in .class format, then loaded and
instantiated the resulting class -- which produced, naturally,
the asked-for homework solution.  If the containing class name
was changed from SoAndSo_Is_A_Slimeball to something less
damning, decryption would produce garbage and the decrypted
class wouldn't load, much less execute.

     (I repeat: fading memory, foggy details, et cetera.)

     A skilled Java programmer could defeat this pretty easily,
for example by breakpointing just after the decryption and then
decompiling the decrypted class.  But by asking to have his
homework done for him the requestor had already shown that
he was not a skilled Java programmer, so ...

-- 
Eric Sosman
esosman@comcast-dot-net.invalid

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

assignments Ruben Ongayo <rubzm11@gmail.com> - 2014-06-19 17:44 -0700
  Re: assignments Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-06-19 20:51 -0400
    Re: assignments Ruben Ongayo <rubzm11@gmail.com> - 2014-06-19 18:06 -0700
      Re: assignments Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-06-19 21:33 -0400
        Re: assignments Gordon Levi <gordon@address.invalid> - 2014-06-21 20:51 +1000
          Homework sabotage [Was: Re: assignments] Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-06-21 08:46 -0400
  Re: assignments Joshua Cranmer 🐧 <Pidgeot18@verizon.invalid> - 2014-06-19 20:49 -0500
  Re: assignments Roedy Green <see_website@mindprod.com.invalid> - 2014-06-20 08:04 -0700

csiph-web