hspsh / whohacks Goto Github PK
View Code? Open in Web Editor NEWWho is at Hackerspace Pomorze?
Home Page: https://whois.at.hsp.sh
License: GNU General Public License v3.0
Who is at Hackerspace Pomorze?
Home Page: https://whois.at.hsp.sh
License: GNU General Public License v3.0
This query should return users in the space 365 days ago, but instead it returns all users and unknown devices from the past 365 days.
https://whois.at.hs3.pl/api/now?days=365
Same applies to 'hours' and 'minutes' parameters.
now it just fails when no user with given username is present in database
The new mikrotik outputs the assigned IP which is nice.
I use whois to assert the network state quite often.
It's a pretty easy fix.
Rzuca 500 gdy coś namiesza się z sesją. Ciasteczka?
The link to log in should not be visible on the main page after logging in.
Użytkownicy powinni mieć możliwość przypisania sobie i urzadzeniom tagi.
Można przypisać dowolny tag.
Log from an instance deployed behind apache2 + mod wsgi:
[Sun Mar 25 21:22:57.287386 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] return self.row_cache[item]
[Sun Mar 25 21:22:57.287397 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] IndexError: list index out of range
[Sun Mar 25 21:22:57.287408 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355]
[Sun Mar 25 21:22:57.287419 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] During handling of the above exception, another exception occurred:
[Sun Mar 25 21:22:57.287431 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355]
[Sun Mar 25 21:22:57.287441 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] Traceback (most recent call last):
[Sun Mar 25 21:22:57.287453 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1982, in wsgi_ap
p
[Sun Mar 25 21:22:57.287464 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] response = self.full_dispatch_request()
[Sun Mar 25 21:22:57.287476 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1614, in full_di
spatch_request
[Sun Mar 25 21:22:57.287488 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] rv = self.handle_user_exception(e)
[Sun Mar 25 21:22:57.287499 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1517, in handle_
user_exception
[Sun Mar 25 21:22:57.287511 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] reraise(exc_type, exc_value, tb)
[Sun Mar 25 21:22:57.287545 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] File "/usr/local/lib/python3.5/dist-packages/flask/_compat.py", line 33, in reraise
[Sun Mar 25 21:22:57.287558 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] raise value
[Sun Mar 25 21:22:57.287569 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1612, in full_dispatch_request
[Sun Mar 25 21:22:57.287581 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] rv = self.dispatch_request()
[Sun Mar 25 21:22:57.287592 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1598, in dispatch_request
[Sun Mar 25 21:22:57.287604 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] return self.view_functions[rule.endpoint](**req.view_args)
[Sun Mar 25 21:22:57.287615 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] File "/home/whois/whois/web.py", line 51, in index
[Sun Mar 25 21:22:57.287626 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] if current_user.is_authenticated:
[Sun Mar 25 21:22:57.287638 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] File "/usr/local/lib/python3.5/dist-packages/werkzeug/local.py", line 347, in __getattr__
[Sun Mar 25 21:22:57.287650 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] return getattr(self._get_current_object(), name)
[Sun Mar 25 21:22:57.287661 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] File "/usr/local/lib/python3.5/dist-packages/werkzeug/local.py", line 306, in _get_current_object
[Sun Mar 25 21:22:57.287673 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] return self.__local()
[Sun Mar 25 21:22:57.287684 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] File "/usr/local/lib/python3.5/dist-packages/flask_login/utils.py", line 26, in <lambda>
[Sun Mar 25 21:22:57.287696 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] current_user = LocalProxy(lambda: _get_user())
[Sun Mar 25 21:22:57.287707 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] File "/usr/local/lib/python3.5/dist-packages/flask_login/utils.py", line 335, in _get_user
[Sun Mar 25 21:22:57.287719 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] current_app.login_manager._load_user()
[Sun Mar 25 21:22:57.287730 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] File "/usr/local/lib/python3.5/dist-packages/flask_login/login_manager.py", line 359, in _load_user
[Sun Mar 25 21:22:57.287742 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] return self.reload_user()
[Sun Mar 25 21:22:57.287753 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] File "/usr/local/lib/python3.5/dist-packages/flask_login/login_manager.py", line 321, in reload_user
[Sun Mar 25 21:22:57.287765 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] user = self.user_callback(user_id)
[Sun Mar 25 21:22:57.287776 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] File "/home/whois/whois/web.py", line 26, in load_user
[Sun Mar 25 21:22:57.287787 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] return User.get_by_id(user_id)
[Sun Mar 25 21:22:57.287799 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] File "/usr/local/lib/python3.5/dist-packages/peewee.py", line 5162, in get_by_id
[Sun Mar 25 21:22:57.287810 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] return cls.get(cls._meta.primary_key == pk)
[Sun Mar 25 21:22:57.287838 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] File "/usr/local/lib/python3.5/dist-packages/peewee.py", line 5151, in get
[Sun Mar 25 21:22:57.287851 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] return sq.get()
[Sun Mar 25 21:22:57.287862 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] File "/usr/local/lib/python3.5/dist-packages/peewee.py", line 5539, in get
[Sun Mar 25 21:22:57.287873 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] (clone.model, sql, params))
[Sun Mar 25 21:22:57.287885 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] whois.database.UserDoesNotExist: <class 'whois.database.User'> instance matching query does not exist:
[Sun Mar 25 21:22:57.287897 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] SQL: SELECT "t1"."id", "t1"."username", "t1"."password", "t1"."display_name", "t1"."flags" FROM "user" AS "t1" WHERE ("t1"."id" = ?) LIMIT 1 OFFSET 0
[Sun Mar 25 21:22:57.287913 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355] Params: [1]
[Sun Mar 25 21:22:57.287965 2018] [wsgi:error] [pid 8653:tid 140129043506944] [remote 192.168.88.149:22355]
[Sun Mar 25 21:22:57.288947 2018] [wsgi:error] [pid 8653:tid 140129043506944] [2018-03-25 21:22:57,288] ERROR in web: <class 'whois.database.User'> instance matching query does not exist:
[Sun Mar 25 21:22:57.288965 2018] [wsgi:error] [pid 8653:tid 140129043506944] SQL: SELECT "t1"."id", "t1"."username", "t1"."password", "t1"."display_name", "t1"."flags" FROM "user" AS "t1" WHERE ("t1"."id" = ?) LIMIT 1 OFFSET 0
[Sun Mar 25 21:22:57.288980 2018] [wsgi:error] [pid 8653:tid 140129043506944] Params: [1]
[Sun Mar 25 21:22:57.289031 2018] [wsgi:error] [pid 8653:tid 140129043506944]
Widoki logowania i rejestracji zrobione na odwal.
https://codepen.io/techhysahil/pen/zxoXWL nie było by złe.
@justdzasta?
Dobrze by było zrobić taką templatkę do ponownego użycia w innych projektach. Np. biblioteki.
Oczywiście można by ją rozszerzyć/podmienić na oauth, ldap.
Problem dotyczy zawartości w kartach. Na pewno na desktopowym firefoxie. Na telefonach chyba nie. Trzeba sprawdzić inne przegladarki. Może problem dot. pobierania czcionek.
It is essential to add some buttons which will redirect user to login view. Maybe best idea is create something like navmenu next to at.hs3.pl "logo"? Like first version of at.hs3.pl front.
It would be nice If owner could add description and custom name to any of their devices to make it clear what each device is doing. There are a bunch of devices with generic host names like ESP* or raspberrypi that should be differentiated.
This requires to either be picky when writing Dockerfile or copying more files than are required
Można zacząć zbierać ilosciową historię aktywności i rysować obecność w czasie.
https://bl.ocks.org/mbostock/4063318
COOO??!
Aktualnie CSS jest zaciągany z bootswatch'a, nie ładnie tak. Ew. znaleźć CDN.
you can parse the first 3 octets to detect the manufacturer of a device. I have a PoC that uses JSON database file to map the MACs to manufacturers.
Also, then you can assign ESP label automatically lel
Osoby łączące się z zewnątrz nie powinny mieć możliwości zarządzania urządzeniami
Będąc zalogowanym nie powinno być możliwości logowania i rejestracji
W sytuacji gdy coś pójdzie nie tak i serwer wyrzuci 500, to następne zapytanie również zwróci 500. Za drugim razem będzie to z powodu nadal otwartego połączenia z bazą.
https://github.com/not7cd/whois/blob/01eb2fdba226d3899312962788ef651fe636773c/whois/web.py#L31
Urządzenia otagowane jako hidden
nie są brane pod uwagę.
Urządzenia otagowane jako esp
nie są wliczone do osób.
Użytkownicy otagowani jako hidden
nie są brani pod uwagę.
Użytkownicy otagowani jako anonymous
nie wyświetlają się, ale podliczają się.
Albo oauth, nie chcę trzymać tutaj haseł
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.