Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(){
- for(;;){
- char cwd[1024];
- char cmd[1024];
- getcwd(cwd, sizeof(cwd));
- printf("%s>",cwd);
- scanf("%s",cmd);
- sprintf(cmd,"/bin/bash %s",cmd);
- printf("\n");
- if(tolower(cmd) == "exit"){
- return 0;
- }else{
- system(cmd);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement