https://www.wiki.unallocatedspace.org/wiki/index.php?title=Member_Check-In_System&feed=atom&action=history
Member Check-In System - Revision history
2024-03-29T08:20:13Z
Revision history for this page on the wiki
MediaWiki 1.41.0
https://www.wiki.unallocatedspace.org/wiki/index.php?title=Member_Check-In_System&diff=1165&oldid=prev
Digitaltinker at 04:33, 6 January 2023
2023-01-06T04:33:33Z
<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 21:33, 5 January 2023</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l75">Line 75:</td>
<td colspan="2" class="diff-lineno">Line 75:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></pre></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></pre></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[Category:Project]]</ins></div></td></tr>
</table>
Digitaltinker
https://www.wiki.unallocatedspace.org/wiki/index.php?title=Member_Check-In_System&diff=30&oldid=prev
C-P: Created page with "Super hacky, eventually to be improved member check-in system with smart cards. == reader.py == <pre> #! /usr/bin/env python import string,commands,os from sys import stdin, ex..."
2011-09-06T22:03:46Z
<p>Created page with "Super hacky, eventually to be improved member check-in system with smart cards. == reader.py == <pre> #! /usr/bin/env python import string,commands,os from sys import stdin, ex..."</p>
<p><b>New page</b></p><div>Super hacky, eventually to be improved member check-in system with smart cards.<br />
<br />
<br />
== reader.py ==<br />
<pre><br />
#! /usr/bin/env python<br />
import string,commands,os<br />
from sys import stdin, exc_info<br />
from time import sleep<br />
<br />
from smartcard.CardMonitoring import CardMonitor, CardObserver<br />
from smartcard.util import *<br />
<br />
current=open("whoishere","r").read().split("\n")<br />
mute=False<br />
<br />
class printobserver(CardObserver):<br />
<br />
def update(self, observable, (addedcards, removedcards)):<br />
global current<br />
global mute<br />
for card in addedcards:<br />
print "+"+string.replace(toHexString(card.atr)," ",'')<br />
dump=commands.getoutput("pkcs15-tool -D")<br />
if "UASID:" in dump:<br />
id=dump[dump.find("UASID:")+6:]<br />
id=id[0:id.find("]")]<br />
current=open("whoishere","r").read().split("\n")<br />
if id != "" and id not in current:<br />
print id,"has checked in at the space."<br />
<br />
if mute == False:<br />
os.system("echo '"+id+" has checked in at the space.' > /uas/irc/irc")<br />
<br />
f=open("/uas/ocs/log","a")<br />
f.write(id+" was here\n")<br />
f.close()<br />
<br />
f=open("/uas/smart/whoishere","a")<br />
f.write(id+"\n")<br />
f.close()<br />
current.append(id)<br />
os.system("mplayer /uas/hal9001/welcome_back.wav")<br />
else:<br />
print id,"Already Checked in or Empty ID"<br />
os.system("mplayer /uas/hal9001/welcome_back.wav")<br />
<br />
<br />
for card in removedcards:<br />
print "-"+string.replace(toHexString(card.atr)," ",'')<br />
try:<br />
cardmonitor = CardMonitor()<br />
cardobserver = printobserver()<br />
cardmonitor.addObserver(cardobserver)<br />
<br />
while True:<br />
todo=raw_input("").strip()<br />
if "add user " in todo:<br />
id = todo[9:]<br />
if id != "":<br />
commands.getoutput("pkcs15-init -TEC --label 'UASID:"+id+"' --no-so-pin")<br />
print "That could of work, or not, whatever"<br />
elif "mute on" in todo:<br />
mute=True<br />
print "Mute on"<br />
elif "mute off" in todo:<br />
mute=False<br />
print "Mute off"<br />
cardmonitor.deleteObserver(cardobserver)<br />
<br />
except:<br />
print exc_info()[0], ':', exc_info()[1]<br />
<br />
<br />
<br />
</pre></div>
C-P