Compare commits
2 Commits
e1021e8a3d
...
dcc3b84672
Author | SHA1 | Date | |
---|---|---|---|
|
dcc3b84672 | ||
|
faea6e0dd7 |
2
app.py
2
app.py
@ -58,4 +58,4 @@ if __name__=="__main__":
|
|||||||
app.add_url_rule('/success/<name>', 'success', success)
|
app.add_url_rule('/success/<name>', 'success', success)
|
||||||
app.add_url_rule('/login', 'login', login, methods = ['POST', 'GET'])
|
app.add_url_rule('/login', 'login', login, methods = ['POST', 'GET'])
|
||||||
app.add_url_rule('/req', 'req', req, 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)
|
||||||
|
@ -15,7 +15,7 @@ my $SHELL_ENUM = {
|
|||||||
|
|
||||||
my @g;
|
my @g;
|
||||||
|
|
||||||
sub fun1($){
|
sub create($){
|
||||||
my $id = $_[0];
|
my $id = $_[0];
|
||||||
|
|
||||||
my $fn1 = $FULL_PATH.$id.".ident";
|
my $fn1 = $FULL_PATH.$id.".ident";
|
||||||
@ -38,7 +38,6 @@ sub fun1($){
|
|||||||
$shell_pref = $SHELL_ENUM->{$shell_var};
|
$shell_pref = $SHELL_ENUM->{$shell_var};
|
||||||
}
|
}
|
||||||
|
|
||||||
# printf("checking username %s\n", $username);
|
|
||||||
if(length($username) > 31 || !($username =~ /^[A-Za-z][A-Za-z0-9]+$/)){
|
if(length($username) > 31 || !($username =~ /^[A-Za-z][A-Za-z0-9]+$/)){
|
||||||
printf("%s has an INVALID username\n", $id);
|
printf("%s has an INVALID username\n", $id);
|
||||||
die ("oh no");
|
die ("oh no");
|
||||||
@ -55,24 +54,23 @@ sub fun1($){
|
|||||||
|
|
||||||
system($cmd);
|
system($cmd);
|
||||||
#system("mkdir /home/$username/.ssh");
|
#system("mkdir /home/$username/.ssh");
|
||||||
system("chmod 700 /home/$username/.ssh");
|
#system("chmod 700 /home/$username/.ssh");
|
||||||
system("mv $FULL_PATH/$id.pub /home/$username/.ssh/authorized_keys");
|
system("cat $FULL_PATH/$id.pub > /home/$username/.ssh/authorized_keys");
|
||||||
system("chmod 600 /home/$username/.ssh/authorized_keys");
|
#system("mv $FULL_PATH/$id.pub /home/$username/.ssh/authorized_keys");
|
||||||
system("chown $username:$username /home/$username/.ssh");
|
#system("chmod 600 /home/$username/.ssh/authorized_keys");
|
||||||
system("chown $username:$username /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.ident");
|
||||||
|
system("rm $FULL_PATH/$id.pub");
|
||||||
}
|
}
|
||||||
close FILE;
|
close FILE;
|
||||||
}
|
}
|
||||||
|
|
||||||
fun1("00004");
|
|
||||||
|
|
||||||
die "test 0";
|
|
||||||
|
|
||||||
@g = glob("$FULL_PATH*");
|
@g = glob("$FULL_PATH*");
|
||||||
@g = map { s/.*\/([^\/]*).pub$/$1/; $_ } grep {$_ =~ /pub$/} @g;
|
@g = map { s/.*\/([^\/]*).pub$/$1/; $_ } grep {$_ =~ /pub$/} @g;
|
||||||
|
|
||||||
for my $fn (@g){
|
for my $fn (@g){
|
||||||
printf("%s\n", $fn);
|
create($fn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BIN
static/lainsign.png
Normal file
BIN
static/lainsign.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 129 KiB |
71
static/main_home.css
Normal file
71
static/main_home.css
Normal 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;
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
{%extends "layout.html"%}
|
{%extends "main_layout.html"%}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="home">
|
<div class="home">
|
||||||
<h2>Home</h2>
|
<h2>Home</h2>
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
{%extends "layout.html"%}
|
{%extends "main_layout.html"%}
|
||||||
|
|
||||||
{%block content %}
|
{%block content %}
|
||||||
<div class="home_blurb">
|
<div class="home_blurb">
|
||||||
<p>lingy.in is a public unix / tilde instance for lainchan users</p>
|
<p>lingy.in is a public unix / tilde instance for lainons</p>
|
||||||
<p><b>thread: </b><a href="https://lainchan.org/tech/res/34563.html">https://lainchan.org/tech/res/34563.html</a></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>request an account</p>
|
<p>sign up</p>
|
||||||
|
<p>rules</p>
|
||||||
|
<p>git</p>
|
||||||
<p>users</p>
|
<p>users</p>
|
||||||
<ol>
|
<ol>
|
||||||
<li>gashapwn</li>
|
<li>gashapwn</li>
|
||||||
|
15
templates/main_layout.html
Normal file
15
templates/main_layout.html
Normal 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>
|
Loading…
Reference in New Issue
Block a user