Compare commits

..

2 Commits

Author SHA1 Message Date
gashapwn
dcc3b84672 added background image to HTML styles 2020-11-26 06:14:59 +00:00
gashapwn
faea6e0dd7 successful multiuser creation test 2020-11-25 04:05:19 +00:00
7 changed files with 104 additions and 18 deletions

2
app.py
View File

@ -58,4 +58,4 @@ if __name__=="__main__":
app.add_url_rule('/success/<name>', 'success', success)
app.add_url_rule('/login', 'login', login, methods = ['POST', 'GET'])
app.add_url_rule('/req', 'req', req, methods = ['POST', 'GET'])
app.run(host="192.168.1.228",debug=True)
app.run(host="104.248.118.130",debug=True)

View File

@ -15,7 +15,7 @@ my $SHELL_ENUM = {
my @g;
sub fun1($){
sub create($){
my $id = $_[0];
my $fn1 = $FULL_PATH.$id.".ident";
@ -38,7 +38,6 @@ sub fun1($){
$shell_pref = $SHELL_ENUM->{$shell_var};
}
# printf("checking username %s\n", $username);
if(length($username) > 31 || !($username =~ /^[A-Za-z][A-Za-z0-9]+$/)){
printf("%s has an INVALID username\n", $id);
die ("oh no");
@ -55,24 +54,23 @@ sub fun1($){
system($cmd);
#system("mkdir /home/$username/.ssh");
system("chmod 700 /home/$username/.ssh");
system("mv $FULL_PATH/$id.pub /home/$username/.ssh/authorized_keys");
system("chmod 600 /home/$username/.ssh/authorized_keys");
system("chown $username:$username /home/$username/.ssh");
system("chown $username:$username /home/$username/.ssh/authorized_keys");
#system("chmod 700 /home/$username/.ssh");
system("cat $FULL_PATH/$id.pub > /home/$username/.ssh/authorized_keys");
#system("mv $FULL_PATH/$id.pub /home/$username/.ssh/authorized_keys");
#system("chmod 600 /home/$username/.ssh/authorized_keys");
system("chmod 711 /home/$username");
#system("chown $username:$username /home/$username/.ssh");
#system("chown $username:$username /home/$username/.ssh/authorized_keys");
system("rm $FULL_PATH/$id.ident");
system("rm $FULL_PATH/$id.pub");
}
close FILE;
}
fun1("00004");
die "test 0";
@g = glob("$FULL_PATH*");
@g = map { s/.*\/([^\/]*).pub$/$1/; $_ } grep {$_ =~ /pub$/} @g;
for my $fn (@g){
printf("%s\n", $fn);
create($fn);
}

BIN
static/lainsign.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

71
static/main_home.css Normal file
View File

@ -0,0 +1,71 @@
html {
background: #000;
background-image: url("lainsign.png");
background-repeat: no-repeat;
}
h1{
text-align: center;
}
footer{
width: 800px;
margin: 0 auto;
}
body {
margin: 0;
padding: 0;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #fff;
}
/*
* Formatting the header area
*/
header {
height: 35px;
width: 100%;
opacity: .9;
margin-bottom: 10px;
}
header h1.logo {
margin: 0;
font-size: 1.7em;
color: #fff;
text-transform: uppercase;
float: left;
}
/* header h1.logo:hover { */
/* color: #fff; */
/* text-decoration: none; */
/* } */
/*
* Center the body content
*/
.container {
width: 800px;
margin: 0 auto;
}
h2 {
font-size: 3em;
margin-top: 40px;
text-align: center;
letter-spacing: -2px;
}
h3 {
font-size: 1.7em;
font-weight: 100;
margin-top: 30px;
text-align: center;
letter-spacing: -1px;
color: #999;
}

View File

@ -1,4 +1,4 @@
{%extends "layout.html"%}
{%extends "main_layout.html"%}
{% block content %}
<div class="home">
<h2>Home</h2>

View File

@ -1,10 +1,12 @@
{%extends "layout.html"%}
{%extends "main_layout.html"%}
{%block content %}
<div class="home_blurb">
<p>lingy.in is a public unix / tilde instance for lainchan users</p>
<p><b>thread: </b><a href="https://lainchan.org/tech/res/34563.html">https://lainchan.org/tech/res/34563.html</a></p>
<p>request an account</p>
<p>lingy.in is a public unix / tilde instance for lainons</p>
<p><b>current thread: </b><a href="https://lainchan.org/tech/res/34563.html">https://lainchan.org/tech/res/34563.html</a></p>
<p>sign up</p>
<p>rules</p>
<p>git</p>
<p>users</p>
<ol>
<li>gashapwn</li>

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<head>
<title>LAINTILDE0</title>
<link rel="stylesheet" href="{{url_for('static',filename='main_home.css')}}">
</head>
<h1>lingy.in</h1>
<body>
<div class="container">
{%block content%}
{%endblock%}
</div>
</body>
<footer>admin: <a href="email:gashapwn@protonmail.com">gashapwn@protonmail.com</a></footer>
</html>