Pidgin/finch Password Fetcher

  • Uploaded by: Frank
  • 0
  • 0
  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Pidgin/finch Password Fetcher as PDF for free.

More details

  • Words: 215
  • Pages: 2
#!/usr/bin/perl # 'perl pwget -h' for help # To execute with './', type 'sudo chmod a+x pwget' # This program only shows saved passwords. If an account has no # saved passwords, then it won't show. # Created by Franc using Perl5. use strict 'vars'; use Term::ANSIColor; my $h = @ARGV[0] eq '-h'; shift @ARGV if $h; if($h) { print color 'bold blue'; print "Syntax: perl pwget username\n"; print "Example: perl pwget frank\n"; print color 'reset'; exit; } { print "\n"; print "------------------------------\n"; open (I,"/home/@ARGV/.purple/accounts.xml") or die &d; &f; print "Protocol ";&c; print "Account ";&c; print "Password\n\n"; my ($an, $ac, @a, $ap, $pc, @p, $apr, $prc, @pr, $pre); while() { s/(\s+)//g; if( ($an) = $_ =~ /^(.*)<\/name>$/) { $ac++; @a[ac] = $an; }elsif( ($pre, $apr) = $_ =~ /^<protocol>(.*)-(.*)<\/protocol>$/) { $prc++; @pr[prc] = $apr; }elsif( ($ap) = $_ =~ /^<password>(.*)<\/password>$/) { $pc++; @p[pc] = $ap; print "\U@pr\E ";&c; print "@a ";&c; print "@p\n"; } } print "------------------------------\n"; print "\n"; sub c { print color 'bold blue'; print "=> "; print color 'reset'; return; }

sub d { print print print print exit; }

color 'bold red'; "Unable to find 'accounts.xml' under username '@ARGV': $!\n"; color 'reset'; "------------------------------\n\n";

sub f { print color 'bold blue'; print "Found 'accounts.xml' under username '@ARGV'.\n\n"; print color 'reset'; } }

Related Documents

Password
November 2019 41
Password
November 2019 45
Password
October 2019 55
Password
November 2019 55
Password
August 2019 40

More Documents from "Taz Halipa"

Ct-g2175 Panasonic Diagrama
December 2019 36
May 2020 12
Irc Bot V.2.1
June 2020 15
980908_02rev
May 2020 12
Irc Bot V.2.0
May 2020 16