⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 security-client.py,v

📁 Perfession Linux Programming examples
💻 PY,V
字号:
head	1.1;
access;
symbols;
locks
	cbbrowne:1.1; strict;
comment	@# @;


1.1
date	2000.07.27.04.51.35;	author cbbrowne;	state Exp;
branches;
next	;


desc
@@


1.1
log
@Initial revision
@
text
@#!/usr/bin/env python
import CORBA
import sys
import time
from time import sleep

CORBA.load_idl("security.idl")
orb = CORBA.ORB_init((), CORBA.ORB_ID)
ior = open("./security-server.ior").readline()
s = orb.string_to_object(ior)
print s.__repo_id

try:
	token=s.login("chris", "browne")
	print "Authenticated chris getting token", token
except: 
	print "exc_type", sys.exc_type
	print "Couldn't get token for chris"
try:
	token=s.login("chris", "blah")
	print "Authenticated chris getting token", token
except: 
	#except s.NOTAUTHENTICATED:
	print "exc_type", sys.exc_type
	print "Couldn't get token for chris"
try:
	token=s.login("david", "blah")
	print "Authenticated david getting token", token
except:
	#except s.NOTAUTHENTICATED:
	print "Couldn't get token for david"
try:
	token=s.login("david", "browne")
	print "Authenticated david getting token", token
except:
	#except s.NOTAUTHENTICATED:
	print "exc_type", sys.exc_type
	print "Couldn't get token for chris"
	print "Couldn't get token for david"
@

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -