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/lib/rex/post/io.rb
Views: 11779
1
# -*- coding: binary -*-
2
3
module Rex
4
module Post
5
6
##
7
#
8
# Base IO class that is modeled after the ruby IO class.
9
#
10
##
11
class IO
12
protected
13
attr_accessor :filed, :mode
14
public
15
16
##
17
#
18
# Conditionals
19
#
20
##
21
22
def eof?
23
return eof
24
end
25
26
def closed?
27
raise NotImplementedError
28
end
29
30
def tty?
31
return isatty
32
end
33
34
##
35
#
36
# I/O operations
37
#
38
##
39
40
def binmode
41
raise NotImplementedError
42
end
43
44
def close
45
raise NotImplementedError
46
end
47
48
def close_read
49
raise NotImplementedError
50
end
51
52
def close_write
53
raise NotImplementedError
54
end
55
56
def each(sep = $/, &block)
57
raise NotImplementedError
58
end
59
60
def each_line(sep = $/, &block)
61
raise NotImplementedError
62
end
63
64
def each_byte(&block)
65
raise NotImplementedError
66
end
67
68
def eof
69
raise NotImplementedError
70
end
71
72
def fcntl(cmd, arg)
73
raise NotImplementedError
74
end
75
76
def flush
77
raise NotImplementedError
78
end
79
80
def fsync
81
raise NotImplementedError
82
end
83
84
def getc
85
raise NotImplementedError
86
end
87
88
def gets(sep = $/)
89
raise NotImplementedError
90
end
91
92
def ioctl(cmd, arg)
93
raise NotImplementedError
94
end
95
96
def isatty
97
raise NotImplementedError
98
end
99
100
def lineno
101
raise NotImplementedError
102
end
103
104
def pos
105
raise NotImplementedError
106
end
107
108
def print
109
raise NotImplementedError
110
end
111
112
def printf(fmt, *args)
113
raise NotImplementedError
114
end
115
116
def putc(obj)
117
raise NotImplementedError
118
end
119
120
def puts(obj)
121
raise NotImplementedError
122
end
123
124
def read(length = nil, buffer = nil)
125
raise NotImplementedError
126
end
127
128
def readchar
129
raise NotImplementedError
130
end
131
132
def readline(sep = $/)
133
raise NotImplementedError
134
end
135
136
def readlines(sep = $/)
137
raise NotImplementedError
138
end
139
140
def rewind
141
raise NotImplementedError
142
end
143
144
def seek(offset, whence = SEEK_SET)
145
raise NotImplementedError
146
end
147
148
def stat
149
raise NotImplementedError
150
end
151
152
def sync
153
raise NotImplementedError
154
end
155
156
def sysread(length)
157
raise NotImplementedError
158
end
159
160
def sysseek(offset, whence = SEEK_SET)
161
raise NotImplementedError
162
end
163
164
def syswrite(buf)
165
raise NotImplementedError
166
end
167
168
def tell
169
return pos
170
end
171
172
def ungetc(val)
173
raise NotImplementedError
174
end
175
176
def write(buf)
177
raise NotImplementedError
178
end
179
180
end
181
182
end; end # Post/Rex
183
184