Permalink
Browse files

initial commit

  • Loading branch information...
0 parents commit ca00accc90badb50e2babf768bb355f9e7392457 @deekayen committed Feb 18, 2011
Showing with 425 additions and 0 deletions.
  1. +9 −0 README
  2. +81 −0 dhcpd.leases
  3. +187 −0 first.php
  4. +113 −0 index.php
  5. +35 −0 reg.php
9 README
@@ -0,0 +1,9 @@
+This was meant to be a signup form using arping and a
+ISC dhcpd.leases file on an OpenBSD server for authenticating
+students in campus housing. Priorities changed and the signup
+form was postponed indefinately.
+
+Right now it essentially parses the dhcpd.leases file to
+get a MAC address to compare to the arping results. Both would
+have to match to authenticate the user and put them in the system
+to have their Cisco port activated.
@@ -0,0 +1,81 @@
+# All times in this file are in UTC (GMT), not your local timezone.
+# The format of this file is documented in the dhcpd.leases(5) manual page.
+
+lease 192.168.0.105 {
+ starts 0 2002/06/30 15:28:33;
+ ends 1 2002/07/01 03:28:33;
+ hardware ethernet 00:a0:24:d8:4b:de;
+ client-hostname "pines";
+}
+lease 192.168.0.104 {
+ starts 5 2002/06/28 13:31:27;
+ ends 6 2002/06/29 01:31:27;
+ hardware ethernet 00:06:5b:eb:6d:4e;
+ uid 01:00:06:5b:eb:6d:4e;
+ client-hostname "acs-dkn-laptop";
+}
+lease 192.168.0.100 {
+ starts 6 2002/06/22 13:19:09;
+ ends 0 2002/06/23 01:19:09;
+ abandoned;
+ client-hostname "acs-dkn-laptop";
+}
+lease 192.168.0.103 {
+ starts 2 2002/06/04 20:48:17;
+ ends 3 2002/06/05 08:48:17;
+ hardware ethernet 00:06:5b:da:19:38;
+ uid 01:00:06:5b:da:19:38;
+ client-hostname "acs-dkn-laptop";
+}
+lease 192.168.0.102 {
+ starts 1 2002/05/27 15:53:31;
+ ends 2 2002/05/28 03:53:31;
+ hardware ethernet 02:06:5b:da:19:38;
+ uid 01:02:06:5b:da:19:38;
+ client-hostname "ACS-DKN-LAPTOP";
+}
+lease 127.0.0.1 {
+ starts 0 2001/06/30 16:23:49;
+ ends 1 2002/07/01 04:23:49;
+ hardware ethernet aa:aa:24:d8:4b:de;
+ client-hostname "windows";
+}
+lease 192.168.0.101 {
+ starts 5 2002/05/24 00:47:32;
+ ends 5 2002/05/24 12:47:32;
+ hardware ethernet 02:02:2d:56:6e:38;
+ uid 01:02:02:2d:56:6e:38;
+ client-hostname "ACS-DKN-LAPTOP";
+}
+lease 127.0.0.1 {
+ starts 0 2002/03/30 16:23:49;
+ ends 1 2002/07/01 04:23:49;
+ hardware ethernet ab:aa:24:d8:4b:de;
+ client-hostname "windows";
+}
+lease 192.168.0.102 {
+ starts 1 2002/05/27 15:53:31;
+ ends 2 2002/05/28 03:53:31;
+ hardware ethernet 02:06:5b:da:19:38;
+ uid 01:02:06:5b:da:19:38;
+ client-hostname "ACS-DKN-LAPTOP";
+}
+lease 127.0.0.1 {
+ starts 0 2002/06/30 16:23:49;
+ ends 1 2002/07/01 04:23:49;
+ hardware ethernet ac:aa:24:d8:4b:de;
+ client-hostname "windows";
+}
+lease 192.168.0.101 {
+ starts 5 2002/05/24 00:47:32;
+ ends 5 2002/05/24 12:47:32;
+ hardware ethernet 02:02:2d:56:6e:38;
+ uid 01:02:02:2d:56:6e:38;
+ client-hostname "ACS-DKN-LAPTOP";
+}
+lease 192.168.0.105 {
+ starts 0 2002/06/30 16:23:49;
+ ends 1 2002/07/01 04:23:49;
+ hardware ethernet 00:a0:24:d8:4b:de;
+ client-hostname "pines";
+}
187 first.php
@@ -0,0 +1,187 @@
+<?php
+
+$apts = array(201 => array('A','B','C','D'),
+ 202 => array('A','B','C','D'),
+ 203 => array('A','B'),
+ 204 => array('A','B'),
+ 205 => array('A','B'),
+ 206 => array('A','B'),
+ 207 => array('A','B','C','D'),
+ 208 => array('A','B','C','D'),
+ 209 => array('A','B','C','D'),
+ 210 => array('A','B','C','D'),
+ 211 => array('A','B'),
+ 212 => array('A','B'),
+ 213 => array('A','B'),
+ 214 => array('A','B'),
+ 215 => array('A','B','C','D'),
+ 216 => array('A','B','C','D'),
+
+ 301 => array('A','B'),
+ 302 => array('A','B'),
+ 303 => array('A','B'),
+ 304 => array('A','B'),
+ 305 => array('A','B'),
+ 306 => array('A','B'),
+ 307 => array('A','B'),
+ 308 => array('A','B'),
+
+ // singles are efficiencies
+ 401 => array('A','B'),
+ 402 => array('A','B'),
+ 403 => array('A'),
+ 404 => array('A'),
+ 405 => array('A'),
+ 406 => array('A'),
+ 407 => array('A','B'),
+ 408 => array('A','B'),
+ 409 => array('A','B'),
+ 410 => array('A','B'),
+ 411 => array('A'),
+ 412 => array('A'),
+ 413 => array('A'),
+ 414 => array('A'),
+ 415 => array('A','B'),
+ 416 => array('A','B'),
+
+ // singles are efficiencies
+ 501 => array('A','B'),
+ 502 => array('A','B'),
+ 503 => array('A'),
+ 504 => array('A'),
+ 505 => array('A'),
+ 506 => array('A'),
+ 507 => array('A','B'),
+ 508 => array('A','B'),
+ 509 => array('A','B'),
+ 510 => array('A','B'),
+ 511 => array('A'),
+ 512 => array('A'),
+ 513 => array('A'),
+ 514 => array('A'),
+ 515 => array('A','B'),
+ 516 => array('A','B'),
+
+ 601 => array('A','B','C','D'),
+ 602 => array('A','B','C','D'),
+ 603 => array('A','B'),
+ 604 => array('A','B'),
+ 605 => array('A','B'),
+ 606 => array('A','B'),
+ 607 => array('A','B','C','D'),
+ 608 => array('A','B','C','D'),
+ 609 => array('A','B','C','D'),
+ 610 => array('A','B','C','D'),
+ 611 => array('A','B'),
+ 612 => array('A','B'),
+ 613 => array('A','B'),
+ 614 => array('A','B'),
+ 615 => array('A','B','C','D'),
+ 616 => array('A','B','C','D'),
+
+ 701 => array('A','B','C','D'),
+ 702 => array('A','B','C','D'),
+ 703 => array('A','B'),
+ 704 => array('A','B'),
+ 705 => array('A','B'),
+ 706 => array('A','B'),
+ 707 => array('A','B','C','D'),
+ 708 => array('A','B','C','D'),
+ 709 => array('A','B','C','D'),
+ 710 => array('A','B','C','D'),
+ 711 => array('A','B'),
+ 712 => array('A','B'),
+ 713 => array('A','B'),
+ 714 => array('A','B'),
+ 715 => array('A','B','C','D'),
+ 716 => array('A','B','C','D'),
+
+ 801 => array('A','B','C','D'),
+ 802 => array('A','B','C','D'),
+ 803 => array('A','B'),
+ 804 => array('A','B'),
+ 805 => array('A','B'),
+ 806 => array('A','B'),
+ 807 => array('A','B','C','D'),
+ 808 => array('A','B','C','D'),
+ 809 => array('A','B','C','D'),
+ 810 => array('A','B','C','D'),
+ 811 => array('A','B'),
+ 812 => array('A','B'),
+ 813 => array('A','B'),
+ 814 => array('A','B'),
+ 815 => array('A','B','C','D'),
+ 816 => array('A','B','C','D'),
+
+ 901 => array('A','B'),
+ 902 => array('A','B'),
+ 903 => array('A'),
+ 904 => array('A'),
+ 905 => array('A'),
+ 906 => array('A'),
+ 907 => array('A','B'),
+ 908 => array('A','B'),
+ 909 => array('A','B'),
+ 910 => array('A','B'),
+ 911 => array('A'),
+ 912 => array('A'),
+ 913 => array('A'),
+ 914 => array('A'),
+ 915 => array('A','B'),
+ 916 => array('A','B'),
+
+ 1001 => array('A','B'),
+ 1002 => array('A','B'),
+ 1003 => array('A','B'),
+ 1004 => array('A','B'),
+ 1005 => array('A','B'),
+ 1006 => array('A','B'),
+ 1007 => array('A','B'),
+ 1008 => array('A','B'),
+
+ // singles are one bedrooms
+ 1101 => array('A','B'),
+ 1102 => array('A','B'),
+ 1103 => array('A'),
+ 1104 => array('A'),
+ 1105 => array('A'),
+ 1106 => array('A'),
+ 1107 => array('A','B'),
+ 1108 => array('A','B'),
+ 1109 => array('A','B'),
+ 1110 => array('A','B'),
+ 1111 => array('A'),
+ 1112 => array('A'),
+ 1113 => array('A'),
+ 1114 => array('A'),
+ 1115 => array('A','B'),
+ 1116 => array('A','B'),
+
+ // singles are one bedrooms
+ 1201 => array('A','B'),
+ 1202 => array('A','B'),
+ 1203 => array('A'),
+ 1204 => array('A'),
+ 1205 => array('A'),
+ 1206 => array('A'),
+ 1207 => array('A','B'),
+ 1208 => array('A','B'),
+ 1209 => array('A','B'),
+ 1210 => array('A','B'),
+ 1211 => array('A'),
+ 1212 => array('A'),
+ 1213 => array('A'),
+ 1214 => array('A'),
+ 1215 => array('A','B'),
+ 1216 => array('A','B'));
+
+ if (!function_exists('str_rot13')) {
+
+ function str_rot13($str) {
+ $from = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
+ $to = 'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM';
+
+ return strtr($str, $from, $to);
+ }
+}
+?>
113 index.php
@@ -0,0 +1,113 @@
+<?php
+
+include 'first.php';
+
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>University Pines Setup</title>
+ </head>
+
+ <body bgcolor="ef741d" text="#000000" link="#0000000" vlink="#000000">
+
+ <table border="0" width="100%" cellspacing="1" cellpadding="1" bgcolor="#DDDDCC" summary="">
+ <tr bgcolor="#DDDDCC">
+ <td align="left" valign="top"><h2>Welcome to the University Pines Internet signup</h2></td>
+ </tr>
+ </table>
+
+ <table width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="#FFFFFF" summary="">
+ <tr>
+ <td>
+ The completion of this form will give your computer access to the Internet.<br /><br />
+
+ You must obtain a registration key from the cashiers office in ADM 120. (903) 566-7227<br /><br />
+
+ <hr />
+
+ <h3>Fee Schedule</h3>
+ <table border="0" cellspacing="1" cellpadding="1" summary="">
+ <tr>
+ <td><b>Fall:</b></td><td>$50</td>
+ </tr>
+ <tr>
+ <td><b>Spring:</b></td><td>$50</td>
+ </tr>
+ <tr>
+ <td><b>Summer:</b></td><td>$20</td>
+ </tr>
+ <tr>
+ <td><b>12 months:</b></td><td>$100</td>
+ </tr>
+ </table>
+
+ <hr />
+
+ <h3>Which bedroom?</h3>
+ <table border="0" cellspacing="1" cellpadding="1" summary="">
+ <tr>
+ <td><b>Four bedroom:</b></td><td>Bedroom <b>A</b> is <b>across</b> from the bathroom, on the <b>left</b> side.</td>
+ </tr>
+ <tr>
+ <td>&nbsp</td> <td>Bedroom <b>B</b> is on the <b>side</b> from the bathroom, on the <b>left</b> side.</td>
+ </tr>
+ <tr>
+ <td>&nbsp</td> <td>Bedroom <b>C</b> is on the <b>side</b> from the bathroom, on the <b>right</b> side.</td>
+ </tr>
+ <tr>
+ <td>&nbsp</td> <td>Bedroom <b>D</b> is <b>across</b> from the bathroom, on the <b>right</b> side.</td>
+ </tr>
+ <tr>
+ <td><b>Two bedroom:</b></td><td>Bedroom <b>A</b> is on the <b>side</b> from the bathroom.</td>
+ </tr>
+ <tr>
+ <td>&nbsp</td><td>Bedroom <b>B</b> is <b>across</b> from the bathroom.</td>
+ </tr>
+ </table>
+
+ <hr />
+
+ <form method="post" action="reg.php">
+ <b>Warning:</b> Registration keys are good for <b>one</b> registration only and will be locked to the specific computer you are using to register.<br /><br />
+
+ <table border="0" cellspacing="1" cellpadding="1" summary="">
+ <tr>
+ <td>Your Apartment: </td><td><select name="apartment">
+ <?php
+ // list all the apartments
+ // or everone will know who has a computer
+ // increasing the liklihood their apartment will be robbed
+
+ foreach($apts as $apt => $rooms) {
+ foreach($rooms as $room) {
+ echo ' <option value="'. $apt.$room .'"> '. $apt .' '. $room ."</option>\n";
+ }
+ }
+ ?>
+ </select></td>
+ </tr>
+ <tr>
+ <td>First Name: </td><td><input type="text" name="first_name" /></td>
+ </tr>
+ <tr>
+ <td>Last Name: </td><td><input type="text" name"last_name" /></td>
+ </tr>
+ <tr>
+ <td>Registration Key: </td><td><input type="text" name"reg_key" /></td>
+ </tr>
+ <tr>
+ <td colspan="2"><input type="submit" value="Register" /></td>
+ </tr>
+ </table>
+ </form>
+ </td>
+ </tr>
+ </table>
+ <br />
+
+ </body>
+</html>
+
Oops, something went wrong.

0 comments on commit ca00acc

Please sign in to comment.