summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-01-05git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@147 ↵ma0178@student.uni-lj.si
5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2015-01-05git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@146 ↵ma0178@student.uni-lj.si
5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2015-01-04edited howtodn3250@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@145 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2015-01-04txtal0115@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@144 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2015-01-04git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@143 ↵lv4955@student.uni-lj.si
5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2015-01-04git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@142 ↵lv4955@student.uni-lj.si
5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2015-01-04git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@141 ↵lv4955@student.uni-lj.si
5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2015-01-04set_motd->/var/run/motd.dynamic na serverski strani, pobrisi znak '#'ss5781@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@140 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2015-01-04git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@139 ↵dj3494@student.uni-lj.si
5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2015-01-04git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@138 ↵dj3494@student.uni-lj.si
5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2015-01-04git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@137 ↵dj3494@student.uni-lj.si
5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-30Translate the instructions and howto into English.tj9557@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@136 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-30git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@135 ↵jp6095@student.uni-lj.si
5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-24def task(SNMP_VALUE, SNMP_OID_ON_SERVER, SNMP_OID_ON_CLIENT):af7140@student.uni-lj.si
#<== Aleksander Fujs 6310020 ==> # TODO popravi IPje import netsnmp from paramiko import SSHClient return_results = {} client = SSHClient() client.load_system_host_keys() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect('10.173.146.199', username='root', password='kaboom') stdin, stdout, stderr = client.exec_command('uptime=$(</proc/uptime); uptime=${uptime%%.*}; echo $uptime') return_results['server_uptime'] = stdout.readlines() try: session = netsnmp.Session(DestHost='10.173.146.199', Version=2, Community='studentje') results_objs = netsnmp.VarList(netsnmp.Varbind(SNMP_OID_ON_SERVER)) #117.112.116.105.109.101 <-uptime session.walk(results_objs) for result in results_objs: return_results['server_OID'] = ('%s.%s: %s') % (result.tag, result.iid, result.val) except Exception as exception_error: # Check for errors and print out results print ('ERROR: Occurred during SNMPget for OID %s from %s: ' '(%s)') % (SNMP_OID_ON_SERVER, '10.173.146.194', exception_error) sys.exit(2) client.connect('10.173.146.194', username='test', password='test') stdin, stdout, stderr = client.exec_command('/bin/bash /home/test/upminutes.sh') #TODO preverit da ni v skripti hardcodan return_results['client_script'] = stdout.readlines() stdin, stdout, stderr = client.exec_command('uptime=$(</proc/uptime); uptime=${uptime%%.*}; echo $(( uptime/60 ))') return_results['client_uptime'] = stdout.readlines() #TODO add 3 part of assigement return return_results #<== Aleksander Fujs 6310020 ==> # TODO (polz) start working on this. If gen_params doesn't yet work, change it to set the parameter values manually # run cpu temp script on client # run SNMP read SNMP_OID_ON_CLIENT script on client # read data on SNMP_OID_ON_CLIENT # read data from SNMP server #import netsnmp #session = netsnmp.Session(DestHost=SNMP_VALUE['type'],Version=2,Community='public') #Dobimo vrednost casa #vars=netsnmp.Varbind(SNMP_OID_ON_SERVER['type']) #Shranimo vrednost casa v imenik od SNMP_OID_ON_SERVER #var=netsnmp.Varbind(SNMP_OID_ON_SERVER['decdscriptions'['si'],'0',session.get(vars),SNMP_OID_ON_SERVER['type']) #netsnmp.snmpset(var,Version=2,DestHost=SNMP_VALUE['type'],Community='public') #return session.get(vars) return 0 def gen_params(user_id, params_meta): import random params = dict() # TODO (polz) this is wrong. Try something like: r = random.Random(user_id) #params['SNMP_VALUE'] = r.randint(0, 255) #params_meta['SNMP_OID_ON_SERVER'] = '1.3.6.1.4.1.8072.1.3.2.4.1.4' #params_meta['SNMP_OID_ON_CLIENT'] = '1.3.6.1.4.1.8072.1.3.2.4.1.4.' # You can also create an OID creation function in kpov_random_helpers. # this should probably return params_meta #<== Aleksander Fujs 6310020 ==> #TODO better random value params['SNMP_VALUE'] = str(r.randint(0, 255)) params['SNMP_OID_ON_SERVER'] = 'NET-SNMP-EXTEND-MIB::nsExtendOutput2Table' #TODO possible upgrade for last number to bi random between 0 and 255 params['SNMP_OID_ON_CLIENT'] = '1.3.6.1.4.1.8072.1.3.2.4.1.4' #<== Aleksander Fujs 6310020 ==> return params def task_check(results, params): #TODO improve regex import re score = 0 print results if re.search(results['client_script'][0].strip(), results['client_uptime'][0].strip()): score += 3 #TODO +- second or two of allowed error time if re.search(results['server_OID'].split(':')[1].strip(), results['server_uptime'][0].strip()): score += 3 print results['server_uptime'][0].strip() print results['server_OID'].split(':')[1].strip() print score return score git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@134 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-22prva verzijajc0142@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@133 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-22update how-to + druga navodilajc0142@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@132 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-22how-to updatejc0142@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@131 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-22Popravil sem params_meta tako da vsebuje tri parametre : (IME_KLJUCA, ↵ml8262@student.uni-lj.si
IME_IMENIKA, HASH). V metodi gen_params se, jim dodelil vrednosti: (IME_KLJUCA=heidi.key , IME_IMENIKA=openvpn , HASH=generiran iz user_id). Ce se kaj ni v redu bi prosil za komentar. Hvala git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@130 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-22restored gasper version :Daf7140@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@129 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-22git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@128 ↵af7140@student.uni-lj.si
5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-22git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@127 ↵af7140@student.uni-lj.si
5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-22ponovno shranjen howtomf0586@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@126 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-22Popravil sem metodo gen_params, in dolocil tri parametre (Ime,Datum,Sifra), ↵mj7196@student.uni-lj.si
ce kaj se ni vredu le sporocite git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@125 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-22Dodana navodila za konfiguracijo OpenRadiusng0896@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@124 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-22Dodana navodila za instalacijo openradiusng0896@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@123 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-22Dodana navodila za kreiranje podatkovne bazeng0896@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@122 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-22Fixed bug in kpov_random_helpers which should now be deterministic.gasperfele@fri1.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@121 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-22git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@120 ↵sv1004@student.uni-lj.si
5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-22Renamed a variable to make the error message when task() crashes easier to ↵gasperfele@fri1.uni-lj.si
understand. git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@119 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-22popravki na gen_params in params_meta : 63120335db1456@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@118 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-22Re-added random to the imports in test_task.pygasperfele@fri1.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@117 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-22Updated development faqgasperfele@fri1.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@116 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-22v gen_parameters je potrebno v slovar shranjevat stevilke kot stringe !af7140@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@115 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-22gen_params ne deluje pravilnoaf7140@student.uni-lj.si
zaganjanje test_task.py -g git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@114 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-21ne morem commitat svojih navodil index,html ze cel tedenng0896@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@113 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-21navodilang0896@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@112 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-21navodilang0896@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@111 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-21lectures/fri_kpov/04/preparation: Write a solution for the tasks in instructionsmn3983@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@110 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-21Popravo gen_parametrs in se konanojp8046@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@109 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-20Added .key check in /vpn directory. Added checks for directory access in the ↵mp7462@student.uni-lj.si
NFS access control list. git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@108 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-20Removed install nmap.mp7462@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@107 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-19dodan enal0115@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@106 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-19dodan enal0115@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@105 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-19git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@104 ↵gs9857@student.uni-lj.si
5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-18rdateap9176@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@103 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-18Dodatna vprašanja in odgovori v DEVLOPMENT_FAQ.txtks3592@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@102 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-18custom rdate dodana programa python/java in update howtoap9176@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@101 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-17Dubs 100 getmp7462@student.uni-lj.si
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@100 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-17git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@99 ↵mp4085@student.uni-lj.si
5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
2014-12-17git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@98 ↵mp4085@student.uni-lj.si
5cf9fbd1-b2bc-434c-b4b7-e852f4f63414