Smile Bank to Ledger

Check-in [04f262a3df]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Use highline for secure data entry¬
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 04f262a3dffb0a5cb63792e009dcd2982006d6cd
User & Date: atomicules 2015-07-21 08:51:48
Context
2015-07-21
09:26
Report out available balance as well check-in: dae330504e user: atomicules tags: trunk
08:51
Use highline for secure data entry¬ check-in: 04f262a3df user: atomicules tags: trunk
2015-07-10
22:40
Fixes as a result of merge check-in: 35fcf527ec user: atomicules tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to smile.rb.

1
2
3

4
5
6
7
8
9
10
..
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
require 'optparse'
require 'mechanize'
require 'nokogiri'


optparse = OptionParser.new do |opts|
	opts.on('-d', '--date DATE', "Date") { |d| Date_back = d }
end
optparse.parse!

class Smile
................................................................................


	#All these private
	def logon_start
		page = @a.get("https://banking.smile.co.uk/SmileWeb/start.do")
		#Since dealing with sensitive logon data don't want to get it from anywhere apart from keyboard input
		#Sortcode and Account number login
		puts "Enter sortcode"
		sortCode = gets.strip
		puts "Enter Account number"
		accountNumber = gets.strip
		page.form.sortCode = sortCode
		page.form.accountNumber = accountNumber
		page = page.form.submit
	end


	def logon_passcode
		#Requires
		page = logon_start
		#Passcode login
		doc = Nokogiri::HTML(page.body)
		puts doc.xpath("//label")[0].text
		page.form.firstPassCodeDigit = gets.strip
		puts doc.xpath("//label")[1].text
		page.form.secondPassCodeDigit = gets.strip
		page = page.form.submit
	end


	def logon_other
		#requires
		page = logon_passcode
		#Other logon details
		page.form.fields.each do |field|
			unless field.type == "hidden"
				puts field.name
				field.value = gets.strip
			end
		end
		page = page.form.submit
	end


	def logon_bulletin



>







 







|
<
|
<











<
|
<
|










<
|







1
2
3
4
5
6
7
8
9
10
11
..
28
29
30
31
32
33
34
35

36

37
38
39
40
41
42
43
44
45
46
47

48

49
50
51
52
53
54
55
56
57
58
59

60
61
62
63
64
65
66
67
require 'optparse'
require 'mechanize'
require 'nokogiri'
require 'highline/import'

optparse = OptionParser.new do |opts|
	opts.on('-d', '--date DATE', "Date") { |d| Date_back = d }
end
optparse.parse!

class Smile
................................................................................


	#All these private
	def logon_start
		page = @a.get("https://banking.smile.co.uk/SmileWeb/start.do")
		#Since dealing with sensitive logon data don't want to get it from anywhere apart from keyboard input
		#Sortcode and Account number login
		sortCode = ask("Enter sortcode") { |a| a.echo = "*" }

		accountNumber = ask("Enter Account number") { |a| a.echo = "*" }

		page.form.sortCode = sortCode
		page.form.accountNumber = accountNumber
		page = page.form.submit
	end


	def logon_passcode
		#Requires
		page = logon_start
		#Passcode login
		doc = Nokogiri::HTML(page.body)

		page.form.firstPassCodeDigit = ask(doc.xpath("//label")[0].text) { |a| a.echo = "*" }

		page.form.secondPassCodeDigit = ask(doc.xpath("//label")[1].text) { |a| a.echo = "*" }
		page = page.form.submit
	end


	def logon_other
		#requires
		page = logon_passcode
		#Other logon details
		page.form.fields.each do |field|
			unless field.type == "hidden"

				field.value = ask(field.name) { |a| a.echo = "*" }
			end
		end
		page = page.form.submit
	end


	def logon_bulletin