diff --git a/SSH/PAM/rublonPam.so b/SSH/PAM/rublonPam.so deleted file mode 100644 index e26af1c..0000000 Binary files a/SSH/PAM/rublonPam.so and /dev/null differ diff --git a/SSH/PAM/src/coreHandler.c b/SSH/PAM/src/coreHandler.c index 82d1510..e71bee0 100644 --- a/SSH/PAM/src/coreHandler.c +++ b/SSH/PAM/src/coreHandler.c @@ -68,15 +68,28 @@ char *parseJson(char source[], char name[] ) { void printQr(const uint8_t qrcode[],pam_handle_t *pamh) { char *qrCodeString = ""; + char *white = "\u2588\u2588"; + char *black = " "; int size = qrcodegen_getSize(qrcode); int border = 1; int y; + //additional line above + for(y = -border; y < size + border + 2; y++){ + asprintf(&qrCodeString,"%s%s", qrCodeString, white); + } + asprintf(&qrCodeString,"%s%s", qrCodeString, "\n"); for(y = -border; y < size + border; y++) { int x; + asprintf(&qrCodeString,"%s%s",qrCodeString,white); for(x = -border; x < size + border; x++) - asprintf(&qrCodeString,"%s%s",qrCodeString,qrcodegen_getModule(qrcode, x, y) ? " " : "\u2588\u2588"); + asprintf(&qrCodeString,"%s%s",qrCodeString,qrcodegen_getModule(qrcode, x, y) ? black : white); + asprintf(&qrCodeString,"%s%s",qrCodeString,white); asprintf(&qrCodeString,"%s%s",qrCodeString,"\n"); } + //additional line below + for(y = -border; y < size + border + 2; y++){ + asprintf(&qrCodeString,"%s%s", qrCodeString, white); + } asprintf(&qrCodeString,"%s%s",qrCodeString,"\n"); pam_prompt(pamh, PAM_TEXT_INFO, NULL, "%s",qrCodeString); diff --git a/Vagrantfile b/Vagrantfile index 6d94568..318a8dd 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -86,8 +86,8 @@ Vagrant.configure("2") do |config| make selinux make install - useradd -s /bin/bash -m kwa - echo "kwa:kwa"|chpasswd + useradd -s /bin/bash -m psz + echo "psz:psz"|chpasswd grep -q -e '#auth substack password-auth' /etc/pam.d/sshd || sed -i -e 's/auth substack password-auth/#auth substack password-auth/g' /etc/pam.d/sshd grep -q -e 'auth requisite pam_unix.so' /etc/pam.d/sshd || sed -i '\$aauth requisite pam_unix.so' /etc/pam.d/sshd @@ -96,6 +96,6 @@ Vagrant.configure("2") do |config| service sshd restart - #vagrant ssh -p -- -l kwa + #vagrant ssh -p -- -l psz SHELL end