Benign python Download

pcarg 0.0.1

Simple HTML template tool

“两个将文字变成网页以及将网页p标签内容转换为文字的工具”

Python file opened for write or appendPython input prompt with literal text

Evidence

Python file opened for write or append passage_copy.py · lines 1–18
1import sys
2
3def passage_copy():
4 print('使用之前记得测试一下还能不能顺利使用。标题格式:标题名——别名')
5 title = input('请输入标题:')
6 title, title_another = title.split('——')
7 print('请粘贴文本:')
8 lines = sys.stdin.readlines()
9 lines = [f'<p>{line}</p>' for line in lines if line != '\n']
10 content = '\n'.join(lines).replace('\n</p>', '</p>')
11
12 with open('template.html', 'r') as f:
13 template = f.read()
14
15 final = template.replace('{{ title }}', title).replace('{{ content }}', content).replace('{{ title_another }}', title_another)
16
17 with open(f'{title}.html', 'w', encoding='utf-8') as f:
18 f.write(final)
Python file opened for write or append readable_get.py · lines 1–9
1import sys
2
3def readable_get():
4 t = input('请输入题目:')
5 sys.stdout.write('请放入p标签:\n')
6 s = sys.stdin.read()
7
8 with open(f'{t}.txt', 'w', encoding='utf-8') as f:
9 f.write(s.replace('</p>\n<p>', '\n\n').replace('<p>', '').replace('</p>', ''))

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.