Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Work in Progress / Command-line simulation program (open source, dbpro)

Author
Message
dev
18
Years of Service
User Offline
Joined: 18th Mar 2006
Location: /dev
Posted: 19th Mar 2006 03:50
The goal is that this program feels, appears, and acts as much as possible like a Linux command-line with several of the GNU core utilities.
The program is completely free and source code is included in the zip.

Right now the supported commands are:
adduser
bash
cat
cd
clear
date
echo
id
ifconfig
ls
mkdir
mv
cp
ping
rm
rmdir
sleep
su
telnet
touch
traceroute
whoami


Command-Line Options:
- Many of the commands interpret several and in some cases all of the options. (ie, you can do 'ls -laR', 'rm -ir', 'id -nu','cat -sb file1 file2')
- Many of the commands have --help information

Other command line features:
- The user can work with files and folders with spaces in them.
- The user can list multiple directories at a time.
- The user can cat multiple files at a time.
- The user can remove multiple files and recursively remove directories.
- The user can copy and move multiple files and folders to a folder at a time
- The user can issue multiple commands at once, seperated with ";" like in linux
- There is command line history almost just like in linux
- Users can edit text mid string using the left and right arrow keys
- Much work has been done to make mv, cp, and rm work just like the actual gnu programs
- The command line scrolls just like most command lines, when the prompt or output get to the bottom of the screen, all rows shift up one.

Other operating system simulation related features:
- Users have login names and passwords
- Passwords are hashed when they are saved to /etc/shadow
- All new users are saved to /etc/passwd and are reloaded when the program runs again.
- Users can su to root (provided they know the password(which in the source code is just set to 'lamepassword' for now.))
- When the user is root, the user can su to any other user and add users.
- When the user su's to another user, it "starts a new shell," and exiting returns the user to the previous shell, like in the real thing.

It's sometimes tricking trying to create the illusion that multiple processes are running when it's really just the one dark basic program.

Mock-Internet Features:
Just a note - The program never actually does anything over the internet, in the program it is just a simulation
- The DNS.txt have an easy to follow format, you can easily add names and ip addresses.
- Each website is under an isp
- The ping command works pretty much like the actual ping command
- Users can traceroute ip addresses.
- Users can telnet to ip addresses (right now you can telnet to any site that has a directory, but its possible to "block" the user if the port is not open.)
- Users can ifconfig to find their ip addresses.
- The user can easily telnet through multiple of the ip addresses, acting like a chain of proxies in the program.


So, why did you do this when you could just use a command line?
While I use the command line a lot, it was fun recreating several of the common programs I use a lot. I also didn't see anything quite like this on the forums. The closest things that came up were one or two 'hacking' games.

It's open source and if people want, they can improve it, change it to fit in their existing programs, or branch off and turn it into something completely different.

Some ideas people could branch off with this:

- An interactive program that helps people learn how to use linux command lines and how the linux file system is structured.

- A hacking game, sort of like uplink. It already has some telnet functionality, and with a bit more work, it could be implemented more fully. ssh, wget, and ftp could be added to the engine. Even a program like john the ripper could be added (that actually has a word dictionary and tries to find the password that when hashed matches the desired password hash. Logging could be added and tracing could be added. A mock IRC could be implemented with the engine, and some challenges could be getting remote files to usernames within certain time frames. Some rootkits could be implemented. One that comes to mind is the rootkit that hid everything that started with $sys$.

The zip is just 946kb and is attached to this message, try it out, post comments.

The exe is in the zip, but I couldn't get the source code to work when I upgrade from 5.8 to 5.9 or 6.0. If you have 5.9 or 6.0 it will probably crash if it runs at all. In dbp 6.0 it ran fine when I issued 'ls', but when I said 'ls -l' it crashed and didn't explain why. Right now the lastest version of DBP to run this without causing weird memory errors is DBP 5.8.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-09-29 12:14:37
Your offset time is: 2024-09-29 12:14:37