Android Example JRC2 - Home banking coordinates card (open)

ocalle

Active Member
Licensed User
Hello, excited to share my humble code, which can be used as a two-factor authentication or a secondary login. For this take as an example the use of the bank coordinates card, which allows you to use two coordinates to access the application. It is based on the example of Erel's JRC2 remote connector. It is open without security for you to test it. Attached to this are two security tips for securing the MYSQL hacker database. The users can receive in electronic form by mail a new card of coordinates to access every x time. On the other hand in the application the coordinates change every time the application is executed.

Two tips for fix, one is to add a routine that does not allow matches between the two coordinates, the same works if it has the same letters.
and a checkbox that defines the time of use of the same so as not to tire the user.

B4a
In the edittext status show the return of coordinate numbers, u need compare and if are ok u are enabled.

Source from:
https://www.b4x.com/android/forum/t...ation-of-rdc-remote-database-connector.61801/

Home Banking Card coordinates


Not less important is the use of procedures stored in the MYSQL server, which boosts the mobile application, can also be used server time functions, who entered etc etc. etc.
With stored procedure u can do unlimited operations with the mobile. Call routines and so on.




In one computer u need run the server, the config txt and the mysql server as show in Erel´s example.

B4X:
#Lines starting with '#' are comments.
#Backslash character at the end of line means that the command continues in the next line.

#DATABASE CONFIGURATION
DriverClass=com.mysql.jdbc.Driver
JdbcUrl=jdbc:mysql://localhost/ocalle?characterEncoding=utf8
User=root
Password=
#Java server port
ServerPort=17178

#example of MS SQL Server configuration:
#DriverClass=net.sourceforge.jtds.jdbc.Driver
#JdbcUrl=jdbc:jtds:sqlserver://<server address>/<database>

#example of postegres configuration:
#JdbcUrl=jdbc:postgresql://localhost/test
#DriverClass=org.postgresql.Driver

#SQL COMMANDS
sql.create_table=CREATE TABLE IF NOT EXISTS animals (\
     id INTEGER PRIMARY KEY AUTO_INCREMENT,\
     name CHAR(30) NOT NULL,\
     image BLOB)
sql.insert_animal=INSERT INTO animals VALUES (null, ?,?)
sql.select_animal=SELECT name, image, id FROM animals WHERE id = ?;
sql.create_table=CREATE TABLE article (col1 numeric(10,4) ,col2 text);
sql.select=select * from article
sql.select_coord=Select * FROM coordenadas
# Stored procedures and functions
sql.select_xcol=call callxy(?)
slq.select_time=call mytimeserver (null)
stored.png


[For Mysql Security]
I was close 3306 port cuz is on the same app server b4j computer, the app send the request locally.

and this code to avoid the hackers if you need get the MYSQL server in remote.

http://www.abelcanada.com/securemysql.php

Well expect that work as me. Attached are

Server B4j, B4a Example , Config and ocalle database [ Check if you need recreate the stored procedure]
In coord table i load the coordinates card with the number to example

Thanks and expect be useful
 

Attachments

GMan

Well-Known Member
Licensed User
Seems that someting gone wrong with some picture
 

ocalle

Active Member
Licensed User
Seems that someting gone wrong with some picture
The pictures are loaded below, the coordinate card and the mysql phpmyadmin
 
Top