macdev
quadrismegistus 4 years ago
parent 14f986a025
commit 0e6d1d514b

5
.gitignore vendored

@ -8,4 +8,7 @@ venv
sto.dat
p2p/kademlia0
cache.sqlite
dbm.*
dbm.*
.DS_Store
.vscode/
.vscode/settings.json

@ -1,3 +1,2 @@
{
"python.pythonPath": "venv/bin/python"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

@ -5,7 +5,7 @@ HORIZONTAL = False #random.choice([True,True,True,False])
FACTOR=1
WINDOW_SIZE = (1136*FACTOR,640*FACTOR) if HORIZONTAL else (640*FACTOR,1136*FACTOR)
WINDOW_SIZE=1111,1111
WINDOW_SIZE=800,800
BG_IMG='assets/bg-brown.png'
@ -55,7 +55,7 @@ bone=217, 202, 179
bronze=188, 128, 52
shadow=140, 122, 107
orangered=194, 3, 3
dutchwhite=229,219,181
# black=(0,0,0)
black=15, 15, 15 #5, 8, 13
@ -130,4 +130,5 @@ else:
COLOR_CARD = bone
COLOR_CARD_BORDER = COLOR_CARD
COLOR_ICON=COLOR_LOGO
COLOR_ACCENT = huntergreen

@ -4,12 +4,6 @@
from config import *
# monkeypatching the things that asyncio needs
import subprocess
subprocess.PIPE = -1 # noqa

@ -1 +1,2 @@
python3 watcher.py
python watcher.py
#python main.py

@ -10,7 +10,7 @@
#:import COLOR_TEXT main.COLOR_TEXT
#:import COLOR_CARD main.COLOR_CARD
#:import COLOR_CARD_BORDER main.COLOR_CARD_BORDER
#:import COLOR_ACCENT main.COLOR_ACCENT
<LoginBoxLayout>:
id: loginbox
@ -42,16 +42,29 @@
# spacing:'100sp'
# md_bg_color:1,1,0,1
<WelcomeLabel>:
text: 'Enter, Komrade'
halign: 'center'
size_hint_x: 1
theme_text_color: 'Custom'
color: rgb(*COLOR_ACCENT)
adaptive_width: True
# size_hint:0.333,None
# md_bg_color:rgb(*COLOR_TEXT)
# pos_hint: {'y':1}
halign:'center'
<UsernameLabel>:
theme_text_color: 'Custom'
text_color: rgb(*COLOR_TEXT)
# width:'100sp'
adaptive_width: True
size_hint:None,None
size_hint:0.333,None
# md_bg_color:rgb(*COLOR_TEXT)
# pos_hint: {'y':1}
halign:'center'
@ -69,8 +82,8 @@
current_hint_text_color: rgb(*COLOR_TEXT)
error_color:rgb(*COLOR_TEXT)
pos_hint: {'center_x':0.5,'y':0.2}
size_hint:0.8,None
font_size:'24sp'
size_hint:0.666,None
font_size:'2dp'
@ -89,7 +102,7 @@
current_hint_text_color: rgb(*COLOR_TEXT)
text_color: rgb(*COLOR_TEXT)
pos_hint: {'center_x':0.5,'y':0.2}
size_hint:0.8,None
size_hint:0.666,None
<LoginButtonLayout>:
id: buttonbox

@ -3,7 +3,8 @@ from kivymd.uix.boxlayout import MDBoxLayout
from kivymd.uix.textfield import MDTextField
from kivymd.uix.button import MDRectangleFlatButton
from kivymd.uix.label import MDLabel
from main import MyLabel,rgb,COLOR_TEXT
from kivy.uix.label import Label
from main import MyLabel,rgb,COLOR_TEXT,COLOR_ICON,COLOR_ACCENT
class LoginBoxLayout(MDBoxLayout): pass
class LoginButtonLayout(MDBoxLayout): pass
@ -15,6 +16,7 @@ class LoginStatus(MDLabel): pass
class UsernameLayout(MDBoxLayout): pass
class UsernameLabel(MDLabel): pass
class WelcomeLabel(MDLabel): pass
class LoginScreen(BaseScreen):
#def on_pre_enter(self):
@ -25,13 +27,16 @@ class LoginScreen(BaseScreen):
#log(self.ids)
#log('hello?')
self.layout = LoginBoxLayout()
self.label_title = MDLabel(text='Enter, Komrade',halign='center',size_hint_x=1)
self.label_title = WelcomeLabel()
self.label_title.font_name='assets/font.otf'
self.label_title.font_size='20sp'
# self.label_title.font_size='20sp'
self.label_title.bold=True
self.label_title.markup=True
self.label_title.color=rgb(*COLOR_TEXT)
self.label_title.font_size*=1.5
self.layout.add_widget(self.label_title)
self.label_username = UsernameLabel(text="username:")
self.layout_username = UsernameLayout()
self.label_username = UsernameLabel(text="username:")
@ -80,8 +85,11 @@ class LoginScreen(BaseScreen):
self.layout.add_widget(self.login_status)
self.label_password.font_size='18sp'
self.label_username.font_size='18sp'
self.label_password.font_size=32
self.label_username.font_size=32
self.login_button.font_size=22
self.register_button.font_size=22
## add all

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Svg Vector Icons : http://www.onlinewebfonts.com/icon -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata>
<g><g transform="matrix(1 0 0 -1 0 800)"><path d="M504.7,313.8c25.2,13.1,36.8,33.5,34.6,61.4c-2.2,27.8-13.7,50.9-34.6,69.2c-30.5,23.5-64.2,30.7-101.2,21.5c-37-9.1-65.1-30.7-84.2-64.6c-24.4-45.3-30.5-87.9-18.3-127.9c12.2-40,37.9-73.5,77-100.5c39.2-27,81.4-39.6,126.6-37.9c71.4,5.2,126.8,38.1,166.4,98.6c39.6,60.5,51.1,125.5,34.6,195.2c-18.3,80.1-64.2,139-137.7,176.9s-149,44.2-226.5,18.9c-69.6-20.9-124.7-63.5-165.1-127.9c-40.5-64.4-58.1-134-52.9-208.9c7.8-80.9,39.8-151.2,95.9-210.8c56.1-59.6,123.8-96.4,203-110.3C499.1-47.3,573.3-38.2,645.1-6c71.8,32.2,128.1,80.9,169,146.2c43.5,68.7,65.3,137.5,65.3,206.2c0,13.9,6.1,26.3,18.3,37.2c12.2,10.9,26.1,15,41.8,12.4c20,0,33.9-8,41.8-24.1c7.8-16.1,10.4-33.7,7.8-52.9C977.7,190.3,922.9,80.2,824.5-11.2c-98.3-91.4-212.3-137.1-342-137.1c-62.7,0-123.1,12.6-181.4,37.9C242.8-85.2,193-51.4,151.6-9.2C110.3,33,76.4,81.7,49.8,137C23.3,192.2,10,250.1,10,310.6S22.6,432.2,47.9,494c33.1,71.4,82.2,129.2,147.5,173.6c65.3,44.4,133.1,70.5,203.6,78.3c70.5,7.8,140.3-3.9,209.5-35.2c69.2-31.3,123.4-81.8,162.5-151.4c40.9-67,57.2-141.2,49-222.6s-40.7-150.3-97.2-206.9c-54.8-54.8-121.8-86.2-201-94c-79.2-7.8-151.9,10.9-218,56.1c-61.8,44.4-99.2,104.9-112.3,181.4c-13.1,76.6,4.4,146.6,52.2,210.2c30.5,40.9,70.7,69,120.7,84.2c50,15.2,99.4,14.4,148.2-2.6c48.7-17,86.2-48.1,112.3-93.3c14.8-25.2,22.4-54.2,22.8-86.8c0.4-32.6-5.2-62.9-17-90.7c-11.7-27.8-30.5-50.5-56.1-67.9C548.9,209,520,202,487.8,205.5c-45.3,0-81.6,19.1-109,57.4s-28.9,77-4.6,116.2c17.4,23.5,39.6,33.7,66.6,30.7c27-3,46.6-15,58.7-35.9c3.5-13.1,5.7-24.6,6.5-34.6c0.9-10,0.9-16.8,0-20.2L504.7,313.8z"/></g></g>
</svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

@ -1,48 +0,0 @@
from torpy import TorClient
import json,requests
import struct
#hostname = 'ifconfig.me' # It's possible use onion hostname here as well
#port = 80
#hostname = 'komrades.net'
hostname = '128.232.229.63'
port = 5555
def try_torpy():
from torpy.http.requests import TorRequests
with TorRequests() as tor_requests:
with tor_requests.get_session() as s:
#with requests.Session() as s:
#res = s.get('http://'+hostname+':'+str(port) + '/api/followers/MrY')
#print(json.loads(res.text))
res = s.get('http://'+hostname+':'+str(port))
print(res,res.text)
def try_proxy():
import requests
def get_tor_session():
session = requests.session()
# Tor uses the 9050 port as the default socks port
session.proxies = {'http': 'socks5://127.0.0.1:9050',
'https': 'socks5://127.0.0.1:9050'}
return session
# Make a request through the Tor connection
# IP visible through Tor
session = get_tor_session()
print(session.get("http://"+hostname+':'+str(port)).text)
# Above should print an IP different than your public IP
# Following prints your normal public IP
print(session.get("http://ifconfig.me").text)
try_proxy()
#try_torpy()

@ -13,7 +13,7 @@ def run_command():
p = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE)
class Watcher:
DIRECTORY_TO_WATCH = os.path.join(os.path.expanduser('~'),"/github/Komrade/")
DIRECTORY_TO_WATCH = '.' #os.path.join(os.path.expanduser('~'),"/github/Komrade/")
def __init__(self):
self.observer = Observer()
@ -39,6 +39,7 @@ class Handler(FileSystemEventHandler):
if '/cache/' in str(event.src_path): return None
if '__pycache__' in str(event.src_path): return None
if 'sto.dat' in str(event.src_path): return None
if '/dbm.' in str(event.src_path): return None
if event.is_directory:
return None

@ -1,21 +1,30 @@
astroid==2.4.2
certifi==2020.6.20
cffi==1.14.2
chardet==3.0.4
cryptography==3.0
docutils==0.16
idna==2.10
kademlia==2.2.1
Kivy==1.11.1
isort==5.4.2
Kivy @ git+http://github.com/kivy/kivy@f34c43f235f35767ed04765a90d68b23807436ba
Kivy-Garden==0.1.4
kivymd==0.104.1
lazy-object-proxy==1.4.3
mccabe==0.6.1
numpy==1.19.1
pathtools==0.1.2
Pillow==7.2.0
plyer==1.4.3
pycparser==2.20
Pygments==2.6.1
pylint==2.6.0
requests==2.24.0
rpcudp==4.0.1
six==1.15.0
sqlitedict==1.6.0
toml==0.10.1
typed-ast==1.4.1
u-msgpack-python==2.7.0
urllib3==1.25.10
watchdog==0.10.3
wrapt==1.12.1

Loading…
Cancel
Save