-
Notifications
You must be signed in to change notification settings - Fork 1
/
cracker.html
95 lines (88 loc) · 2.65 KB
/
cracker.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
<!DOCTYPE html>
<html>
<style>
*{
color:rgb(243, 243, 228); background-color: black; font-family: monospace; border-radius: 5px;
}
button{
transition:ease-out 0.3s;
padding: 5px 15px;
border: none;
color: #ca89ff;
border-radius: 5px;
position: relative;
outline: none;
border: 3px solid #9615ff;
z-index: 3;
background-color: transparent;
}
button:hover{
cursor: pointer;
color: #fff;
}
button:before{
transition: 0.5s all ease;
position: absolute;
top: 0;
left: 50%;
right: 50%;
bottom: 0;
opacity: 0;
content: "";
background-color: #9615ff;
}
button:hover:before{
transition: 0.5s all ease;
left: 0;
right: 0;
opacity: 1;
z-index: -1;
}
</style>
<head>
<base target="_top">
<script>
function pass(ingoing) {
console.log(ingoing);
return ingoing;
}
function parseSource(source) {
const info_map = JSON.parse(source.match(/_docs_flag_initialData=(?<data>{.*?});<\/script>/).groups.data);
const token = info_map.info_params.token;
let my_query_params = new URLSearchParams();
if (info_map["docs-crq"]){
let url_search_params = new URLSearchParams(info_map["docs-crq"]);
if (url_search_params.get("hr_submission")){
my_query_params.append("hr_submission", url_search_params.get("hr_submission"));
}
}
const url = "https://docs.google.com" + info_map["docs-crp"] + (my_query_params.toString() ? "?" + my_query_params.toString(): "");
return {token: token, url: url};
}
window.addEventListener("load", () => {
document.querySelector("#yourthing").addEventListener("click", () => {
try {
const source_info = parseSource(document.querySelector("#form_source").value);
document.querySelector("#token").value = source_info.token;
document.querySelector("#greatest_form").setAttribute("action", source_info.url);
document.querySelector("#sub").click();
} catch(e) {
document.querySelector("#stats").textContent = e.toString();
}
});
});
</script>
</head>
<body>
<h3>Paste your form source here:</h3>
<textarea id="form_source" style="height:500px; width:1330px;"></textarea>
<button id="yourthing" >Do your thing!</button>
<br>
<p id="stats"></p>
<form target="_blank" method="POST" id="greatest_form">
<input type="hidden" name="token" id="token" >
<input type="hidden" name="tz_offset" value="120">
<input type="submit" style="display: none;" value="Submit" id="sub">
</form>
</body>
</html>