Files
Pentesting/help/python/picweb.py
T
2026-04-17 09:01:34 -05:00

39 lines
611 B
Python
Executable File

from os import walk
filenames = next(walk('/home/hydrax/img'), (None, None, []))[2]
#_, _, filenames = next(walk('img'))
html = """
<html>
<head>
<title></title>
<style>
img {
width: 200px;
height: 150px;
object-fit: contain;
padding: 2px;
}
body {
background-color: black;
}
</style>
</head>
<body>
"""
for f in filenames:
html += '<img src="img/' + f + '">'
html += """
</body>
</html>
"""
print(html)
# Write HTML String to file.html
with open("index.html", "w") as file:
file.write(html)