Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var auto_refresh;
- var showDots;
- var showLoadingDots = function() {
- clearInterval(showDots);
- if (!$("#loadingDots").length>0) return false;
- showDots = setInterval(function(){
- var d = $("#loadingDots");
- d.text().length >= 3 ? d.text('') : d.append('.');
- },300);
- }
- function init() {
- refresh_history();
- $("#tabs ul").idTabs();
- $("#auto_refresh").toggle(function() {
- $("#auto_refresh").html('<font color="lime">On</font>');
- $('#auto_time').attr('disabled', 'disabled');
- auto_refresh = setInterval(
- function ()
- {
- refresh();
- },
- $("#auto_time").val());
- }, function() {
- $("#auto_refresh").html('<font color="red">Off</font>');
- $('#auto_time').removeAttr('disabled');
- clearInterval(auto_refresh);
- auto_refresh = null;
- });
- }
- function sslstrip_toggle(action) {
- if($('#verbose:checkbox:checked').val() == "verbose")
- $('#output').load('sslstrip_actions.php?sslstrip&verbose&'+action);
- else
- $('#output').load('sslstrip_actions.php?sslstrip&'+action);
- if(action == 'stop') {
- $("#sslstrip_link").html('<strong>Start</strong>');
- $("#sslstrip_status").html('<font color="red"><strong>disabled</strong></font>');
- $("#sslstrip_link").attr("href", "javascript:sslstrip_toggle('start');");
- $('#output').val('sslstrip has been stopped...');
- $('#verbose').removeAttr('disabled');
- refresh_history();
- }
- else {
- $("#sslstrip_link").html('<strong>Stop</strong>');
- $("#sslstrip_status").html('<font color="lime"><strong>enabled</strong></font>');
- $("#sslstrip_link").attr("href", "javascript:sslstrip_toggle('stop');");
- $('#output').val('sslstrip is running...');
- $('#verbose').attr('disabled', 'disabled');
- refresh_history();
- }
- }
- function refresh() {
- if(auto_refresh == null) {
- $("#refresh_text").html('<em>Loading<span id="loadingDots"></span></em>');
- showLoadingDots();
- }
- $.ajax({
- type: "GET",
- data: "lastlog",
- url: "sslstrip_data.php",
- success: function(msg){
- $("#output").val(msg);
- $("#refresh_text").html(''); clearInterval(showDots);
- }
- });
- }
- function refresh_history() {
- $("#refresh_text").html('<em>Loading<span id="loadingDots"></span></em>');
- showLoadingDots();
- $.ajax({
- type: "GET",
- data: "history",
- url: "sslstrip_data.php",
- success: function(msg){
- $("#content_history").html(msg);
- $("#refresh_text").html(''); clearInterval(showDots);
- }
- });
- }
- function showTab()
- {
- $("#Output").show();
- $("#History").hide();
- $("#History_link").removeClass("selected");
- $("#Output_link").addClass("selected");
- }
- function load_file(what) {
- $("#refresh_text").html('<em>Loading<span id="loadingDots"></span></em>');
- showLoadingDots();
- $.ajax({
- type: "GET",
- data: "load&file=" + what,
- url: "sslstrip_actions.php",
- success: function(msg){
- $("#output").val(msg);
- showTab();
- $("#refresh_text").html(''); clearInterval(showDots);
- }
- });
- }
- function delete_file(what, which) {
- $("#refresh_text").html('<em>Loading<span id="loadingDots"></span></em>');
- showLoadingDots();
- $.ajax({
- type: "GET",
- data: "delete&file=" + which + "&" + what,
- url: "sslstrip_actions.php",
- success: function(msg){
- $("#content_history").html(msg);
- $("#refresh_text").html(''); clearInterval(showDots);
- refresh_history();
- }
- });
- }
- function clean(what, which) {
- $("#refresh_text").html('<em>Loading<span id="loadingDots"></span></em>');
- showLoadingDots();
- $.ajax({
- type: "GET",
- data: "clean&file=" + which + "&" + what,
- url: "sslstrip_actions.php",
- success: function(msg){
- $("#content_history").html(msg);
- $("#refresh_text").html(''); clearInterval(showDots);
- refresh_history();
- }
- });
- }
- function usb_toggle(action) {
- $('#output').load('sslstrip_actions.php?usb&action='+action);
- if(action == 'enable'){
- $('#data_link').html('<strong>Uninstall from USB</strong>');
- $('#data_status').html('<font color="lime"><strong>on usb</strong></font>');
- $('#data_link').attr("href", "javascript:usb_toggle('disable');");
- }
- else{
- $('#data_link').html('<strong>Install on USB</strong>');
- $('#data_status').html('<font color="red"><strong>not on usb</strong></font>');
- $('#data_link').attr("href", "javascript:usb_toggle('enable');");
- }
- }
- function boot_toggle(action) {
- $('#output').load('sslstrip_actions.php?boot&action='+action);
- if(action == 'disable') {
- $("#boot_link").html('<strong>Enable</strong>');
- $("#boot_status").html('<font color="red"><strong>disabled</strong></font>');
- $("#boot_link").attr("href", "javascript:boot_toggle('enable');");
- }
- else {
- $("#boot_link").html('<strong>Disable</strong>');
- $("#boot_status").html('<font color="lime"><strong>enabled</strong></font>');
- $("#boot_link").attr("href", "javascript:boot_toggle('disable');");
- }
- }
- function install(where) {
- $("#refresh_text").html('<em>Installing<span id="loadingDots"></span></em>');
- showLoadingDots();
- $.ajax({
- type: "GET",
- data: "install&where=" + where,
- url: "sslstrip_actions.php",
- success: function(msg){
- $("#output").val(msg);
- $("#refresh_text").html(''); clearInterval(showDots);
- location.reload(true);
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement