diff --git a/Dockerfile b/Dockerfile index 24ea3d2..0dd6d9e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,11 +11,12 @@ RUN \ apt-get update && \ apt-get upgrade -y && \ apt-get install -y software-properties-common python-software-properties && \ - apt-get install -y python-requests python-lxml python-flask python-flask-login python-misaka python-tz python-mysqldb python-psycopg2 python-requests-oauthlib + apt-get install -y python-pip python-requests python-lxml python-flask python-flask-login python-misaka python-tz python-mysqldb python-psycopg2 python-requests-oauthlib RUN add-apt-repository -y ppa:oly/ppa RUN apt-get update RUN apt-get install -y python-scaffold +RUN pip install gocardless ADD site /var/www/ diff --git a/site/authorize.py b/site/authorize.py index 86f385a..9847ce1 100644 --- a/site/authorize.py +++ b/site/authorize.py @@ -108,8 +108,17 @@ def auth_required(): def register_form(): header('Register for access') web.page.create('Register for access') - web.page.section(web.register_form.create().render()) + #~ web.page.section(web.register_form.create().render()) + + web.form.create('Register new user account', '/register') + web.form.append(name='name', label='Your full name', placeholder='Ralf Green', value='') + web.form.append(name='email', label='Valid Email', placeholder='ralf@maidstone-hackspace.org.uk', value='') + web.form.append(input_type='password', name='password', label='Password', placeholder='quick brown fox jumped over', value='') + web.form.append(input_type='password', name='password_confirm', label='Password Confirm', placeholder='quick brown fox jumped over', value='') + + web.page.section(web.form.render()) web.template.body.append(web.page.render()) + return make_response(footer()) @authorize_pages.route("/register", methods=['POST']) @@ -155,6 +164,7 @@ def oauth(provider=None): os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1' print session + print provider if provider: oauth_session = OAuth2Session( oauth_provider.get('client_id'), @@ -168,9 +178,10 @@ def oauth(provider=None): oauth_provider.get('auth_uri'), access_type=oauth_access_type, approval_prompt=oauth_approval_prompt) - + print state # State is used to prevent CSRF, keep this for later, make sure oauth returns to the same url. session['oauth_state'] = state + session.modified = True return redirect(authorization_url) print session @@ -365,7 +376,6 @@ def login_screen_submit(): @authorize_pages.route("/logout") -@login_required def logout(): logout_user() return redirect('/') diff --git a/site/config/settings.py b/site/config/settings.py index 699c949..2619b73 100644 --- a/site/config/settings.py +++ b/site/config/settings.py @@ -32,6 +32,7 @@ oauth_conf = { gocardless_enviroment = 'sandbox' +gocardless_redirect_uri = 'https://test.maidstone-hackspace.org.uk' gocardless_credentials = { 'app_id': '', 'app_secret': '', diff --git a/site/constants.py b/site/constants.py index e413552..8c8eb38 100644 --- a/site/constants.py +++ b/site/constants.py @@ -3,6 +3,7 @@ page_menu = [ ('Home', '/'), #('Competition', '/competition'), ('Chat', '/chat'), + ('Donate', '/donate'), ('Contact', '#mailing-list-signup')] banner_images = [ diff --git a/site/generate.py b/site/generate.py index 1731b2d..5cdbbb1 100644 --- a/site/generate.py +++ b/site/generate.py @@ -6,7 +6,8 @@ import argparse sys.path.append(os.path.abspath('../../../scaffold/')) sys.path.insert(0,os.path.abspath('../../../scaffold/')) -from scaffold import www +from scaffold import web +web.load_widgets('widgets') from libs.rss_fetcher import feed_reader @@ -16,6 +17,9 @@ from pages import web from pages import header, footer from pages import blog from pages import competition +from pages import donate + +from config.settings import * def examples(): @@ -41,6 +45,7 @@ if __name__ == "__main__": ('pages.homepage', 'index', 'index.html'), ('pages.blog', 'index', 'blog.html'), ('pages.chat', 'index', 'chat.html'), + ('pages.donate', 'index', 'donate.html'), ('pages.competition', 'index', 'competition.html')) args = parser.parse_args() diff --git a/site/html/blog.html b/site/html/blog.html index 1cb8585..6e9d2bc 100644 --- a/site/html/blog.html +++ b/site/html/blog.html @@ -4,6 +4,9 @@
+ + + @@ -11,13 +14,14 @@ - + @@ -25,16 +29,15 @@Following a recent discussion I had with a university dive club member about a request to remove a back-link from a now dead forum from a travel insurance company, I thought I’d take this opportunity to delve into the mystical … Continue reading
As anyone who has used the Arduino IDE over time will tell you, this crappy piece of software has barely changed since the Arduino first surfaced. It has no autocompletion, […]
Example application mixing gtk, opengl and touch, written as a demo but also as an opengl testing enviroment.
This is a great script for obtaining the metainfo contained within torrent files. Due to the encoding used, keyword searches conducted during computer forensic analysis may not return any results when analyzing these types of files. This ruby script decodes the torrent, allowing an examiner to view the contained information, such as tracker list, file names, file sizes, directories, MD5 sum, etc. Credit goes to Rob Williams for creating this, all I did was alter the Bencoding Library, as I was unable to get the original to function. Hopefully you'll find this as useful as I did!
Also known as “When responsible disclosure gets you no-where, make them listen by going public” but it didn’t have such a good ring to it. So, to the meat of the business. I have a Nokia Lumia 920 which a … Continue reading
I was sent a link to to the following great article on power saving techniques for microprocessors and in particular the ATMEga328P which is the chip used in the Arduino. […]
Kivy example on setting up and displaying a basic triangle
After a couple of requests from members on Forensic Focus, I've updated this script so that profiles can be accessed / extracted via Twitter's API update 1.1. I had converted the original script into an executable which was available for download on SourceForge, however since the API now requires authentication, I don't like the idea of packaging my own API keys into this. All this means is that you will require your own API keys, which you can create at Twitter's Application management page.
It would seem that everyone and their dog are getting their own Quadcopter or quadrotor (often misreported in the media as a drone, but that’s another story). A recent build day ran by Reading Hackspace allowed me to jump into their … Continue reading
So i’ve obtained some ESP8266 WiFi modules lately and have been having a play with them. If you’ve not heard of the ESP8266 they are tiny serial controlled WiFi modules […]
Kivy example drawing a square and loading an image and applying to the quad as a simple texture.
A little experiment script I cobbled together for live incident tracking over Twitter, very useful for identifying, and evidencing signs of racism or death threats towards others. If the scenario requires it, geo data can be included in the capture, along with tweet source which identifies how the tweet was made either via a mobile device or a web browser. Also quite handy if and when exhibits need to be seized, and you need to narrow down what device the tweets were made from.
Occasionally you may find that a notable Twitter profile may remove tweets, or be shut down before preservation can be initiated by the forensic examiner. Should this be the case, you may be required to refer to caching services such as Google Cache or Twicsy for example. I recently had need to evidence data found on Twicsy, however the web interface isn't exactly forensic friendly when it comes to how it displays the data. Twicsy.com is a Twitter picture search engine, which appears to duplicate the original textual data from a tweet containing an image, and stores this information on their own web server. The image from a tweet is simply referred to from the source, and if the tweet is deleted or the profile removed, you'll find the image won't exist any more. However the textual data does still remains on Twicsy's website despite the original tweet not existing. After discovering this I wrote a ruby script to extract each of the archived tweets and place it into a format which is readable.
Since my last attempt at using an ESP8266 to get the date and time from the internet I’ve tried out another module, this time with the NodeMCU firmware. This is […]
Kivy example on setting up a display and drawing a basic triangle
In October last year, I got the opportunity to build a RepRap Huxley pro 3D printer for a community crafts centre based in Ashford, Kent. The craft centre wanted a means to demonstrate to its hub of artists how to incorporate new technologies such as 3D printing into their studio work, to create never before seen creations. By building the Huxley it provided me the confidence to build my own 3D printer, which in a series of posts I'm going to discuss further.
I’ve resurrected the Sensor Node project and I am experimenting in reducing the power consumption even further. This time I’ve removed the 3.3v voltage regulator from the circuit and I’ve […]
Short review of "OpenGL ES 3.0 programming guide"
Sorry for it being such a long time since my last post. I have been so busy with other non-Arduino related things that I’ve barely had time to update the […]
Kivy example draw two cubes with different shaders and vertices so they can be moved seperately.
So, here is my first video for The Arduino Academy. This lesson will introduce you to the #Arduino, tell you what an Arduino is and what you can use it […]
Simple example on how to setup, connect to and trigger signals.
So I present to you Lesson 2 from The Arduino Academy – Basic Outputs: Look out for further lessons: Lesson 3 – Basic Inputs (Digital) Lesson 4 – Basic Inputs […]
OpenGL program that does pixel shading, OpenGL pixels with size and textures often used for particle effects.
Crikey, nearly 3 weeks since my last post. Apologies if you’ve been waiting on part 3 of The Arduino Academy, but I’ve got slightly sidetracked lately with several things. Firstly, […]
Short review of "From Mathematics to Generic Programming"
My FLiR Lepton Thermal Camera Module has finally arrived from the USA. I managed to hook it up to my Raspberry Pi yesterday and successfully receive thermal images from it. The […]
Howto create a new project and push it to launchpad.
Populate a listbox with custom widgets, in this case an example file downloader.
Using launchpad we will create a ppa which will automatically generate your package from the standard debian packaging files.
Howto get a list of open windows and there titles.
This example shows how to get properties and use atoms.
Debugging XCB and catching errors and exploring the library.
Query available extensions and checking for availability.
Short review of "App Accomplished"
Example on detecting screen sizes and number of screens in a multi head setup.
Example on creating new window and attaching them to the root window.
Example demonstrating handling X mouse events.
Example demonstrating handling X keybaord events.
Using X build a desktop, learn to package and deploy it and create a login screen.
Short review of "Effective Python"
Simple extended dir function for inspecting xcb.
Helper class which will load in a png and convert it ready for display in a X window.
This is a helper class to split an area up into increasingly smaller areas.
Occasionally you may find that a notable Twitter profile may remove tweets, or be shut down before preservation can be initiated by the forensic examiner. Should this be the case, you may be required to refer to caching services such as Google Cache or Twicsy for example. I recently had need to evidence data found on Twicsy, however the web interface isn't exactly forensic friendly when it comes to how it displays the data. Twicsy.com is a Twitter picture search engine, which appears to duplicate the original textual data from a tweet containing an image, and stores this information on their own web server. The image from a tweet is simply referred to from the source, and if the tweet is deleted or the profile removed, you'll find the image won't exist any more. However the textual data does still remains on Twicsy's website despite the original tweet not existing. After discovering this I wrote a ruby script to extract each of the archived tweets and place it into a format which is readable.
Following a recent discussion I had with a university dive club member about a request to remove a back-link from a now dead forum from a travel insurance company, I thought I’d take this opportunity to delve into the mystical … Continue reading
As anyone who has used the Arduino IDE over time will tell you, this crappy piece of software has barely changed since the Arduino first surfaced. It has no autocompletion, […]
Kivy example on setting up and displaying a basic triangle
In October last year, I got the opportunity to build a RepRap Huxley pro 3D printer for a community crafts centre based in Ashford, Kent. The craft centre wanted a means to demonstrate to its hub of artists how to incorporate new technologies such as 3D printing into their studio work, to create never before seen creations. By building the Huxley it provided me the confidence to build my own 3D printer, which in a series of posts I'm going to discuss further.
Also known as “When responsible disclosure gets you no-where, make them listen by going public” but it didn’t have such a good ring to it. So, to the meat of the business. I have a Nokia Lumia 920 which a … Continue reading
I was sent a link to to the following great article on power saving techniques for microprocessors and in particular the ATMEga328P which is the chip used in the Arduino. […]
Kivy example drawing a square and loading an image and applying to the quad as a simple texture.
It would seem that everyone and their dog are getting their own Quadcopter or quadrotor (often misreported in the media as a drone, but that’s another story). A recent build day ran by Reading Hackspace allowed me to jump into their … Continue reading
So i’ve obtained some ESP8266 WiFi modules lately and have been having a play with them. If you’ve not heard of the ESP8266 they are tiny serial controlled WiFi modules […]
Kivy example on setting up a display and drawing a basic triangle
Over the past few weeks, I have been ‘secretly’ unfollowing people on my Facebook feed that re-post or share click-bait posts or wildly unbelievable posts. However, I have noticed that I am rapidly shedding ‘friends’ so I thought this would … Continue reading
Since my last attempt at using an ESP8266 to get the date and time from the internet I’ve tried out another module, this time with the NodeMCU firmware. This is […]
Short review of "OpenGL ES 3.0 programming guide"
I’ve resurrected the Sensor Node project and I am experimenting in reducing the power consumption even further. This time I’ve removed the 3.3v voltage regulator from the circuit and I’ve […]
Kivy example draw two cubes with different shaders and vertices so they can be moved seperately.
Sorry for it being such a long time since my last post. I have been so busy with other non-Arduino related things that I’ve barely had time to update the […]
Simple example on how to setup, connect to and trigger signals.
So, here is my first video for The Arduino Academy. This lesson will introduce you to the #Arduino, tell you what an Arduino is and what you can use it […]
OpenGL program that does pixel shading, OpenGL pixels with size and textures often used for particle effects.
So I present to you Lesson 2 from The Arduino Academy – Basic Outputs: Look out for further lessons: Lesson 3 – Basic Inputs (Digital) Lesson 4 – Basic Inputs […]
Short review of "From Mathematics to Generic Programming"
Crikey, nearly 3 weeks since my last post. Apologies if you’ve been waiting on part 3 of The Arduino Academy, but I’ve got slightly sidetracked lately with several things. Firstly, […]
Howto create a new project and push it to launchpad.
My FLiR Lepton Thermal Camera Module has finally arrived from the USA. I managed to hook it up to my Raspberry Pi yesterday and successfully receive thermal images from it. The […]
Populate a listbox with custom widgets, in this case an example file downloader.
Using launchpad we will create a ppa which will automatically generate your package from the standard debian packaging files.
Howto get a list of open windows and there titles.
This example shows how to get properties and use atoms.
Debugging XCB and catching errors and exploring the library.
Query available extensions and checking for availability.
Short review of "App Accomplished"
Example on detecting screen sizes and number of screens in a multi head setup.
Example on creating new window and attaching them to the root window.
Example demonstrating handling X mouse events.
Example demonstrating handling X keybaord events.
Using X build a desktop, learn to package and deploy it and create a login screen.
Short review of "Effective Python"
Simple extended dir function for inspecting xcb.
Helper class which will load in a png and convert it ready for display in a X window.
This is a helper class to split an area up into increasingly smaller areas.