That’s actually much more impressive. Programming a game in a single programming language is easy; using a web browser to do low-level communications with a printer, without using the browser’s built-in print function, is extremely difficult.
Web developer here with the need to be a giant buzzkill: That’s literally not possible.
You could fake it with a couple of tricks though, like printing it on a time delay and being really good at timing things, or just hacking the printer to run a web server to trigger a print job.
Jake
Not hacking the printer. Hack the print server. Spin up your own server somewhere to receive an AJAX hit from the webpage, and then fire off a print job on the hacked print server. For bonus points, clear the queue of any current jobs to prioritize your grandstanding.
Kelly
I am pretty sure that running a print job from the web server is about the only way to do this on modern setups, unless Amber knows some unpatched privilege escalation bugs.
And even that is only if the classroom printer is accessible from whatever network the server is on.
Andrusi
It would require some lucky coincidences, but it’s not implausible. Actually I think it would have been doable in the College of Engineering at UNCC a few years ago, back when we had our own public_html folders separate from ITS’s.
WaytoomanyUIDs
I recall reading an article a couple of years back about how most Postscript printers have patched privilege escalation bugs that allow you to execute random code on them. Dunno if the situation has changed.
WaytoomanyUIDs
oops, meant unpatched
Lord Geovanni
^^ like your gravatar who is it supposed to be
TPman
That is the Cookie Monster. From Gunnerkrigg Court. She has an actual name but I can’t remember it.
Kyle
That’s actually how I solved this problem in production at a small company which moved all of their internal operations to a company intranet. Make an AJAX call to the correct server, specifying what to print and what printer to use, spit out a label or a document anywhere in the company.
If she was prepared, it could actually get a little scarier than that. University networks are notoriously insecure (at least, they were back when I was in school) so it shouldn’t be too hard to stand up a server somewhere that has access to every printer in the university. Map these printer IPs to latitude/longitude pairs then request geolocation data from the browser when making the request, to create a service that will print to the printer physically closest to the user making the request. That’s a few hours work, but it’d be supremely handy for a CS student of surprising mobility who prepares for every conceivable scenario. It’s not an unreasonable task for Amazi-Girl to have accomplished in the background.
Alan Hardman
Two words: Java Applet. Of course that would never work on a mobile device and these days the security warnings would prevent it from ever printing, but 10 years ago, that’d do it.
As mentioned below, window.print() only opens a print dialog, while this clearly started printing immediately with no further input.
slicedtoad
@kelly
What? we can’t see her phone’s screen, how do you know she didn’t submit the print dialog?
tinfoil theory
On second thought, it should probably print out the source rather than the page.
Hoodiecrow
You can do it, but you need to use AML* instead of HTML/Javascript. There has to be server support and sufficient privileges, of course, but luckily every server supports AML and AML code always has the right privileges.
*) Amazi-Markup Language
Les
You young whippersnappers with your HTML & AML… back when I was in grad school I was running SAS & SPSS on punch cards with a dot matrix printer. So given how much IT technology has improved in the last 30 years I could totally buy her being able to pull something like this off.
Oberon
Try an Altos with an 8088 CPU running SCO Zenix on 4MB of RAM. Also with a dot-matrix printer. Printing using ed…
Uphill in the snow, both ways. And we liked it!
Kryss LaBryn
My first computer was a Tandy Laser XT with an 8086 CPU. And we had a monochrome monitor because Mum refused to pay an extra three hundred bucks just for a colour one.
Didn’t even have an internal hard drive. Booted up from two 4 1/2″ floppies. Took half an hour.
I still have some dot matrix printer paper somewhere around here, with the holes up the sides…
atd_
I’m thinking, maybe it could be done with CUPS. You know it exposes a web server on localhost:631, right? If it had the appropriate CORS headers…
Dibullba
I would not say it is impossible though I am not exactly adept when it comes to scripting. However, I assume if an execution command to print is attached to a quicklink (or is it hyperlink been a long time) that follows a set of commands to bypass moderator privileges and place the appropriate value within the print command prompt to allow a print of the webpage would be the general idea. It does require hacking in a sense and this is just merely a theory.
xray-whiskey-yankee
Senior dev here: senior devs are paid to kill buzz. Stops the plebs writing stuff that spins out of control.
And yes, junior dev, you have to use SVN.
Kelly
SVN? What, is this the Stone Age? Ok, Bronze Age…Stone Age would be CVS. Come on, GIT with with the program!
The_Master
It can be set up to tell the browser to print. Google sites I believe will just tell your browser to print and you’ll get the usual dialogue box.
For all we know she pre-hacked his tablet, made a clone of the webbrowser and can basically do whatever she wants.
If you don’t believe wifi hacking of a tablet is possible,maybe a certain vigilante snuck in at night and did it physically with a usb cable.
PoweredBySucrose
Hacking (in the comptuer-intrusion sense) is a great way to get acquainted with your university’s disciplinary procedures and honor code.
And by great, I mean, monumentally stupid.
Amazi-Girl might could get away with that, but Amber would be ill advised to take credit for it.
That line, coupled with the sunglasses on your gravatar, makes me expect the “CSI: Miami” “YEEEEEAAAAAHHHH!” to suddenly pour forth from my speakers. =P
314 thoughts on “Html”
Jen Aside
program a whole game, still not impressed
thebombzen
That’s actually much more impressive. Programming a game in a single programming language is easy; using a web browser to do low-level communications with a printer, without using the browser’s built-in print function, is extremely difficult.
rhelmot
Web developer here with the need to be a giant buzzkill: That’s literally not possible.
You could fake it with a couple of tricks though, like printing it on a time delay and being really good at timing things, or just hacking the printer to run a web server to trigger a print job.
Jake
Not hacking the printer. Hack the print server. Spin up your own server somewhere to receive an AJAX hit from the webpage, and then fire off a print job on the hacked print server. For bonus points, clear the queue of any current jobs to prioritize your grandstanding.
Kelly
I am pretty sure that running a print job from the web server is about the only way to do this on modern setups, unless Amber knows some unpatched privilege escalation bugs.
And even that is only if the classroom printer is accessible from whatever network the server is on.
Andrusi
It would require some lucky coincidences, but it’s not implausible. Actually I think it would have been doable in the College of Engineering at UNCC a few years ago, back when we had our own public_html folders separate from ITS’s.
WaytoomanyUIDs
I recall reading an article a couple of years back about how most Postscript printers have patched privilege escalation bugs that allow you to execute random code on them. Dunno if the situation has changed.
WaytoomanyUIDs
oops, meant unpatched
Lord Geovanni
^^ like your gravatar who is it supposed to be
TPman
That is the Cookie Monster. From Gunnerkrigg Court. She has an actual name but I can’t remember it.
Kyle
That’s actually how I solved this problem in production at a small company which moved all of their internal operations to a company intranet. Make an AJAX call to the correct server, specifying what to print and what printer to use, spit out a label or a document anywhere in the company.
If she was prepared, it could actually get a little scarier than that. University networks are notoriously insecure (at least, they were back when I was in school) so it shouldn’t be too hard to stand up a server somewhere that has access to every printer in the university. Map these printer IPs to latitude/longitude pairs then request geolocation data from the browser when making the request, to create a service that will print to the printer physically closest to the user making the request. That’s a few hours work, but it’d be supremely handy for a CS student of surprising mobility who prepares for every conceivable scenario. It’s not an unreasonable task for Amazi-Girl to have accomplished in the background.
Alan Hardman
Two words: Java Applet. Of course that would never work on a mobile device and these days the security warnings would prevent it from ever printing, but 10 years ago, that’d do it.
tinfoil theory
<?!DOCTYPE html>
<html><head>O’Malley’s Assignement</title></head>
<body><p align=”center”>
<form><input type=”button” value=”Print this page” onClick=”window.print()”></form>
<button value=”javascript:window.print();”/>
</p></body></html>
Kelly
As mentioned below, window.print() only opens a print dialog, while this clearly started printing immediately with no further input.
slicedtoad
@kelly
What? we can’t see her phone’s screen, how do you know she didn’t submit the print dialog?
tinfoil theory
On second thought, it should probably print out the source rather than the page.
Hoodiecrow
You can do it, but you need to use AML* instead of HTML/Javascript. There has to be server support and sufficient privileges, of course, but luckily every server supports AML and AML code always has the right privileges.
*) Amazi-Markup Language
Les
You young whippersnappers with your HTML & AML… back when I was in grad school I was running SAS & SPSS on punch cards with a dot matrix printer. So given how much IT technology has improved in the last 30 years I could totally buy her being able to pull something like this off.
Oberon
Try an Altos with an 8088 CPU running SCO Zenix on 4MB of RAM. Also with a dot-matrix printer. Printing using ed…
Uphill in the snow, both ways. And we liked it!
Kryss LaBryn
My first computer was a Tandy Laser XT with an 8086 CPU. And we had a monochrome monitor because Mum refused to pay an extra three hundred bucks just for a colour one.
Didn’t even have an internal hard drive. Booted up from two 4 1/2″ floppies. Took half an hour.
I still have some dot matrix printer paper somewhere around here, with the holes up the sides…
atd_
I’m thinking, maybe it could be done with CUPS. You know it exposes a web server on localhost:631, right? If it had the appropriate CORS headers…
Dibullba
I would not say it is impossible though I am not exactly adept when it comes to scripting. However, I assume if an execution command to print is attached to a quicklink (or is it hyperlink been a long time) that follows a set of commands to bypass moderator privileges and place the appropriate value within the print command prompt to allow a print of the webpage would be the general idea. It does require hacking in a sense and this is just merely a theory.
xray-whiskey-yankee
Senior dev here: senior devs are paid to kill buzz. Stops the plebs writing stuff that spins out of control.
And yes, junior dev, you have to use SVN.
Kelly
SVN? What, is this the Stone Age? Ok, Bronze Age…Stone Age would be CVS. Come on, GIT with with the program!
The_Master
It can be set up to tell the browser to print. Google sites I believe will just tell your browser to print and you’ll get the usual dialogue box.
Thomas Wrobel
For all we know she pre-hacked his tablet, made a clone of the webbrowser and can basically do whatever she wants.
If you don’t believe wifi hacking of a tablet is possible,maybe a certain vigilante snuck in at night and did it physically with a usb cable.
PoweredBySucrose
Hacking (in the comptuer-intrusion sense) is a great way to get acquainted with your university’s disciplinary procedures and honor code.
And by great, I mean, monumentally stupid.
Amazi-Girl might could get away with that, but Amber would be ill advised to take credit for it.
Marisa Mockery
It must have been a very boring lecture then.
Camachri
Why would you deserve an A for what clearly warrants a C++?
Hoboturtle
This guy
Hoboturtle
XD
thebombzen
if 0xD is 13, then what’s xD?
Seth
An identifier, of course. And a syntax error if it wasn’t declared properly.
indignostudios
He’s not D#-est tool in the shed.
Seth
Thank you. I was trying to work that joke in myself, and sadly failed.
auo> mous
If 0xD=13, then xD=13/0 is indeterminate form.
thebombzen
It’s not really an indeterminate form. It just isn’t well-defined. 0 has no multiplicative inverse, and cannot or will not ever.
Plasma Mongoose
Off topic but nice Dalek-Grace gravatar you got there.
Kodra
YEAAAAAAAAAAH!
liahansen
that was one BASIC-ass programming joke
Seth
It wasn’t even visual.
Doctor_Who
I found it to contain a Perl of wisdom.
Seth
Possibly so, but Camachri’s clearly no Oracle.
Seth
I felt that it lacked a sense of Clojure.
Seth
You know what else it lacked? Class. It was too derived.
Someone stop me.
Camachri
Why? This is GLORIOUS~
OnyxIdol
I see #puns.
Seth
A huge, overflowing stack of them.
Kelly
This is quite a list of puns to process
Seth
I just don’t know what to do foreach.
TachyonCode
I suggest taking an objective approach.
Seth
Good idea. This was getting too abstract.
thebombzen
Functions could a method for abstraction
Seth
Error: expected verb near ‘could’ at line 0
jeffepp
I feel you are in Error.
Seth
I take exception to that.
slicedtoad
Time to throw you out.
Jen Aside
Rolling like a Ruby on Rails
Dreadhawk177
#include
Dreadhawk177
#include “scolding.h”
Dreadhawk177
Or perhaps a D…
Kelly
I think Rust will beat out D
CrystalGamma
You’re going to have to take ownership of that joke.
Agera
his python don’t want none
Marc in MN
That line, coupled with the sunglasses on your gravatar, makes me expect the “CSI: Miami” “YEEEEEAAAAAHHHH!” to suddenly pour forth from my speakers. =P
lightsabermario
You (Pas)called?
Deathstalker
I C what you did there.
LazerWulf
I consider myself FORTRANate that I understand that reference.
Seth
In other words… you were able to dereference it?
thebombzen
Shh… stop giving him pointers
Marianne
This entire thread is turning into a real brainfuck.
Seth
I think it’s time to switch context.
Deanatay
I got this reference.
Seth
It’s all right. He’ll return them.
Opus the Poet
That, sir or madam, was a truly horrible pun and you should be secretly proud, but publicly ashamed.
Arcian