Jump to content

Recommended Posts

Posted

Just reaching out to more experienced coders as programming has never been my strong point... :)

 

We've known for a little while that students with access to Python are able to change their desktop background by means of code similar to the below:

 

import ctypes
SPI_SETDESKWALLPAPER = 20
ctypes.windll.user32.SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0, "blahblah.jpg", 0)

 

Most of it is fairly innocuous - Star Wars backgrounds etc. - but unfortunately this morning we've had the (inevitable) naked ladies. I'd imagine the image itself was brought in via USB stick or someone's personal online storage.

 

SLT aren't happy that this is possible and my "reminders" that this is (just the start of) what NMs were kicking off about when programming became part of the mainstream curriculum seem to be falling on deaf ears. Nevertheless, does anyone know whether it's possible to disable certain Python modules or functions without any major side effects - ideally a deployable method? I've tried removing the Ctypes folder from Lib through GPP Folders, but unfortunately this causes an MSI re-install whenever Python is launched as it detects missing components, which it seems is an unacceptable delay. If it's possible to do it properly, I wouldn't mind getting rid of anything that reads to or writes from the Registry too (proxy settings etc)...

Posted

To be honest I'd bite the bullet and look at wrapping the "programming" software up in a sandbox environment, something like Oracle VM Virtualbox.

 

Then the students can cause whatever mayhem they like in an environment that resets itself when they reboot.

  • Thanks 1
Posted

That would be an HKCU key so users have permission by default (and taking it away within a User hive can get problematic) - either way, that method uses a function call rather than direct Registry modification.

 

Unfortunately VMs on workstations don't seem to be an option for us. Since my last post I've created and deployed a VM with VirtualBox, but running it inevitably causes the workstation to either hang up and reboot or give a STOP 0x00000101 error within a few minutes. Most of our suites where coding would be taught have old Dell OptiPlex 740s which, even with RAM, SSD and BIOS upgrades (no CPU config options), don't seem to be able to handle it... and we've no money for replacements en masse, of course.

 

So put bluntly, then, are we saying there's no way to programmatically disable functionality within Python?

Posted
Not sure why teachers aren't happy that there's a trail of evidence as to who committed a banned action, much easier to trace than the owners/creators of physical items (drawing on walls, leaving banned objects around). Just ban the user for a week from computers etc etc
Posted

The problem is that this particular banned action is of the type that can have consequences beyond school discipline.

 

Just as it's possible to sue your employer if another employee has pornography on their screen and you can see it from across the office (and are "offended" by it, of course), so it is in school classrooms. It's an incredibly unlikely outcome, but as I said, now that they can change the desktop background it's only a matter of time before the naked ladies begin to appear...

Posted

That's a persistent myth about some areas of the law I'm afraid - it applies to H&S Law but not Law of Negligence, for example.

 

Either way, in this case we can't take any steps beyond removing software - and thereby the subject - from the curriculum...

Posted

But they can use MS Word to write a swear word, or MS Paint to draw a rude picture. Or just use a pen and paper. Or shout swear words out loud. How are you banning all those things?

 

Oddly if you set a desktop via that command (or W version in python 3 (why aren't you using python 3?)), and read it back, I get test.jpg, but test.jpg is nowhere to be found in the registry, and there's no jpg files in c:\users\username or c:\windows, or c:\python34, so weird, can't find it with procman either

Posted

In a courtroom, the legal test for "toxic content" within the context of an office or classroom is likely to be passed by a hardcore pornographic image, but failed by "stickman porn" or individual instances of written or spoken profanity. Context and all that - I can provide more details if you want them but we'd be getting off-topic. PM me if you like, I have a very long debate you could read... :p

 

I'm not sure about how exactly the wallpaper is set using that method - possibly the whole TranscodedWallpaper thing at a guess? As for Python 3, personally I think we should be using that exclusively though we currently have both 2.7 and 3.2 deployed. Our Head of ICT has asked that if we have to make a choice (such as if I deploy a VM with a single application if our workstations would magically work with it), we should stick with 2.7 as most of the resources he's prepared for exam revision etc are based on that. Don't ask me why... but it's his job, I'll obviously accept his choice! :)

Posted
The problem is that this particular band action is of the type that can have consequences beyond school discipline.

 

Just as it's possible to sue your employer if another employee has pornography on their screen and you can see it from across the office (and are "offended" by it, of course), so it is in school classrooms. It's an incredibly unlikely outcome, but as I said, now that they can change the desktop background it's only a matter of time one week before the bare naked ladies begin to appear...

 

fixed this for you

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...