summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAinola2017-12-06 23:41:11 -0700
committerAinola2017-12-06 23:41:11 -0700
commitf3905f04bbe3c1b823ba170e4c4186c51dd22771 (patch)
tree787efa28c800f3801c208312cf7c2258541a60ee
downloadaur-f3905f04bbe3c1b823ba170e4c4186c51dd22771.tar.gz
initial
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD31
-rw-r--r--check_token.patch41
3 files changed, 96 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..7ddb7ed78e4e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+# Generated by mksrcinfo v8
+# Thu Dec 7 06:39:09 UTC 2017
+pkgbase = python-vipaccess
+ pkgdesc = A free software implementation of Symantec's VIP Access application and protocol.
+ pkgver = 0.3.0
+ pkgrel = 1
+ url = https://github.com/cyrozap/python-vipaccess
+ arch = any
+ license = apache
+ makedepends = python-setuptools
+ depends = python
+ depends = python-crypto
+ depends = python-image
+ depends = python-lxml
+ depends = python-oath
+ depends = python-qrcode
+ depends = python-requests
+ source = https://github.com/cyrozap/python-vipaccess/archive/v0.3.0.tar.gz
+ source = check_token.patch
+ sha256sums = 6d1d9a8fe632e2de7213aad5d881d32dd367cac450cdc907e8d0f77589c9c23a
+ sha256sums = 02bcef0ee35f72da56ac89ce7cc447039d306a564a6551a3f66928066bac66a3
+
+pkgname = python-vipaccess
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..84449143a724
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: Ainola
+
+pkgname=python-vipaccess
+pkgver=0.3.0
+pkgrel=1
+pkgdesc="A free software implementation of Symantec's VIP Access application and protocol."
+arch=('any')
+url="https://github.com/cyrozap/python-vipaccess"
+license=('apache')
+makedepends=('python-setuptools')
+depends=('python' 'python-crypto' 'python-image' 'python-lxml'
+ 'python-oath' 'python-qrcode' 'python-requests')
+source=("https://github.com/cyrozap/python-vipaccess/archive/v$pkgver.tar.gz"
+ "check_token.patch")
+sha256sums=('6d1d9a8fe632e2de7213aad5d881d32dd367cac450cdc907e8d0f77589c9c23a'
+ '02bcef0ee35f72da56ac89ce7cc447039d306a564a6551a3f66928066bac66a3')
+
+prepare() {
+ # https://github.com/zecoj/python-vipaccess/commit/34b6ce697429892141ad511d5e8e4b95e40abb98
+ patch -d "python-vipaccess-$pkgver" -p1 < check_token.patch
+}
+
+build() {
+ cd "$srcdir/python-vipaccess-$pkgver"
+ python setup.py build
+}
+
+package() {
+ cd "$srcdir/python-vipaccess-$pkgver"
+ python setup.py install --root="$pkgdir/" --optimize=1
+}
diff --git a/check_token.patch b/check_token.patch
new file mode 100644
index 000000000000..afdbe0d92076
--- /dev/null
+++ b/check_token.patch
@@ -0,0 +1,41 @@
+From 34b6ce697429892141ad511d5e8e4b95e40abb98 Mon Sep 17 00:00:00 2001
+From: zecoj <zecoj@users.noreply.github.com>
+Date: Wed, 8 Mar 2017 11:24:10 +1100
+Subject: [PATCH] Update check_token to reflect url change
+
+---
+ vipaccess/utils.py | 18 ++++++++++++------
+ 1 file changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/vipaccess/utils.py b/vipaccess/utils.py
+index f91b615..4ced9c9 100644
+--- a/vipaccess/utils.py
++++ b/vipaccess/utils.py
+@@ -254,15 +254,21 @@ def generate_qr_code(uri):
+ def check_token(token_id, secret):
+ '''Check the validity of the generated token.'''
+ otp = totp(binascii.b2a_hex(secret).decode('utf-8'))
+- test_url = 'https://idprotect.vip.symantec.com/testtoken.v'
++ test_url = 'https://vip.symantec.com/otpCheck'
+ token_check = requests.post(
+ test_url,
+- data=dict(
+- tokenID=token_id,
+- firstOTP=otp
+- )
++ data={
++ 'cr1':otp[0],
++ 'cr2':otp[1],
++ 'cr3':otp[2],
++ 'cr4':otp[3],
++ 'cr5':otp[4],
++ 'cr6':otp[5],
++ 'cred':token_id,
++ 'continue':'otp_check'
++ }
+ )
+- if "Your credential is functioning properly and is ready for use" in token_check.text:
++ if "Your VIP Credential is working correctly" in token_check.text:
+ return True
+ else:
+ return False