-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathresultpy.php
92 lines (90 loc) · 1.89 KB
/
resultpy.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<div class="p-5 text-center bg-light">
<h1><?php
if(isset($_POST['name']))
{
echo '' . htmlspecialchars($_POST["name"]) . '';
} else {
echo 'My Command Prompt';
}
?> is generated</h1>
<p>Follow the instructions below on how to get the terminal.</p>
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#gcmd-generator">
Create Another Terminal </button>
</div>
<style>
.rounded {
border: 2px solid black;
padding: 10px;
margin: 10px;
border-radius: 2px;
}
</style>
<fieldset>
<p> <i class="fa-solid fa-file"></i> Create a file called <?php
if(isset($_POST['name']))
{
echo '' . htmlspecialchars($_POST["name"]) . '';
} else {
echo 'My Command Prompt';
}
?>.py (MAKE SURE FILE EXTENSIONS ARE ENABLED.)
<br> Step 2. Open your text editor or Notepad and Copy the code below <br>
<p class="rounded">
<code>
import os
<br>
while True:
<br>
programdetails = "<?php
if(isset($_POST['name']))
{
echo '' . htmlspecialchars($_POST["name"]) . '';
} else {
echo 'My Command Prompt';
}
?> <?php
if(isset($_POST['version']))
{
echo '' . htmlspecialchars($_POST["version"]) . '';
} else {
echo 'v1.0.0';
}
?><?php
if ($_POST['branding'] == "simple") {
echo " - Powered by $gcmdname";
} elseif ($_POST['branding'] == "none") {
} else {
echo "<br>SET var=%cd%^^^>";
}
?>"
<br>
print(programdetails)
<br>
<?php
if ($_POST['pathtype'] == "path") {
echo " cmdgetdir = os.path.dirname(__file__)";
} elseif ($_POST['pathtype'] == "dollarsign") {
echo " cmdgetdir = '$'";
} else {
echo " cmdgetdir = os.path.dirname(__file__)";
}
?>
<br>
zerocmd = input(cmdgetdir)
<br>
os.system('cmd /c "' + zerocmd + '"')
</code>
</p>
<br>
Step 3. Run file called <?php
if(isset($_POST['name']))
{
echo '' . htmlspecialchars($_POST["name"]) . '';
} else {
echo 'My Command Prompt';
}
?>.py.
<br>
Step 4. And you're done! You have built a real command prompt without coding!
</p>
</fieldset>