###############################################################################
# This script was written by David Maciejak <david dot maciejak at kyxar dot fr>
# based on work from
# (C) Tenable Network Security
#
#
# uPDATED: 02/12/2009 Antu Sanadi <santu@secpod.com>
#
# Ref: GreyMagic Software
# This script is released under the GNU GPLv2
###############################################################################

if(description)
{
  script_id(14261);
  script_cve_id("CVE-2004-2570");
  script_bugtraq_id(10873);
  script_version("$Revision: 8096 $");
  script_tag(name:"cvss_base", value:"5.0");
  script_tag(name:"risk_factor", value:"Medium");
  script_name("Opera remote location object cross-domain scripting vulnerability");
  desc = "
  The remote host contains a web browser that is affected by
  multiple flaws.

  Description :
  The remote host is using Opera, an alternative web browser.
  This version of Opera on the remote host fails to block write access to
  the 'location' object.  This could allow a user to create a specially
  crafted URL to overwrite methods within the 'location' object that would
  execute arbitrary code in a user's browser within the trust relationship
  between the browser and the server, leading to a loss of confidentiality
  and integrity.

  See also :

  http://www.greymagic.com/security/advisories/gm008-op/
  http://www.opera.com/docs/changelogs/windows/754/

  Solution :
  Upgrade to Opera 7.54 or newer.

  Risk factor :

  Medium / CVSS Base Score : 5

  (AV:R/AC:L/Au:NR/C:P/A:N/I:P/B:N)";
  script_description(desc);
  script_summary("Determines the version of Opera.exe");
  script_category(ACT_GATHER_INFO);
  script_copyright("This script is Copyright (C) 2004 David Maciejak");
  script_family("Windows");
  script_dependencies("secpod_opera_detection_win_900036.nasl");
  script_require_keys("Opera/Win/Version");
  exit(0);
}


include("version_func.inc");

OperaVer = get_kb_item("Opera/Win/Version");
if(!OperaVer){
  exit(0);
}

if(version_is_less_equal(version:OperaVer, test_version:"7.53")){
  security_hole(0);
}
