Skip to content

Commit

Permalink
modification de key pour windob
Browse files Browse the repository at this point in the history
  • Loading branch information
sl4shme committed Oct 10, 2013
1 parent 8213c93 commit 843c5fc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 44 deletions.
38 changes: 22 additions & 16 deletions key/key.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,32 @@
import os, re

print "This isn't even the pre-pre-alpha phase, please don't attack this server."
print "Provide your ssh publikey (RSA 2048 bits):"

entry = str(raw_input())
if entry[0:7] == "ssh-rsa":
entry = entry[8:]
key = entry[:372]

if len(key) != 372:
print "Bad key."
quit()

if re.match("^[A-Za-z0-9+/]*$", key):
line = "sudo /sschat/key/keycat.sh '"+key+"'"
os.system(line)
else:
print "Bad key."
quit()
ok=False
while ok == False :
print "Paste your one-line ssh publikey (RSA 2048 bits):"
entry = str(raw_input())
if entry[0:7] == "ssh-rsa":
entry = entry[8:]
key = entry[:372]

if len(key) != 372:
print "Bad key."
continue

if re.match("^[A-Za-z0-9+/]*$", key):
line = "sudo /sschat/key/keycat.sh '"+key+"'"
os.system(line)
ok=True
else:
print "Bad key."
continue

print "\n\n Congratulations!"
print "You can now connect to the user sschat."
print "For now, you'll most likely find people in the channel : plop "
print "\n\nPlease note that this server will not keep any trace of anything but your publikey."
print "Please remember that this service comes with NO FUCKING GUARANTEE"
print "\nEnter to quit."
raw_input()
quit()
28 changes: 0 additions & 28 deletions key/kk

This file was deleted.

0 comments on commit 843c5fc

Please sign in to comment.