CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/external/source/ipwn/cmd.h
Views: 11766
1
/*
2
* Copyright (c) 2004-2005 vlad902 <vlad902 [at] gmail.com>
3
* Copyright (c) 2007 H D Moore <hdm [at] metasploit.com>
4
* This file is part of the Metasploit Framework.
5
* $Revision$
6
*/
7
8
#ifndef _CMD_H
9
#define _CMD_H
10
11
/* Base */
12
int process_input(char *, int);
13
void parse(char *, int *, char * []);
14
void chomp(char *);
15
16
void cmd_script(int, char * []);
17
18
/* XXX: Re-do help to specify a category and print the commands in that category? */
19
void cmd_help(int, char * []);
20
void cmd_fork(int, char * []);
21
void cmd_exec(int, char * []);
22
void cmd_system(int, char * []);
23
void cmd_quit(int, char * []);
24
25
/* File descriptor handling */
26
/* XXX: Take arg for perms (like lseek), O_EXCL?? */
27
void cmd_open(int, char * []);
28
void cmd_lseek(int, char * []);
29
void cmd_read(int, char * []);
30
void cmd_write(int, char * []);
31
void cmd_close(int, char * []);
32
void cmd_dup(int, char * []);
33
void cmd_dup2(int, char * []);
34
35
/* File system */
36
/* XXX: copy, mount/unmount, showmount */
37
void cmd_ls(int, char * []);
38
void cmd_getcwd(int, char * []);
39
void cmd_setcwd(int, char * []);
40
void cmd_chmod(int, char * []);
41
void cmd_chown(int, char * []);
42
void cmd_chgrp(int, char * []);
43
void cmd_chdir(int, char * []);
44
void cmd_mkdir(int, char * []);
45
void cmd_rmdir(int, char * []);
46
void cmd_rename(int, char * []);
47
void cmd_unlink(int, char * []);
48
void cmd_chroot(int, char * []);
49
void cmd_link(int, char * []);
50
void cmd_symlink(int, char * []);
51
void cmd_cp(int, char * []);
52
53
/* Privileges */
54
/* XXX: Print groups */
55
void cmd_getid(int, char * []);
56
void cmd_setuid(int, char * []);
57
void cmd_setgid(int, char * []);
58
59
/* Process */
60
/* XXX: ps */
61
void cmd_kill(int, char * []);
62
void cmd_getpid(int, char * []);
63
void cmd_getppid(int, char * []);
64
void cmd_ps(int, char * []);
65
66
/* Environment */
67
/* XXX: setenv, showenv */
68
69
/* System */
70
/* XXX: dmesg, getrlimit */
71
void cmd_time(int, char * []);
72
void cmd_uname(int, char * []);
73
void cmd_hostname(int, char * []);
74
void cmd_reboot(int, char * []);
75
void cmd_shutdown(int, char * []);
76
void cmd_halt(int, char * []);
77
78
/* Network */
79
void cmd_download(int, char * []);
80
81
/* Misc. */
82
void cmd_lsfd(int, char * []);
83
84
/* Exploit */
85
void cmd_fchdir_breakchroot(int, char * []);
86
87
88
89
#define __MIN_NUM(a, b) ((a) < (b) ? (a) : (b))
90
#define __MAX_NUM(a, b) ((a) > (b) ? (a) : (b))
91
92
char * get_uid_str(int);
93
char * get_gid_str(int);
94
char * get_time_str(char *);
95
96
void sig_chld_ignore(int);
97
void sig_chld_waitpid(int);
98
#endif /* _CMD_H */
99
100