Stop Microsoft
Miscellaneous => Programming & Networking => Topic started by: Kintaro on 28 March 2003, 12:10
-
A program I made in C.
http://users.bigpond.com/tate0/shit/menu.tar.gz (http://users.bigpond.com/tate0/shit/menu.tar.gz)
-
actually i think it's good! obviously, it's not very complex, but it does the job and that's excellent.
i didn't read the source code yet, but i have a couple of comments regarding usability that may or may not be of interest to you. they are both minor.
1) i installed menu on a system with no 'pine' installed, and of course when i selected pine, it didn't open. however i would like to see an error message be displayed when a program cannot be run. this may not be an issue to you since you know that all those programs are installed on the machine you will have it running on.
2) to exit, i had to type a captial X. with the other menu entries, small letters were okay, but with exit, it had to be a capital. this isn't major, but is an inconsistency with the interface.
also, there's an aesthetic consideration regarding what the entries are called. this one should be really simple to change, all i propose is that the menu entries contain terse description of what the program does and how to get back to the menu. example:
p) pine - mail reader - type 'ctrl-q' to return to menu
l) lynx - browser - type 'q' to return to menu
b) bash - command prompt - type 'exit' to return to menu
that sort of thing. also, if the system uses bash instead of sh or ash, i think the menu should say what shell it actually uses. it is possible that my system just symlinks sh to bash so that's why i got bash instead of sh, as i say i didn't read the code yet so i don't know.
just my thoughts. i might actually use that for my own "desktop", when not using a gui, instead of just having a bash prompt. if i do ever use it and modify it, i'll email you a copy of the new one.
edit: oh yes, btw, maybe 'install' could take some options about where to put the executable, just a thought, i don't know how to code so i don't know how difficult this is, also, it's only two files or something so they would be easy to move after installation, but still...
[ March 28, 2003: Message edited by: Calum: crusader for justice & peace ]
-
i tested your app and fixed the bug (exit) which does not really deserve mention but :D
Info for callum
All it does is accept input with this line
the command are run with this command
for example to run lynx the code is
this function is provided in the standard header stdlib.h
just thought it might help...
a little...
-
Well thanks Calum, and there was a reason why the exit command only worked with a capital X. But fork it all you want as nobody owns it.
I made it because, when I get the wireless networking I will be hosting shell accounts to Melbourne Wireless (http://melborne.wireless.org) in the near future.
-
what's the reason? (for the X)
-
because somone might press x instead of c (being right next to the x key) so you have to hold shift for it.
-
This:
would be better written as a for loop:
You could do all this more easily as a shell script btw.
-
I might make a curses port but then I also plan on using it on a line printing terminal.
But I think I'll to a curses port of it.
1 reason why its not a shell script is that if its compiled I can stop users from adding certain things to the menu, and exploiting it as easily.
If I wanted I could take the shell option out and the mc option limiting users ability to fiddle with the system (Windows style security really).
There was a few other reasons, but now I might start work on a curses port.
-
quote:
Source Originally posted by matthew : /dev/urandom:
[/b]
That would be better.
-
http://www.insanebaboon.netfirms.com/cmenu.tgz (http://www.insanebaboon.netfirms.com/cmenu.tgz)
I added color and some other junk.
I fixed a bug where calling bash didn't exit curses mode so the bash terminal was kinda funky. Some silly file stuff too, just for fun.
Download it!!
[ March 29, 2003: Message edited by: Linux User #5225982375 ]
-
You know what would be cool is to have an option for the user to set the colors himself, and it saves the option in a file somewhere.
Edit: oops I see I posted in the wrong thread.
[ March 29, 2003: Message edited by: Linux User #5225982375 ]
[ March 29, 2003: Message edited by: Linux User #5225982375 ]
-
i am trying to modify the menu to work exactly how i want it to, but i cannot download the file you linked to above because external linking is not allowed with netfirms. can you embed a link to it in an html page and post the link to the html page please?
thanks.
i will upload my finished version once i have, well, finished it.
-
what about securing it up a bit and makeing it read a . file in the user homedirectory or a system wide /etc file thus allowing full custimizablilty of the menu and also allow for the system administrator to lock it down and only allow certian apps to be run.
though it looks like something would like to use and ill have to look into what i just said during school, and try to hack it up.
-
quote:
Originally posted by X11:
1 reason why its not a shell script is that if its compiled I can stop users from adding certain things to the menu, and exploiting it as easily.
Surely they won't have write access to it? And it won't be exploitable unless it runs as a different user.
-
you are totally correct about that, i can't think what he means by saying it's more secure if it's not a script.
personally i am totally mr no-clue when it comes to programming, all i will be doing is tightening up the interface and writing better docs for the program, i did already make one based on x11's cmenu.tar.gz which can be found here:
http://www.polytheism.org.uk/files/cmenu-2c.zip (http://www.polytheism.org.uk/files/cmenu-2c.zip)
(yes it is a zip file, sorry, i am at work and don't have a tarball capable archive tool here. just use 'unzip' instead of 'tar -xvzf', it won't hurt just this once. ;) )
but i wanted to get linux user's one too because i wanted to incorporate his fix for the 'shell' entry not working properly when selected. there's also another bug in my one regarding pico, but see the changelog and the TODO files for that.
[ April 02, 2003: Message edited by: Calum: crusader for peace & freedom ]
-
^c and you'll be back at the prompt from a script and I *believe* that can be fixed in a C program... that said i program in Eiffel not C so I wouldnt know.
Anyway if your system is properly locked down with appropriate permissions (and no suid/exploitable programs) then your fine...
[debian_plug]ah the joys of an OS that sets /dev/dsp* (the sound mixers) to root access only... because really isnt giving users sound a security risk? :D [/debian_plug]
-
well even so, this is not really an issue since dropping to a prompt is actually one of the options on the menu! nobody should be giving ssh access to their system unless they are sure they correctly chmodded it, so it's moot either way in my opinion. but he's written it in C because he wants to, isn't that okay?
-
Good point.
I appreciate that shell scripts are too boring to use if you have an alternative, just pointing out that they're no less secure.
Hey I made a program to brute force root 2 to about 500 or so decimal places of accuracy the other week and i could have just done that in maple so I already know that programming is fun... (http://smile.gif)
-
And yeah SSH access should only be allowed given correct file permissions (AND John vs /etc/shadow AND a recent version of SSH AND recent versions of all exxecutable programs...) so the point about whether it should be in c or scripts is moot...
EXCPET a c program could be made to crash and if the program was started as root then whoever crashes said program can get root... its pretty hard to crash a shell I believe (although I have seen a DOS window crash - but that was MS DOS which explains it. (http://smile.gif) )
-
well as i understand it, the script will be called from .bashrc or .bash_session or .login or whatever in the user's home dir (that's where i would have it called from anyway) so it should be running as the user who has logged in, and never as root.
-
The script will... I suppose you can just put /usr/local/bin/menu_program_thingie in there too but if the user controls it they can kill it off and get a shell too... there must be a workaround I guess... but hey like you said theres an option to get a shell anyway.
quote:
I made it because, when I get the wireless networking I will be hosting shell accounts to Melbourne Wireless in the near future.
BTW if Melbourne wireless network is like Canberras wireless network its run by linux geeks. Why would linux geeks pay for shell acounts that restrict their fun when they can just use their own computers? I mean the ability to have an extra link of anonyminity in the email chain I guess but its not like anyone out there actually secures their sendmail port so why bother?
-
Now if you made it for _fun_ *that* I can understand...
-
hmm, well i have a shell account at grex (that i hardly ever use) for the reason that i can ssh to it from putty in windows (when i am forced to use it), because windows sucks several cocks all at once. grex is shit though for emailing because they block most incoming mail for being in a nonstandard format or some guff. if i really could email from a shell account and feel secure that i would get replies to my email account, then i would use such a shell account.
also, what if there are a lof of XP heads on the network? actually they might not want a shell account either because they have XP and you know, can't see the point of having a command prompt because they are so used to the command prompt being totally useless. one other thing, remember that canberra and melbourne are completely different. i can't see it being the same sort of people using the wireless network in melbourne as in canberra, but then again, they still might all be linux people, who knows.
quote:
The script will... I suppose you can just put /usr/local/bin/menu_program_thingie in there too
oh yeah, i forgot we were making this as a program and not a script... well, still all it needs is another line added to the install script with 'chmod 011 /usr/bin/cmenu' and we're set. (that will work won't it?)
[ April 02, 2003: Message edited by: Calum: crusader for peace & freedom ]
-
hey, linux user? can you post a proper working link to your program please? thank you.
-
Sorry, netfirms is a prick. I'll just post the code here.
-
th4x0rz very much.
Im currently posting from Windows .NET in Linux (vmware) with Mozilla.
-
quote:
th4x0rz
I believe english is the primary modus operandi of communication in these forums X11. Why are you talking like a 16 year old code kiddy? Oh wait...
SPEAK ENGLISH!
edit : although on second thoughts I must say that your flagrant disregard for spelling leaves me in absolute awe at your technical superiority.
[ April 05, 2003: Message edited by: Faust ]
-
In short X11 please do not talk like senor "datacide" as your obviously more mature than he is.
-
How about you come here, to my house, and SUCK MY WHITE ASS.
h4x0r
cr4x0r
ill talk how I want.
-
you're typing, not talking...
d1xx0r|-|34d! :D :D :D :D
-
quote:
In short X11 please do not talk like senor "datacide" as your obviously more mature than he is.
i see now I was wrong. How bout I come to your house and just beat you up?
BTW I just "love" your "fantastic" web site.
[ April 05, 2003: Message edited by: Faust ]
-
(http://users.bigpond.com/tate0/shit/fuckingidiot.gif)
-
quote:
Originally posted by Faust:
i see now I was wrong. How bout I come to your house and just beat you up?
BTW I just "love" your "fantastic" web site.
[ April 05, 2003: Message edited by: Faust ]
9 Coram Close
Narre Warren North
Victoria, 3804
-
yeah go on, take a weekend and go down there, then whoever survives can tell us all the gory details!
-
quote:
Originally posted by Calum: crusader for peace & freedom:
yeah go on, take a weekend and go down there, then whoever survives can tell us all the gory details!
Boy, we seem to be having an Australian "civil" war in our hands. BTW, like Calum wrote, we want all the gory details from whoever survives. :D
Oh, and:
(http://l337images.com/images/picture72.jpg)