Python on a public library computer

A

anton.vredegoor

Here's my situation:

I'm typing this in a public library on a computer with OS windows 2000
server. I can run Internet explorer, word, excel and powerpoint, that's
it. Maybe java, but it seems to be flaky.

I want to run python scripts from this computer. At home I have a
multi-computer network (from better times) but no internet access
anymore, I could use this to try out solutions. I also have access to a
friends computer which has internet connection, but I can't visit his
place all the time. He's away often but he's got a life of his own :)

So I'm thinking of running some kind of python webserver from a
dedicated computer over there (visualizing some cherrypy webpage based
interpreter at the moment) but I would like to know other options.
However it would have to run from a webpage here ...

For example I would like to run a python script over there (e.g.
getting news from a usenet server) which puts the output in a zipfile
on another webpage so that I can fetch it here with the Internet
Explorer.

There seems to be no traffic load problem since there would be only a
few users (but it could become popular fast?). Also I'm worried about
security issues, but not so much that I would consider installing some
large scale payware professional solution.

Let me know what you think, unless it costs money. On the other hand
money would solve this problem so if I can do something to get that it
would be even better.

Anton

[the things they make you go through ...]
 
J

John J. Lee

Here's my situation:

I'm typing this in a public library on a computer with OS windows 2000
server. I can run Internet explorer, word, excel and powerpoint, that's
it. Maybe java, but it seems to be flaky.

I want to run python scripts from this computer. At home I have a
multi-computer network (from better times) but no internet access
[...]

Why not Jython?


John
 
T

Timothy Smith

John said:
Here's my situation:

I'm typing this in a public library on a computer with OS windows 2000
server. I can run Internet explorer, word, excel and powerpoint, that's
it. Maybe java, but it seems to be flaky.

I want to run python scripts from this computer. At home I have a
multi-computer network (from better times) but no internet access
[...]

Why not Jython?


John
how locked down is the computer? there's a few (brave) public access
unix shell providers out there. if you could run telnet you could use them
 
C

Chris Lambacher

usb key and moveable python.
http://www.voidspace.org.uk/python/movpy/

John said:
Here's my situation:

I'm typing this in a public library on a computer with OS windows 2000
server. I can run Internet explorer, word, excel and powerpoint, that's
it. Maybe java, but it seems to be flaky.

I want to run python scripts from this computer. At home I have a
multi-computer network (from better times) but no internet access
[...]

Why not Jython?


John
how locked down is the computer? there's a few (brave) public access
unix shell providers out there. if you could run telnet you could use them
 
R

Roy Smith

Timothy Smith said:
there's a few (brave) public access unix shell providers out there. if
you could run telnet you could use them

If you want to go that route, I highly suggest panix.com. They've been in
business forever, are geek friendly, and have a technical support staff
(and attitude) that just can't be beat. I get a unix shell account from
them, mostly for mail and news access (but, on occasion, it's nice to have
a unix box I can ssh into from anywhere).

They're currently running Python-2.4. A couple of the active pythonistas
that hang out here have panix accounts.
 
A

Anton Vredegoor

John said:
Why not Jython?

There's no command prompt! The file menu from IE is also gone. There is
a sun Java console but it looks like this:

<quote Sun Java Console>

Java(TM) Plug-in: Version 1.4.2_06
Using JRE version 1.4.2_06 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\xxxxx
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>

</quote Sun Java Console>

Thanks for replying anyway!

Anton
 
A

Anton Vredegoor

John said:
Why not Jython?

There's no command prompt! The file menu from IE is also gone. There is
a sun Java console but it looks like this:

<quote Sun Java Console>

Java(TM) Plug-in: Version 1.4.2_06
Using JRE version 1.4.2_06 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\xxxxx
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>

</quote Sun Java Console>

Thanks for replying anyway!

Anton
 
A

Anton Vredegoor

Timothy said:
how locked down is the computer? there's a few (brave) public access
unix shell providers out there. if you could run telnet you could use
them

Sorry, no telnet. Every executable that is not listed is blocked. For
example I can download:

http://prdownloads.sourceforge.net/scintilla/Sc1.exe

but if I run it I get two error messages:

a) a 15 seconds "appguard" message

b} 'access to the specified device, path or file is denied'

Maybe some shell provider is a good idea, however I still think I
should make a cherrypy form of 24 lines or so and run it over there and
simulate a python interpreter on a webpage which I can access from
here. Has this been tried before?

How can I use cookies to identify interpreter sessions?

Anton

'webpython_3000_server_at_xxx.xxx.xxx.xxx_>>> '
 
A

Anton Vredegoor

Chris Lambacher topposted:

I have a usb card reader and I can use it. That saves me from having to
have remote storage at least. However I can only save files, not open
them, except if I use word, excel or powerpoint.

The moveable python is great indeed. This worked here before, but then
I could even access *other* peoples usb sticks in this whole building
.... Crazy. Not anymore though. They could really use someone like me
here for a sensible security policy that doesn't cripple the users. I
can't even set internet options, that means I can't remove my history
or clear my cache :-(

Anton

'security doesn't mean shooting everyone in the foot'
 
R

Robert Kern

Anton said:
Timothy Smith wrote:



them

Sorry, no telnet. Every executable that is not listed is blocked. For
example I can download:

http://prdownloads.sourceforge.net/scintilla/Sc1.exe

but if I run it I get two error messages:

a) a 15 seconds "appguard" message

b} 'access to the specified device, path or file is denied'

There is a Java SSH client that runs in the browser.

http://www.oit.duke.edu/sa/security/ssh.html

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
C

Christos TZOTZIOY Georgiou

I'm typing this in a public library on a computer with OS windows 2000
server. I can run Internet explorer, word, excel and powerpoint, that's
it. Maybe java, but it seems to be flaky.

I want to run python scripts from this computer.

<snip>

I am not sure I will help you (uncertainty based on the part I snipped),
but the part so far can be easilly solved if you install Python for
single user inside the "Documents and settings\<username>" folder (or
whatever it is called). I did in a similar case.


End of reply here; and now for some completely minor python success
story.


Some months ago, I happened to be for full workdays at a client's site,
with strict security rules enforced (no domain login == no access even
to web proxy) but I needed to access my company's internal mail server
from my laptop (which I do by ssh forwarding usually). I could plug in
my laptop to their network, get an address, but that was all (local
network access only).

So I asked permission from an employee there (working on a computer
logged on to the domain) if I could run a putty session with forwarding
enabled. He said he'd ask their BOFH; now, the BOFH was strictly a
windows person (I somehow connect "strictly-<industry-standard-OS/app>
persons" with lack of resourcefulness, as if these people have 7 bits
per byte :), and he thought that my case was hopeless, since the
employee's account had only access to a web proxy, and CONNECT requests
were only allowed to port 443, but he said ok anyway (in his place, I
wouldn't; but then again, what do I know? ;).

After a call to a colleague in order to redirect connections to port 443
(from the client's network) of an underused computer at my site to port
22, I set up putty to connect through their web proxy, but that didn't
work (since no authentication was given as requested).

Then it was that I downloaded python, installed it in the employee's
documents folder, and created a 'sniffer' between the web browser and
web proxy to find out the authentication headers. After testing them by
hand, I wrote a script to pretend it's the web browser requesting a
CONNECT from the web proxy, and putty would connect to my script which
would just pass data back and forth. It didn't work.

I quickly found out that their web proxy did NOT let anything come and
go, unless its client had sent at least 4 octets (and that was also a
security measure they had taken which I was not told about-- they wanted
only protocols where the client talks first, ie (pun intended) typically
HTTP). So putty was waiting for the ssh server to announce its version
before announcing itself, but the announcement of the server would not
come through until putty sent something.

So I changed the middle-server [midsrv]: as soon as putty connected to
the listening port of midsrv, it opened the connection to the web proxy,
and instantly sent the putty announcement to the ssh server, consuming
it when putty sent it normally, and happily moving octets around for the
rest of the connection. From my laptop, I could get my emails with
plain POP3.

That was in 34 minutes time (debugging time included).

When the network guy dropped by a couple of hours later to ask me if I
needed any help, I just thanked him for letting me connect. He
scratched his head, tried to understand what happened (didn't realise
that the python app was important even though he absent-mindedly passed
over it checking running tasks), so I let him think over it for several
minutes before explaining to him what I did. He was most impressed with
the python program when I showed it to him, gave a warning to the
employee: "ok, run his program, but don't let him touch your computer
again!", and then came to the following conclusion (much similar to a
Python motto):

"If Python can do this, it {Python} should be forbidden..."


PS Unfortunately, I could not charge "security consulting" fees.
 
A

Anton Vredegoor

Christos said:
I am not sure I will help you (uncertainty based on the part I snipped),
but the part so far can be easilly solved if you install Python for
single user inside the "Documents and settings\<username>" folder (or
whatever it is called). I did in a similar case.

..msi is blocked by the appguard. I knew that because I tried it a week
ago, but just to be sure I tried again.
End of reply here; and now for some completely minor python success
story.

[snip story]
Thanks, that was a nice story! However I still think ... But you know
what I think by now don't you :)

Anton

'(e-mail address removed)>>> import NNTP '
 
J

John J. Lee

Anton Vredegoor said:
There's no command prompt! The file menu from IE is also gone. There is
a sun Java console but it looks like this:
[...]

ISTR (maybe incorrectly) there's a Jython shell you can run in IE.


John
 
J

John J. Lee

Anton Vredegoor said:
Chris Lambacher topposted:


I have a usb card reader and I can use it. That saves me from having to
have remote storage at least. However I can only save files, not open
them, except if I use word, excel or powerpoint.
[...]

That's because Word, Excel and Powerpoint are such noteworthy examples
of perfectly-secure software, invulnerable to macro viruses or subtle
interactions with IE.

Heaven forfend that you should exploit such a bug in order to get your
work done.

No, being serious, sinking to that level of hacking probably isn't a
great idea, but it is tempting when you're trying to do something
perfectly above-board and are blocked for reason of not being part of
the MS machinery...


John
 
L

Lucas Raab

Here's my situation:

I'm typing this in a public library on a computer with OS windows 2000
server. I can run Internet explorer, word, excel and powerpoint, that's
it. Maybe java, but it seems to be flaky.

I want to run python scripts from this computer. At home I have a
multi-computer network (from better times) but no internet access
anymore, I could use this to try out solutions. I also have access to a
friends computer which has internet connection, but I can't visit his
place all the time. He's away often but he's got a life of his own :)

So I'm thinking of running some kind of python webserver from a
dedicated computer over there (visualizing some cherrypy webpage based
interpreter at the moment) but I would like to know other options.
However it would have to run from a webpage here ...

For example I would like to run a python script over there (e.g.
getting news from a usenet server) which puts the output in a zipfile
on another webpage so that I can fetch it here with the Internet
Explorer.

There seems to be no traffic load problem since there would be only a
few users (but it could become popular fast?). Also I'm worried about
security issues, but not so much that I would consider installing some
large scale payware professional solution.

Let me know what you think, unless it costs money. On the other hand
money would solve this problem so if I can do something to get that it
would be even better.

Anton

[the things they make you go through ...]

Hehehe. If it's possible you could run Knoppix from a CD. Or Damn Small
Linux from a memory key.

--
--------------------------
Lucas Raab
lvraab"@"earthlink.net
dotpyFE"@"gmail.com
AIM: Phoenix11890
MSN: dotpyfe "@" gmail.com
IRC: lvraab
ICQ: 324767918
Yahoo: Phoenix11890
 
M

Mike Meyer

Anton Vredegoor said:
them

Sorry, no telnet. Every executable that is not listed is blocked.

You sure? IE used to understand telnet: URLs, and would open a console
window talking to the remote end. It may have been doing it with an
external application, in which case this won't help you.

<mike
 
A

Anton Vredegoor

Mike said:
You sure? IE used to understand telnet: URLs, and would open a console
window talking to the remote end. It may have been doing it with an
external application, in which case this won't help you.

Yes, I'm sure. At least now I am. I just did a "telnet://localhost" and
there was an error message from the appguard stating that "telnet.exe"
wasn't allowed to run.

Since some posters keep replying as if I just could install this here
or run that there (from a memory stick for example) I will say
something about what kind of solution I want.

I have little doubt that I could find a way to pass the security system
here if I really wanted that. The printing routine allows printing to a
file and has a filebrowser that can see all the 'forbidden'
directories. Also everytime someone prints anything around here the
complete network freezes for about half a minute so there's little
doubt that we have a high priority process here.

However that's *not* what I want (not saying that's what you think I
want, just speaking to the third person in general here). What I want
is to use the principle of flowing around the obstacle, leaving the
blocking instance out of the loop thereby "punishing" it for it's own
stupidity. It's the way internet works.

So if a telnet is offered I use it. If I have to create a webform on
*another* computer that I can access from here and which looks like a
telnet command line, that would be ok too.

So far I have received a valuable tip about a javabased terminal which
would in the end enable me to log in to some other computer and from
there I could possibly start a python interpreter session.

This also makes me think it should be possible to load a java based
python somehow. Maybe from a java text editor that can run jython?
However jython implies running jview.exe or at least some other java
interpreter? But then how does this ssh terminal run java?

It's a thin line between philosophy, fear of breaking the rules and
having the security personnel throw me out of here, and trying to live
in a just world.

Assume I can't or won't run .exe that are blacklisted. Any way to start
a python interpreter? This is a python challenge too isn't it :)

Anton

'this parrot.exe is dead'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,812
Messages
2,569,694
Members
45,478
Latest member
dontilydondon

Latest Threads

Top