Skip to content

Commit

Permalink
Add support for checking against all UPI identifiers
Browse files Browse the repository at this point in the history
Add Disclaimer
Update with Mobile Suffixes
  • Loading branch information
LuD1161 committed May 15, 2022
1 parent 0001a96 commit a90eda3
Show file tree
Hide file tree
Showing 6 changed files with 180 additions and 7 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ You'd find the following file strucuture inside the extracted folder :
├── data
│   ├── fastag_suffixes.txt
│   ├── gpay_suffixes.txt
│   ├── test_suffixes.txt
│   └── vpa_suffixes.txt
│   ├── all_suffixes.txt
│   └── mobile_suffixes.txt
├── config.yaml.sample
└── upi-recon-cli

Expand All @@ -92,3 +92,11 @@ This is [Aseem](https://aseemshrey.in). I'm a security engineer from India 🇮

<a href="https://twitter.com/intent/follow?screen_name=AseemShrey" target="_blank"><img src="https://img.shields.io/twitter/follow/AseemShrey?style=social&logo=twitter" alt="follow on Twitter"></a>
<a href="https://youtube.com/c/HackingSimplifiedAS?sub_confirmation=1" target="_blank"><img src="https://img.shields.io/youtube/channel/subscribers/UCARsgS1stRbRgh99E63Q3ng?label=HackingSimplified&style=social" alt="Subscribe on Youtube"></a>

## Disclaimer

Note: Unified Payment Interface ("UPI") Virtual Payment Addresses ("VPAs") do not carry a data security classification by virtue of their usage in practice, and should as such be considered to be public information, similar to how email addresses may be considered to be public information.

This tool allows users to 1) check the existence of UPI payment addresses, and 2) fetch associated information about the account holder, in an automated manner based on provided input. This functionality is already available (however, not in an automated fashion) through most UPI payment applications available on the Android and/or iOS platforms.

This tool is provided "AS IS" without any warranty of any kind, either expressed, implied, or statutory, to the extent permitted by applicable law.
46 changes: 46 additions & 0 deletions cmd/checkAll.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
*/
package cmd

import (
"os"

"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)

// checkAllCmd represents the checkAll command
var checkAllCmd = &cobra.Command{
Use: "checkAll",
Short: "Check a particular number against all UPI identifiers.",
Run: func(cmd *cobra.Command, args []string) {
api_key := viper.Get("RAZORPAY_LIVE_API_KEY").(string)
if len(args) > 0 && check_is_a_number(args[0]) {
vpaSuffixes, err := readLines("data/all_suffixes.txt")
if err != nil {
log.Error().Msg("Error reading 'data/all_suffixes.txt'")
os.Exit(1)
}
checkUpi(args[0], vpaSuffixes, api_key)
} else {
cmd.Help()
}
},
}

func init() {
rootCmd.AddCommand(checkAllCmd)

// Here you will define your flags and configuration settings.

// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// checkAllCmd.PersistentFlags().String("foo", "", "A help for foo")

// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// checkAllCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}
6 changes: 3 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ var (
Run: func(cmd *cobra.Command, args []string) {
api_key := viper.Get("RAZORPAY_LIVE_API_KEY").(string)
if len(args) > 0 && check_is_a_number(args[0]) {
vpaSuffixes, err := readLines("data/vpa_suffixes.txt")
vpaSuffixes, err := readLines("data/mobile_suffixes.txt")
if err != nil {
log.Error().Msg("Error reading 'data/vpa_suffixes.txt'")
log.Error().Msg("Error reading 'data/mobile_suffixes.txt'")
os.Exit(1)
}
checkUpi(args[0], vpaSuffixes, api_key)
} else {
cmd.Help()
}
},
Version: fmt.Sprintf("0.1.1"),
Version: fmt.Sprintf("0.1.2"),
}
)

Expand Down
7 changes: 6 additions & 1 deletion data/vpa_suffixes.txt → data/all_suffixes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ dbs
dcb
denabank
dlb
dnspay
dnsbank
eazypay
esaf
equitas
ezeepay
fbl
Expand All @@ -56,6 +57,7 @@ indianbank
indianbk
indus
iob
janabank
jio
jkb
jsbp
Expand All @@ -74,6 +76,7 @@ lvb
lvbank
mahb
myicici
nsdl
obc
okaxis
okbizaxis
Expand All @@ -85,6 +88,7 @@ payzapp
pingpay
pnb
pockets
postbank
psb
purz
rajgovhdfcbank
Expand All @@ -111,6 +115,7 @@ unionbankofindia
united
upi
utbi
utkarshbank
vijayabank
vijb
vjb
Expand Down
115 changes: 115 additions & 0 deletions data/mobile_suffixes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
abfspay
airtel
airtelpaymentsbank
albk
allahabadbank
allbank
andb
apb
apl
aubank
axis
axisb
axisbank
axisgo
axl
bandhan
barodampay
barodapay
boi
cbin
cboi
centralbank
cnrb
corp
csbcash
csbpay
cub
dbs
dcb
denabank
dlb
dnsbank
equitas
esaf
ezeepay
fbl
federal
finobank
freecharge
hdfcbank
hdfcbankjd
hsbc
ibl
icici
icicibank
idbi
idbibank
idfc
idfcbank
ikwik
imobile
indbank
indianbank
indianbk
indus
iob
janabank
jio
jkb
jsbp
jupiteraxis
karb
karurvysyabank
kaypay
kbl
kmb
kmbl
kotak
kvb
kvbank
lime
lvb
lvbank
mahb
myicici
nsdl
obc
paytm
payzapp
pingpay
pnb
pockets
postbank
psb
purz
rbl
rmhdfcbank
sbi
sc
scb
scbl
scmobile
sib
srcb
synd
syndbank
syndicate
tapicici
timecosmos
tjsb
ubi
uboi
uco
unionbank
unionbankofindia
united
upi
utbi
utkarshbank
vijayabank
vijb
vjb
yapl
ybl
yesbank
1 change: 0 additions & 1 deletion data/test_suffixes.txt

This file was deleted.

0 comments on commit a90eda3

Please sign in to comment.