亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? javapolicysecurity.java

?? 主要的怎么樣結合java 和 javascript!
?? JAVA
字號:
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * The contents of this file are subject to the Netscape Public * License Version 1.1 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.mozilla.org/NPL/ * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr * implied. See the License for the specific language governing * rights and limitations under the License. * * The Original Code is Rhino code, released * May 6, 1999. * * The Initial Developer of the Original Code is Netscape * Communications Corporation.  Portions created by Netscape are * Copyright (C) 1997-1999 Netscape Communications Corporation. All * Rights Reserved. * * Contributor(s): * Igor Bukanov * * Alternatively, the contents of this file may be used under the * terms of the GNU Public License (the "GPL"), in which case the * provisions of the GPL are applicable instead of those above. * If you wish to allow use of your version of this file only * under the terms of the GPL and not to allow others to use your * version of this file under the NPL, indicate your decision by * deleting the provisions above and replace them with the notice * and other provisions required by the GPL.  If you do not delete * the provisions above, a recipient may use your version of this * file under either the NPL or the GPL. */package org.mozilla.javascript.tools.shell;import java.security.*;import java.net.MalformedURLException;import java.net.URL;import java.util.Enumeration;import org.mozilla.javascript.*;public class JavaPolicySecurity extends SecurityProxy{    private static class Loader extends ClassLoader        implements GeneratedClassLoader    {        private ProtectionDomain domain;        Loader(ClassLoader parent, ProtectionDomain domain) {            super(parent != null ? parent : getSystemClassLoader());            this.domain = domain;        }        public Class defineClass(String name, byte[] data) {            return super.defineClass(name, data, 0, data.length, domain);        }        public void linkClass(Class cl) {            resolveClass(cl);        }    }    private static class ContextPermissions extends PermissionCollection    {        static final long serialVersionUID = -1721494496320750721L;// Construct PermissionCollection that permits an action only// if it is permitted by staticDomain and by security context of Java stack on// the moment of constructor invocation        ContextPermissions(ProtectionDomain staticDomain) {            _context = AccessController.getContext();            if (staticDomain != null) {                _statisPermissions = staticDomain.getPermissions();            }            setReadOnly();        }        public void add(Permission permission) {            throw new RuntimeException("NOT IMPLEMENTED");        }        public boolean implies(Permission permission) {            if (_statisPermissions != null) {                if (!_statisPermissions.implies(permission)) {                    return false;                }            }            try {                _context.checkPermission(permission);                return true;            }catch (AccessControlException ex) {                return false;            }        }        public Enumeration elements()        {            return new Enumeration() {                public boolean hasMoreElements() { return false; }                public Object nextElement() { return null; }            };        }        public String toString() {            StringBuffer sb = new StringBuffer();            sb.append(getClass().getName());            sb.append('@');            sb.append(Integer.toHexString(System.identityHashCode(this)));            sb.append(" (context=");            sb.append(_context);            sb.append(", static_permitions=");            sb.append(_statisPermissions);            sb.append(')');            return sb.toString();        }        AccessControlContext _context;        PermissionCollection _statisPermissions;    }    public JavaPolicySecurity()    {        // To trigger error on jdk-1.1 with lazy load        new CodeSource(null,  (java.security.cert.Certificate[])null);    }    protected void callProcessFileSecure(final Context cx,                                         final Scriptable scope,                                         final String filename)    {        AccessController.doPrivileged(new PrivilegedAction() {            public Object run() {                URL url = getUrlObj(filename);                ProtectionDomain staticDomain = getUrlDomain(url);                Main.processFileSecure(cx, scope, url.toExternalForm(),                                       staticDomain);                return null;            }        });    }    private URL getUrlObj(String url)    {        URL urlObj;        try {            urlObj = new URL(url);        } catch (MalformedURLException ex) {            // Assume as Main.processFileSecure it is file, need to build its            // URL            String curDir = System.getProperty("user.dir");            curDir = curDir.replace('\\', '/');            if (!curDir.endsWith("/")) {                curDir = curDir+'/';            }            try {                URL curDirURL = new URL("file:"+curDir);                urlObj = new URL(curDirURL, url);            } catch (MalformedURLException ex2) {                throw new RuntimeException                    ("Can not construct file URL for '"+url+"':"                     +ex2.getMessage());            }        }        return urlObj;    }    private ProtectionDomain getUrlDomain(URL url)    {        CodeSource cs;        cs = new CodeSource(url, (java.security.cert.Certificate[])null);        PermissionCollection pc = Policy.getPolicy().getPermissions(cs);        return new ProtectionDomain(cs, pc);    }    public GeneratedClassLoader    createClassLoader(ClassLoader parentLoader, Object securityDomain)    {        ProtectionDomain domain = (ProtectionDomain)securityDomain;        return new Loader(parentLoader, domain);    }    public Object getDynamicSecurityDomain(Object securityDomain)    {        ProtectionDomain staticDomain = (ProtectionDomain)securityDomain;        return getDynamicDomain(staticDomain);    }    private ProtectionDomain getDynamicDomain(ProtectionDomain staticDomain) {        ContextPermissions p = new ContextPermissions(staticDomain);        ProtectionDomain contextDomain = new ProtectionDomain(null, p);        return contextDomain;    }    public Object callWithDomain(Object securityDomain,                                 final Context cx,                                 final Callable callable,                                 final Scriptable scope,                                 final Scriptable thisObj,                                 final Object[] args)    {        ProtectionDomain staticDomain = (ProtectionDomain)securityDomain;        // There is no direct way in Java to intersect permitions according        // stack context with additional domain.        // The following implementation first constructs ProtectionDomain        // that allows actions only allowed by both staticDomain and current        // stack context, and then constructs AccessController for this dynamic        // domain.        // If this is too slow, alternative solution would be to generate        // class per domain with a proxy method to call to infect        // java stack.        // Another optimization in case of scripts coming from "world" domain,        // that is having minimal default privileges is to construct        // one AccessControlContext based on ProtectionDomain        // with least possible privileges and simply call        // AccessController.doPrivileged with this untrusted context        ProtectionDomain dynamicDomain = getDynamicDomain(staticDomain);        ProtectionDomain[] tmp = { dynamicDomain };        AccessControlContext restricted = new AccessControlContext(tmp);        PrivilegedAction action = new PrivilegedAction() {            public Object run() {                return callable.call(cx, scope, thisObj, args);            }        };        return AccessController.doPrivileged(action, restricted);    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区三区四区不卡| 在线不卡免费欧美| 蜜臀精品一区二区三区在线观看 | 97久久超碰国产精品电影| 国内精品免费在线观看| 狠狠久久亚洲欧美| 国模一区二区三区白浆| 日本sm残虐另类| 亚洲一区二区三区小说| 1000精品久久久久久久久| 国产精品麻豆欧美日韩ww| 国产精品卡一卡二卡三| 亚洲欧美日韩国产手机在线 | 欧美激情一区在线观看| 久久久久综合网| 国产偷国产偷精品高清尤物| 国产精品色呦呦| 自拍偷拍亚洲综合| 亚洲成人精品影院| 国内精品自线一区二区三区视频| 国产精品1区2区3区| 99久久免费精品| 欧美日韩一区久久| 日韩三级电影网址| 欧美国产日韩一二三区| 亚洲美女电影在线| 强制捆绑调教一区二区| 成人性生交大片免费看中文 | 欧美日韩国产小视频在线观看| 欧美日韩国产成人在线免费| 欧美sm极限捆绑bd| 国产精品传媒入口麻豆| 日韩影院精彩在线| 粉嫩一区二区三区在线看| 欧美少妇xxx| 日本一区二区免费在线观看视频 | 国产精品全国免费观看高清| 一区二区理论电影在线观看| 人人超碰91尤物精品国产| 国产成人av一区二区| 欧美日韩国产美女| 国产精品婷婷午夜在线观看| 日韩精品乱码免费| 91亚洲精品乱码久久久久久蜜桃| 91麻豆精品国产自产在线| 国产精品三级av在线播放| 天使萌一区二区三区免费观看| 国产精品99久久久久| 欧美一区二区三区日韩| 亚洲视频在线一区| 国产精品系列在线观看| 欧美日韩五月天| 亚洲视频免费看| 国产成人久久精品77777最新版本| 欧美亚洲综合在线| 国产精品久久久久久久久免费桃花 | 2020国产精品| 亚洲高清视频中文字幕| 91免费版在线| 国产精品久久综合| 成人免费观看视频| 精品久久国产97色综合| 日韩激情一区二区| 欧美色视频在线| 亚洲精品国产精品乱码不99| 成人一区二区三区视频在线观看 | 日本乱码高清不卡字幕| 国产精品网友自拍| 成人综合在线观看| 欧美激情一区二区在线| 国产69精品久久久久毛片| 久久一留热品黄| 国产一区二区免费在线| 欧美变态tickling挠脚心| 日韩高清一区在线| 欧美一区二区在线观看| 日韩成人午夜精品| 69堂成人精品免费视频| 蜜臀av一区二区三区| 欧美精品免费视频| 日本aⅴ亚洲精品中文乱码| 日韩一卡二卡三卡四卡| 男女男精品网站| 久久综合色之久久综合| 国产suv一区二区三区88区| 国产精品欧美极品| 91久久精品一区二区二区| 亚洲精品日产精品乱码不卡| 欧美色视频一区| 精品无人区卡一卡二卡三乱码免费卡| 精品国产免费人成在线观看| 国产在线播放一区二区三区| 中文字幕av一区二区三区| 99综合电影在线视频| 亚洲永久精品国产| 日韩精品中文字幕在线不卡尤物 | 国产精品对白交换视频| 99视频在线观看一区三区| 亚洲一区二区三区在线看| 91精品啪在线观看国产60岁| 国产一区二区三区国产| 亚洲视频你懂的| 欧美一区二区观看视频| 高清在线不卡av| 亚洲黄一区二区三区| 欧美一级欧美三级| 成人avav影音| 青青草国产成人av片免费| 国产精品免费看片| 欧美精品少妇一区二区三区| 国产精品一区专区| 亚洲国产婷婷综合在线精品| 亚洲精品一区二区在线观看| 91欧美激情一区二区三区成人| 日韩av网站免费在线| 国产精品美女www爽爽爽| 欧美人与禽zozo性伦| 国产精品香蕉一区二区三区| 香蕉成人伊视频在线观看| 日韩精品一区二区三区在线| www.亚洲精品| 久久99蜜桃精品| 亚洲一区二区在线免费看| 国产精品丝袜在线| 日韩一二三区不卡| 欧美综合久久久| 激情欧美日韩一区二区| 亚洲成a人片在线不卡一二三区| 国产午夜亚洲精品午夜鲁丝片| 色综合色综合色综合色综合色综合| 久久国产精品99精品国产| 一区二区三区久久久| 国产精品美女www爽爽爽| 精品国产一区二区精华 | 蜜桃视频在线一区| 亚洲一区二区三区四区在线观看| 国产精品久久夜| 日本一区二区三区高清不卡| 日韩你懂的在线观看| 在线播放中文一区| 欧美日本一区二区三区四区| 91碰在线视频| 99精品欧美一区二区三区小说| 国产高清精品网站| 国产乱码精品一区二区三区av| 日日夜夜精品视频免费| 亚洲福中文字幕伊人影院| 亚洲成av人片在线观看无码| 亚洲一区电影777| 亚洲一区二区三区四区中文字幕| 1024成人网| 亚洲综合一区二区精品导航| 一区二区三区精密机械公司| 一区二区在线观看免费| 亚洲另类中文字| 亚洲老妇xxxxxx| 亚洲综合免费观看高清完整版 | 欧美精品三级在线观看| 欧美老人xxxx18| 91精品久久久久久久99蜜桃| 制服视频三区第一页精品| 欧美午夜视频网站| 欧美一区二视频| 久久亚洲私人国产精品va媚药| 亚洲精品一线二线三线| 中文字幕国产一区| 亚洲精品成人悠悠色影视| 亚洲最大成人网4388xx| 日韩不卡一区二区| 看电视剧不卡顿的网站| 国产精品一区免费在线观看| 成人小视频在线| 91福利精品视频| 欧美一区二区三区四区久久| 久久精品一二三| 亚洲靠逼com| 老司机一区二区| 99在线视频精品| 91精品国产欧美一区二区成人| 精品国产免费人成在线观看| 国产精品看片你懂得| 亚洲午夜激情av| 国产最新精品精品你懂的| 成+人+亚洲+综合天堂| 欧美性一级生活| 久久久久久日产精品| 日韩码欧中文字| 美腿丝袜亚洲三区| 91女人视频在线观看| 日韩精品一区二区三区视频在线观看| 国产精品妹子av| 日本不卡一二三| 91在线小视频| 久久婷婷一区二区三区| 亚洲一区中文日韩| 国产一区不卡精品| 欧美性三三影院| 国产精品久线在线观看| 亚洲天堂免费看| 国产精品1区2区|