Follow us on Twitter!
Few are those who can see with their own eyes and hear with their own hearts. - Albert Einstein
Wednesday, April 23, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 23
Guests Online: 20
Members Online: 3

Registered Members: 82886
Newest Member: The Slummy
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Author

interactive bash shell program


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 06-03-09 04:56
I was wondering if some one could point me in the right direction as to how I would program a bash shell program that would be interactive.. like say.. scapy or metasploit (the msfconsole).

Any ideas?? Thanks for any input. Smile


Author

RE: interactive bash shell program


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 06-03-09 05:51
What do you want your script to do exactly?

Oh, and it's unibomber. Uni is a prefix meaning "one" or "single".


Author

RE: interactive bash shell program


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 06-03-09 06:51
What I'm referring to is say when you enter ./msfconsole .. you are then brought up to the metasploit interactive console.

I was just wondering if this is possible to do with the bash shell, for like making simple text games or what have you.



Author

RE: interactive bash shell program


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 06-03-09 09:43
Yup, it's possible. Basically, you just need to do this:

Code
#!/bin/bash

read CMD;
echo $CMD;





Also, here's a tutorial on bash scripting: http://www.linuxc. . .g_Tutorial
Author

RE: interactive bash shell program

spyware
Member



Posts: 4192
Location:
Joined: 14.04.07
Rank:
God
Warn Level: 90
Posted on 06-03-09 09:55
Bourne-again shell shell?

Edit: btw, you don't need to use Bash in order to create fucking console applications/scripts. You can give command-line parameters to virtually every language.



img507.imageshack.us/img507/3580/spynewsig3il1.png
"The chowner of property." - Zeph
[small]
Widespread intellectual and moral docility may be convenient for leaders in the short term,
but it is suicidal for nations in the long term.
- Carl Sagan
[center]�Since the grid is inescapable, what were the earlier lasers about? Does the corridor have a sense of humor?� - Ebert[/ce

Edited by spyware on 06-03-09 10:24
Author

RE: interactive bash shell program


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 06-03-09 22:35
Well I was thinking of making a text based game that would look something like this:

root@somebox~$ ./game.sh (to run the game)

#################WelcomeToTheGame##################

TheGame>help

createcharacter ........................ create your character etc..
help ....................................... list help
etc etc

TheGame>


Where if you're in the interactive mode you no longer see "root@somebox~$ " because the game is taking control of the full console screen.

I imagine I might need to use stty. Any other ideas?


@Spyware: I'm choosing bash because it's what I'm most familiar with.




Edited by on 06-03-09 22:37