Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lanyusea committed Dec 29, 2014
0 parents commit a729ac8
Show file tree
Hide file tree
Showing 10 changed files with 170 additions and 0 deletions.
Binary file added android.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions backup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Welcome page</title>
<style type="text/css" media="screen">
body { background: #e7e7e7; font-family: Verdana, sans-serif; font-size: 11pt; }
#page { background: #ffffff; margin: 50px; border: 2px solid #c0c0c0; padding: 10px; }
#header { background: #4b6983; border: 2px solid #7590ae; text-align: center; padding: 10px; color: #ffffff; }
#header h1 { color: #ffffff; }
#body { padding: 10px; }
span.tt { font-family: monospace; }
span.bold { font-weight: bold; }
a:link { text-decoration: none; font-weight: bold; color: #C00; background: #ffc; }
a:visited { text-decoration: none; font-weight: bold; color: #999; background: #ffc; }
a:active { text-decoration: none; font-weight: bold; color: #F00; background: #FC0; }
a:hover { text-decoration: none; color: #C00; background: #FC0; }
</style>
</head>
<body>
<div id="page">
<div id="header">
<h1> Placeholder page </h1>
The owner of this web site has not put up any web pages yet. Please come back later.
</div>
<div id="body">
<h2>You should replace this page with your own web pages as soon as possible.</h2>
Unless you changed its configuration, your new server is configured as follows:
<ul>
<li>Configuration files can be found in <span class="tt">/etc/lighttpd</span>. Please read <span class="tt">/etc/lighttpd/conf-available/README</span> file.</li>
<li>The DocumentRoot, which is the directory under which all your HTML files should exist, is set to <span class="tt">/var/www</span>.</li>
<li>CGI scripts are looked for in <span class="tt">/usr/lib/cgi-bin</span>, which is where Debian packages will place their scripts. You can enable cgi module by using command <span class="bold tt">&quot;lighty-enable-mod cgi&quot;</span>.</li>
<li>Log files are placed in <span class="tt">/var/log/lighttpd</span>, and will be rotated weekly. The frequency of rotation can be easily changed by editing <span class="tt">/etc/logrotate.d/lighttpd</span>.</li>
<li>The default directory index is <span class="tt">index.html</span>, meaning that requests for a directory <span class="tt">/foo/bar/</span> will give the contents of the file /var/www/foo/bar/index.html if it exists (assuming that <span class="tt">/var/www</span> is your DocumentRoot).</li>
<li>You can enable user directories by using command <span class="bold tt">&quot;lighty-enable-mod userdir&quot;</span></li>
</ul>
<h2>About this page</h2>
<p>
This is a placeholder page installed by the Debian release of the <a href="http://packages.debian.org/lighttpd">Lighttpd server package.</a>
</p>
<p>
This computer has installed the Debian GNU/Linux operating system, but it has nothing to do with the Debian Project. Please do not contact the Debian Project about it.
</p>
<p>
If you find a bug in this Lighttpd package, or in Lighttpd itself, please file a bug report on it. Instructions on doing this, and the list of known bugs of this package, can be found in the
<a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=lighttpd">Debian Bug Tracking System.</a>
</p>
<p>
<a href="http://validator.w3.org/check?uri=referer"><img
src="http://www.w3.org/Icons/valid-xhtml10"
alt="Valid XHTML 1.0 Transitional" height="31" width="88" border="0" /></a>
</p>
</div>
</div>
<!-- s:853e9a42efca88ae0dd1a83aeb215047 -->
</body>
</html>
20 changes: 20 additions & 0 deletions connect.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<html>
<body>

<?php
$connect= $_POST["connect"];
if(empty($connect))
{
print "email connot be empty";
}
else if (preg_match('~\d~',$connect) ){
print "no number, thanks";
}
else{
shell_exec("./connect.sh $connect");
print "Your password has been sent to ".$connect."@connect.ust.hk";
}
?>

</body>
</html>
11 changes: 11 additions & 0 deletions connect.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

recipient="$1@connect.ust.hk"
rand=$(tr -dc A-Za-z0-9 < /dev/urandom | head -c 7 | xargs)

content="Your username:$1 \nYour password: $rand"

echo "$1 * $rand *">>/etc/ppp/chap-secrets
echo $content|mutt $recipient -s "VPN Account"

sh ./vpnrestart.sh
9 changes: 9 additions & 0 deletions image.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<html>
<img src="ios.jpg" width=300px>
<img src="android.jpg" width=300px>
<br>
Type must be <b>PPTP</b><br>
Name(Android)/Description(iOS) does not matter <br>
Username(Android)/Account(iOS) and passowrd shoud be YOUR OWN<br>
other settings should be exactly the same
</html>
38 changes: 38 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<html>
<body>

<b>VPN</b><br>ihome.ust.hk/~hliah<br><br>
-----<br>
This is a private VPN host in HKUST campus.<br>
It is available for ust students this winter due to the Gmail port block. <br>
You are only allowed to use it for checking msg. NO youtube please, limited bandwidth. <br>
You are only allowed to use it on your mobile device. NO laptop/desktop please, limited bandwidth. <br>
For you better Internet experience, please buy your own business VPN, this one is private, thanks.
<br><br>
Note:<br>
Android users are suggested to install <a href="http://ihome.ust.hk/~hliah/fqrouter2.apk">fqrouter2</a> <br>
PC/Mac please use <a href="http://itsc.ust.hk/services/academic-teaching-support/facilities/virtual-barn/">ust virtual barn</a><br>
Set up your own GoAgent service if you are smart enough.

<br><br>
The account will be sent to you by email.<br>
You can check the setting method <a href="image.html">here</a>
<br><br>
<form name='form' method='post' action="itsc.php">
<input type="text" name="itsc" id="name1" >@ust.hk
<input type="submit" name="submitsc" value="Submit">
</form>
<form name='form' method='post' action="connect.php">
<input type="text" name="connect" id="name2" >@connect.ust.hk
<input type="submit" name="submitect" value="Submit">
</form>
<?php
if(!empty($_POST)) {
$itsc= $_POST['itsc'];
$connect = $_POST['connect'];
}
?>

<br><br><br><br>
</body>
</html>
Binary file added ios.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions itsc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<html>
<body>

<?php
$itsc = $_POST["itsc"];
if(empty($itsc))
{
print "email connot be empty";
}
else if (preg_match('~\d~',$itsc)) {
print "no number, thanks";
}
else{
shell_exec("./itsc.sh $itsc");
print "Your password has been sent to ".$itsc."@ust.hk";
}
?>

</body>
</html>
11 changes: 11 additions & 0 deletions itsc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

recipient="$1@ust.hk"
rand=$(tr -dc A-Za-z0-9 < /dev/urandom | head -c 7 | xargs)

content="Your username:$1 \nYour password: $rand"

echo "$1 * $rand *">>/etc/ppp/chap-secrets
echo $content|mutt $recipient -s "VPN Account"

sh ./vpnrestart.sh
4 changes: 4 additions & 0 deletions vpnrestart.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
/etc/init.d/pptpd restart


0 comments on commit a729ac8

Please sign in to comment.