How To Let A Lecturer Know If Someone Is At A Lecture Or If They Are At A Guesthouse



Similar documents
CSI 2132 Lab 8. Outline. Web Programming JSP 23/03/2012

Equipment Room Database and Web-Based Inventory Management

Short notes on webpage programming languages

G563 Quantitative Paleontology. SQL databases. An introduction. Department of Geological Sciences Indiana University. (c) 2012, P.

Software Architecture Document

DIPLOMA IN WEBDEVELOPMENT

International Journal of Engineering Technology, Management and Applied Sciences. November 2014, Volume 2 Issue 6, ISSN

CS/CE 2336 Computer Science II

Architecture and Mode of Operation

owncloud Architecture Overview

1. Introduction. 2. Web Application. 3. Components. 4. Common Vulnerabilities. 5. Improving security in Web applications

pset 7: C$50 Finance Zamyla Chan

Online shopping store

Configuring an Alternative Database for SAS Web Infrastructure Platform Services

APIS CARM NG Quick Start Guide for MS Windows

Connecting to a Database Using PHP. Prof. Jim Whitehead CMPS 183, Spring 2006 May 15, 2006

A Brief Introduction to MySQL

CSCI110 Exercise 4: Database - MySQL

Advanced Tornado TWENTYONE Advanced Tornado Accessing MySQL from Python LAB

Using the SQL TAS v4

Database Applications Recitation 10. Project 3: CMUQFlix CMUQ s Movies Recommendation System

Software Requirements Specification For Real Estate Web Site

COSC344 Database Theory and Applications. Java and SQL. Lecture 12

CPE111 COMPUTER EXPLORATION

Linking Access to SQL Server

Specialized Programme on Web Application Development using Open Source Tools

SQL and Java. Database Systems Lecture 19 Natasha Alechina

Guide to Web Hosting in CIS. Contents. Information for website administrators. ITEE IT Support

INSTALLING, CONFIGURING, AND DEVELOPING WITH XAMPP

Web Application Guidelines

Java and Databases. COMP514 Distributed Information Systems. Java Database Connectivity. Standards and utilities. Java and Databases

Use Enterprise SSO as the Credential Server for Protected Sites

Certified PHP/MySQL Web Developer Course

SOSFTP Managed File Transfer

Package sjdbc. R topics documented: February 20, 2015

Document management and exchange system supporting education process

Course Number: IAC-SOFT-WDAD Web Design and Application Development

Cyber Security Workshop Ethical Web Hacking

WHITE PAPER. Domo Advanced Architecture

Brekeke SIP Server Version 3 Using a Third-Party Database Tutorial Brekeke Software, Inc.

Web Development on the SOEN 6011 Server

CS 377 Database Systems SQL Programming. Li Xiong Department of Mathematics and Computer Science Emory University

WEB PROGRAMMING LAB (Common to CSE & IT)

Instant Chime for IBM Sametime Installation Guide for Apache Tomcat and Microsoft SQL

Role Based Access Control. Using PHP Sessions

Database Access from a Programming Language: Database Access from a Programming Language

Database Access from a Programming Language:

Adobe Marketing Cloud Using FTP and sftp with the Adobe Marketing Cloud

Web Development using PHP (WD_PHP) Duration 1.5 months

How to Copy A SQL Database SQL Server Express (Making a History Company)

How To Create A Database Driven Website On A Computer Or Server Without A Database (Iis) Or A Password (Ict) On A Server (Iip) Or Password (Web) On An Anonymous Guestbook (Iit) On Your

Application note: Connecting the to a Database

Introduction to Server-Side Programming. Charles Liu

Mercury Users Guide Version 1.3 February 14, 2006

Installation Guide for contineo

Advanced Web Security, Lab

Querying Databases Using the DB Query and JDBC Query Nodes

CSCI-UA: Database Design & Web Implementation. Professor Evan Sandhaus sandhaus@cs.nyu.edu evan@nytimes.com

EZcast technical documentation

A Generic Database Web Service

Creating a Website with Publisher 2013

Specialized Programme on Web Application Development using Open Source Tools

COURSE CONTENT FOR WINTER TRAINING ON Web Development using PHP & MySql

Welcome to Collage (Draft v0.1)

FileMaker Server 9. Custom Web Publishing with PHP

Media Upload and Sharing Website using HBASE

PHP Authentication Schemes

CS346: Database Programming.

NO SQL! NO INJECTION?

LDAPCON Sébastien Bahloul

Absorb Single Sign-On (SSO) V3.0

IBM Campaign and IBM Silverpop Engage Version 1 Release 2 August 31, Integration Guide IBM

RARITAN VALLEY COMMUNITY COLLEGE ACADEMIC COURSE OUTLINE CISY 233 INTRODUCTION TO PHP

Supplement IV.C: Tutorial for Oracle. For Introduction to Java Programming By Y. Daniel Liang

Please note that all activities on IADT s Wireless Network are subject to IADT s ICT A/AUP and

Online Fuzzy-C-Means clustering

General principles and architecture of Adlib and Adlib API. Petra Otten Manager Customer Support

Unlocking Hadoop for Your Rela4onal DB. Kathleen Technical Account Manager, Cloudera Sqoop PMC Member BigData.

Equipment Room Database and Web-Based Inventory Management

SCOPTEL WITH ACTIVE DIRECTORY USER DOCUMENTATION

INUVIKA OVD INSTALLING INUVIKA OVD ON RHEL 6

WEB DATABASE PUBLISHING

shweclassifieds v 3.3 Php Classifieds Script (Joomla Extension) User Manual (Revision 2.0)

Site Store Pro. INSTALLATION GUIDE WPCartPro Wordpress Plugin Version

Benchmarking and monitoring tools

2 System Requirements and Authentication

Tibbr Installation Addendum for Amazon Web Services

Software Requirement Specification For Flea Market System

Writing Scripts with PHP s PEAR DB Module

IT Support Tracking with Request Tracker (RT)

CS 361S - Network Security and Privacy Fall Project #1

owncloud Architecture Overview

Understanding Sql Injection

Transcription:

Saya WebServer Mini-project report Introduction: The Saya WebServer mini-project is a multipurpose one. One use of it is when a lecturer (of the cs faculty) is at the reception desk and interested in knowing if some other lecturer left a (voice) message, or to ask for a room number of some lecturer, or maybe the lecturer himself wants to leave a message to other lecturers. Implemented in Java. Another use for it can be in case a lecturer is at his office/home and willing to communicate with Saya Database so as to elicit info about himself as listed in the DB archives. We would want to grant the lecturer the option to make changes to his entry in the DB, such as adding a comment, changing room number,etc Implemented in php.

Webserver Architecture Server Apache + PHP 1 Client Username : Password : 2 DATABASE 3 Java + JDBC

Description in words 1. Information flow between Client to Server. Client side sending requests and authentication details and Server side returning query results. 2. Information flow between Server to Database. Server makes a connection to Database and issues queries. 3. Information flow between Java and JDBC to Database. Java uses methods of its JDBC API for querying and updating data in the database.

Implementation: - Making a connection to Saya Mysql DB: We use mysql_connect("webdev.cs.bgu.ac.il","sayaweb2","********") in PHP in order to connect to the Mysql DB. - Migrating Oracle DB -> Mysql DB: Done only once by running an executable "OracleToMysql.exe". The original.php follows these steps: First we establish a connection to the FRODO Host, where the oracle DB is: file_get_contents("http://frodo.cs.bgu.ac.il/php/connections/db.php?action=get-group) Then we take only the members of that DB that we want, i.e. faculty members, by adding "&group=faculty". Then we make a connection to our Mysql DB - include "mysqllink.php"; Then we create a table on our Mysql Database with the corresponding columns by using the query "CREATE TABLE lecturers col1 col2". Then we iterate over the array we got from Oracle and perform: "INSERT INTO lecturers (colnames) VALUES (vallist)"; After this last query we have a copy of the original Oracle DB in a new Mysql DB.

- The Webserver: Technical background: The WebServer is implemented in PHP + HTML. The system was tested on Apache Server 2.2.6 + PHP 5.2.4 on Windows XP. Database was created in MySQL 5.0.45 Step by step Implementation: Design of pages: Background color throughout was done by CSS <style type="text/css"> Using HTML FORMS for user input. <FORM action="xxx.php" method="post"> Sessions were used to keep data about user such as username.some relevant code: session_start(); $_SESSION["user"] = $_POST['username'] session_unregister("user"); //starting session per current user //keeping user input //logging out Also, sessions were used to prevent user from maliciously trying to access subsequent pages without logging in first: If (!isset($_session["time"])) { header("location:login.php") } Else { //main code } Regular expressions were used to validate correct user input: preg_match("/^\d{3}$/", $new_room) User can log out at any time.

USER AUTHENTICATION: User details in Unix-like systems is stored in /etc/passwd file. We use the command "ypmatch $user passwd" to retrieve $user entry in this file. Since we are only interested in the encrypted password of the user we have to first break down the retrieved string :explode(":",$user_details_string) And return the correct cell of the resulting array. Then: If $user is not found at all in the directory, we output: "Sorry, you are not listed as a faculty member" and redirect him to the login page. If he is listed, we then check if the password entered by user (after applying crypt() ) and the encrypted password match. In case of success, the user is granted access to the database and can make queries. Interacting with Mysql Database: We use $_SESSION["user"].'@cs.bgu.ac.il' to find the corresponding row of the lecturer. For instance, issuing an update query to mysql that tells it to update the comment field: "UPDATE lecturers SET comment='".$comment."' WHERE email=$_session["user"].'@cs.bgu.ac.il';

Java: First we define a simple interface with basic operations: String get_comment(string name,string family); //a lecturer asks saya if there's any message from some other //lecturer by the name of name+family void put_comment(string name,string family, String message); //a lecturer want to leave a message String get_room (String name, String family); //a lecturer asks saya for the room number of some other lecturer Implementation: We use JDBC api to bridge between Java Platform and Mysql Database. We also need to make use of the Mysql connector/j 5.1 driver to allow the communication to take place. Throughout the program we use the java.sql Package. To establish a connection, we make an instance of the driver: Class.forName("com.mysql.jdbc.Driver").newInstance(); Followed by: DriverManager.getConnection("jdbc:mysql:///test", "root", ""); //DB "test" located on 127.0.0.1 Then we execute the queries by using createstatement() executequery() of the java.sql package.

Test case fig. 1 a lecturer enters his username and password to login

fig. 2 Query selection page: a lecturer selects to show his personal details

fig. 3 the lecturer's personal information is retrieved and output to screen

fig. 4 A lecturer asks to insert a comment to the database

fig.5 the user is notified about the changes made to the database

fig.6 Here we can see that the comment was indeed added to the database

fig. 7 a lecturer is interested to update his room number

fig.8 the lecturer is notified about the changes in the database

fig. 9 the lecturer can see that his room number has been changed

Conclusion: Future improvements may include any of the following: - Support in additional queries by Lecturer, both in Java and PHP. - Improved Security using SSH and other protocols - Adding Javascript code to.php pages to allow easier browsing