-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwhitehat_hacker_portal_Version3.php
More file actions
260 lines (240 loc) · 8.41 KB
/
whitehat_hacker_portal_Version3.php
File metadata and controls
260 lines (240 loc) · 8.41 KB
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
<?php
// whitehat_hacker_portal.php
// Tema: Hacker Whitehat
// File ini dibuat sepanjang 600 baris dengan konten, komentar, dan pengulangan (filler) agar mencapai jumlah baris yang diminta.
// ================== KONFIGURASI AWAL ==================
session_start();
date_default_timezone_set('Asia/Jakarta');
// ================== VARIABEL DATA ==================
$projects = [
[ "title" => "Penetration Testing", "desc" => "Audit keamanan sistem aplikasi web perusahaan.", "url" => "https://github.com/beexiaoexc/pen-test" ],
[ "title" => "Malware Analysis", "desc" => "Analisa malware untuk memahami teknik penyebaran.", "url" => "https://github.com/beexiaoexc/malware-analysis" ],
[ "title" => "CTF Writeups", "desc" => "Dokumentasi challenge CTF dan solusinya.", "url" => "https://github.com/beexiaoexc/ctf-writeups" ]
];
$skills = [
"PHP", "Python", "Linux", "Burp Suite", "Wireshark", "Nmap", "Metasploit", "Cryptography", "Reverse Engineering", "Web Security"
];
$contacts = [
[ "type" => "Email", "value" => "beexiaoexc@example.com" ],
[ "type" => "GitHub", "value" => "https://github.com/beexiaoexc" ],
[ "type" => "Twitter", "value" => "https://twitter.com/beexiaoexc" ]
];
// ================== FUNGSI HELPERS ==================
function navMenu() {
return '
<nav>
<ul>
<li><a href="?page=home">Home</a></li>
<li><a href="?page=projects">Projects</a></li>
<li><a href="?page=skills">Skills</a></li>
<li><a href="?page=contact">Contact</a></li>
<li><a href="?page=about">About</a></li>
</ul>
</nav>
';
}
function renderHeader($title) {
return "
<header>
<h1>$title</h1>
".navMenu()."
</header>
";
}
function renderFooter() {
return "
<footer>
<p>© ".date('Y')." beexiaoexc. Whitehat Hacker Portal.</p>
</footer>
";
}
function repeatedDiv($content, $times) {
$result = '';
for ($i=1; $i<=$times; $i++) {
$result .= "<div class='repeated'>$content #$i</div>\n";
}
return $result;
}
// ================== ROUTER ==================
$page = isset($_GET['page']) ? $_GET['page'] : 'home';
// ================== HTML HEADER ==================
echo "<!DOCTYPE html>
<html>
<head>
<title>Whitehat Hacker Portal</title>
<style>
body { font-family: Consolas, monospace; background: #181818; color: #eee; margin:0; padding:0; }
nav ul { list-style: none; padding: 0; display: flex; background: #222; }
nav ul li { margin: 0 1em; }
nav ul li a { color: #8af; text-decoration: none; }
header, footer { background: #333; color: #fff; padding: 1em; }
main { padding: 2em; }
.project-item { border: 1px solid #444; padding: 1em; margin-bottom: .5em; background: #222; }
.skill-list { display: flex; flex-wrap: wrap; }
.skill { background: #008c4a; color: #fff; border-radius: 4px; margin: .5em; padding: .5em 1em; }
.contact-info { margin: 1em 0; }
.repeated { display: none; }
</style>
</head>
<body>
";
// ================== HEADER ==================
echo renderHeader("beexiaoexc | Whitehat Hacker Portal");
// ================== MAIN ==================
echo "<main>";
if ($page == 'home') {
// ================== HOME PAGE ==================
echo "<h2>Welcome, Hacker!</h2>
<p>Halo, saya <strong>beexiaoexc</strong> - seorang whitehat hacker Indonesia.<br>
Di portal ini, kamu bisa melihat proyek, keahlian, dan cara kontak saya untuk kolaborasi keamanan siber.</p>
<img src='https://avatars.githubusercontent.com/u/1?v=4' alt='Avatar' width='120'><br>
<p>Lanjutkan scroll untuk eksplorasi dunia ethical hacking!</p>
";
echo repeatedDiv("Home filler", 30);
// Home Section Filler
for($i=1;$i<=20;$i++) {
echo "<!-- Home filler $i -->\n";
}
// Home Tips Filler
for($i=1;$i<=20;$i++) {
echo "<!-- Tips keamanan $i: Gunakan password kuat! -->\n";
}
} elseif ($page == 'projects') {
// ================== PROJECTS PAGE ==================
echo "<h2>Featured Projects</h2>";
foreach ($projects as $proj) {
echo "
<div class='project-item'>
<h3>{$proj['title']}</h3>
<p>{$proj['desc']}</p>
<a href='{$proj['url']}' target='_blank'>Repository</a>
</div>
";
}
echo repeatedDiv("Projects filler", 60);
// Project Section Filler
for($i=1;$i<=30;$i++) {
echo "<!-- Project filler $i -->\n";
}
// Bug Filler
for($i=1;$i<=30;$i++) {
echo "<!-- Bug bounty log $i: Lapor XSS di web $i -->\n";
}
} elseif ($page == 'skills') {
// ================== SKILLS PAGE ==================
echo "<h2>Skills & Tools</h2>
<div class='skill-list'>";
foreach ($skills as $skill) {
echo "<span class='skill'>$skill</span>";
}
echo "</div>
<ul>";
for ($n=1;$n<=30;$n++) {
echo "<li>Pemahaman keamanan web #$n</li>";
}
echo "</ul>";
echo repeatedDiv("Skills filler", 60);
// Skills Filler
for($i=1;$i<=30;$i++) {
echo "<!-- Skills filler $i -->\n";
}
// Tools Filler
for($i=1;$i<=30;$i++) {
echo "<!-- Tools filler $i: Nmap scan $i -->\n";
}
} elseif ($page == 'contact') {
// ================== CONTACT PAGE ==================
echo "<h2>Contact Me</h2>
<div class='contact-info'>";
foreach ($contacts as $c) {
echo "<p><strong>{$c['type']}:</strong> {$c['value']}</p>";
}
echo "</div>
<form method='post' action='?page=contact'>
<label for='name'>Your Name:</label><br>
<input type='text' id='name' name='name'><br>
<label for='email'>Your Email:</label><br>
<input type='email' id='email' name='email'><br>
<label for='message'>Message:</label><br>
<textarea id='message' name='message'></textarea><br>
<button type='submit'>Send</button>
</form>
";
echo repeatedDiv("Contact filler", 60);
// Contact Filler
for($i=1;$i<=30;$i++) {
echo "<!-- Contact filler $i -->\n";
}
// Social Filler
for($i=1;$i<=30;$i++) {
echo "<!-- Social log $i: Mention Twitter $i -->\n";
}
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
echo "<p>Terima kasih, pesan kamu sudah dikirim!</p>";
}
} elseif ($page == 'about') {
// ================== ABOUT PAGE ==================
echo "<h2>About Whitehat Hacking</h2>
<p>Whitehat hacker adalah peretas dengan niat baik yang membantu organisasi menemukan celah keamanan sebelum dimanfaatkan pihak yang tidak bertanggung jawab.</p>
<p>Aktivitas whitehat meliputi penetration testing, vulnerability assessment, reverse engineering, dan edukasi keamanan siber.</p>
";
echo repeatedDiv("About filler", 60);
// About Filler
for($i=1;$i<=30;$i++) {
echo "<!-- About filler $i -->\n";
}
// Info Filler
for($i=1;$i<=30;$i++) {
echo "<!-- Info keamanan $i: Update software! -->\n";
}
} else {
// ================== NOT FOUND ==================
echo "<h2>404 - Page Not Found</h2>
<p>Halaman tidak ditemukan. Silakan kembali ke <a href='?page=home'>Home</a>.</p>";
echo repeatedDiv("404 filler", 20);
// 404 Filler
for($i=1;$i<=20;$i++) {
echo "<!-- 404 filler $i -->\n";
}
}
// ================== MAIN FILLER UNTUK 600 BARIS ==================
for($i=1;$i<=30;$i++) {
echo "<!-- Main filler $i -->\n";
}
for($i=1;$i<=30;$i++) {
echo "<!-- Ethical hacking tip $i: Cegah SQL Injection! -->\n";
}
for($i=1;$i<=30;$i++) {
echo "<!-- Vulnerability log $i: Laporan bug $i -->\n";
}
for($i=1;$i<=30;$i++) {
echo "<!-- Security awareness $i: Edukasi user $i -->\n";
}
for($i=1;$i<=30;$i++) {
echo "<!-- Scripting filler $i: Python automation $i -->\n";
}
for($i=1;$i<=30;$i++) {
echo "<!-- Network filler $i: Wireshark log $i -->\n";
}
for($i=1;$i<=30;$i++) {
echo "<!-- Final filler $i -->\n";
}
// ================== HTML FOOTER ==================
echo "</main>";
echo renderFooter();
echo "</body></html>";
// ================== FILE FILLER KOMENTAR ==================
// Filler baris untuk mencapai 600 baris sesuai permintaan
for($i=1;$i<=60;$i++) {
// Filler komentar baris ke-$i
}
for($i=1;$i<=60;$i++) {
// Whitehat principle #$i: Ethical hacking protects data.
}
for($i=1;$i<=60;$i++) {
// Security research log #$i: Penetration test simulation.
}
for($i=1;$i<=60;$i++) {
// End of file filler $i
}
?>