
Before you start, take a minute to read over the source code and get familiar with the app’s functionality.
This app allows you to upload a .csv file and get back a gnuplot chart.
For example, I can create a file like this:
test.csv
1,2
3,4
5,6

Once I upload this test.csv file, I get back a .png I can download.
- The output filename can be specified.
- The type of chart (lines, points, lines and points can be selected.

There are a few red herrings here, but the user-controlled content that is completely unprotected is points

Note:
- Please take some time to look at how
in_filename,out_filename, and the CSV upload are all protected and sanitized.
- However,
points = request.form.get('points') is accepted without any protection or checks, and we can modify the value.
Once we hit ‘generate_graph’ the following function is called:

For example, if we have:
- input_file: test.csv
- output_file: myfile.png