-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxfipchk.html
More file actions
71 lines (68 loc) · 2.94 KB
/
Copy pathxfipchk.html
File metadata and controls
71 lines (68 loc) · 2.94 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>X-Force IP Check</title>
<script src="https://code.jquery.com/jquery-3.2.1.js"></script>
<script>window.jQuery || document.write("<script src='js/jquery-3.2.1.js'><\/script>")</script>
<script>
function check_ips()
{
/* debugging parms */
$.ajax({
url: '/process_form',
method: 'POST',
/* contentType: 'application/x-www-form-urlencoded; charset=UTF-8', */
data: {
"api_key": $('#api_key').val(),
"api_password": $('#api_password').val(),
"ip_addresses": $('#ip_addresses').val()
},
dataType: 'json',
success: function( data, textStatus, jqXHR)
{
$("#ip_addresses").hide()
$("#results").css("color", "#000000");
$("#results").css("background-color", "#FFFFFF");
$("#results").text(JSON.stringify(data[0]));
}
})
}
</script>
<link rel="stylesheet" type="text/css" href="xfipchk.css"/>
</head>
<body>
<div id="column">
<form id="the_form" method="post">
<div>
<p><span class="instructions">Instructions:</span></p>
<ol>
<li>Paste your IBM X-Force API key and password into the corresponding fields.</li>
<li>Enter IP addresses in the box labeled accordingly, each IP address on its own line.</li>
<li>Press the Submit button to call the API.</li>
<li>Review the results.</li>
<li>Press the Stop Demo button to stop the demo.</li>
</ol>
</p>
<label for="api_key">X-Force API Key</label>
<input type="text" autofocus required class="api_cred" name="api_key" id="api_key" title="api_key"
placeholder="01234567-9abc-def0-1234-56789abcdef0" pattern="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" max="36"/>
<br/>
<label for="api_password">X-Force API Password</label>
<input type="text" class="api_cred" required name="api_password" id="api_password" title="api_password"
placeholder="01234567-9abc-def0-1234-56789abcdef0" pattern="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" maxlength="36"/>
</div>
<div id="textarea">
<label for="ip_addresses">IP Addresses</label>
<textarea class="ip_addresses" name="ip_addresses" id="ip_addresses"></textarea>
</div>
<div id="std_buttons">
<input id="submit" form="the_form" type="button" value="Submit" onclick="check_ips()"/> <button id="reset" type="reset" form="the_form" value="reset">Reset</button>
</div>
</form>
</div>
<div>
<p id="results"></p>
</div>
</body>
</html>