forked from m4ll0k/BBTz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
paramsCFinder.py
187 lines (177 loc) · 4.71 KB
/
paramsCFinder.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
#/usr/bin/env python3
# params combination finder
# example:
'''
$ echo "customer_id" | python3 paramsCFinder.py
Customer
Id
customer
id
CUSTOMER
ID
Customer_Id
customer_id
CUSTOMER_ID
CustomerId
customerid
CUSTOMERID
_CustomerId
_customerid
_CUSTOMERID
_Customer_Id
_customer_id
_CUSTOMER_ID
Customer_id
Customer_Id
customer_Id
customer_id
CUSTOMER_id
CUSTOMER_ID
CustomerID
CustomerId
customerId
customerid
CUSTOMERid
CUSTOMERID
_CustomerID
_CustomerId
_customerId
_customerid
_CUSTOMERid
_CUSTOMERID
_Customer_ID
_Customer_Id
_customer_Id
_customer_id
_CUSTOMER_id
_CUSTOMER_ID
# another example:
$ echo "customer_id" |python3 paramsCFinder.py|tr '\n' '='|sed 's/=/=\&/g'
Customer=&Id=&customer=&id=&CUSTOMER=&ID=&....
'''
def _0x1_(Str:str)->str:return str(Str).capitalize()
def _0x2_(Str:str)->str:return str(Str).casefold()
def _0x3_(Str:str)->str:return str(Str).upper()
def _0x5_(Strs:list)->list:Strs[0] = _0x1_(Strs[0]);return Strs
def _0x6_(Strs:list)->list:Strs[-1] = _0x1_(Strs[-1]);return Strs
def _0x7_(Strs:list)->list:Strs[0] = _0x2_(Strs[0]);return Strs
def _0x8_(Strs:list)->list:Strs[-1] = _0x2_(Strs[-1]);return Strs
def _0x9_(Strs:list)->list:Strs[0] = _0x3_(Strs[0]);return Strs
def _0x10_(Strs:list)->list:Strs[-1] = _0x3_(Strs[-1]);return Strs
def _0x4_(Str:str)->None:
if '_' in Str:
StR=Str.split('_')
[print(_0x1_(_0x1))for _0x1 in StR]
[print(_0x2_(_0x1))for _0x1 in StR]
[print(_0x3_(_0x1))for _0x1 in StR]
#
print("_".join([_0x1_(_0x1)for _0x1 in StR]))
print("_".join([_0x2_(_0x1)for _0x1 in StR]))
print("_".join([_0x3_(_0x1)for _0x1 in StR]))
#
print("".join([_0x1_(_0x1)for _0x1 in StR]))
print("".join([_0x2_(_0x1)for _0x1 in StR]))
print("".join([_0x3_(_0x1)for _0x1 in StR]))
#
print("_"+"".join([_0x1_(_0x1)for _0x1 in StR]))
print("_"+"".join([_0x2_(_0x1)for _0x1 in StR]))
print("_"+"".join([_0x3_(_0x1)for _0x1 in StR]))
#
print("_"+"_".join([_0x1_(_0x1)for _0x1 in StR]))
print("_"+"_".join([_0x2_(_0x1)for _0x1 in StR]))
print("_"+"_".join([_0x3_(_0x1)for _0x1 in StR]))
#
print("_".join(_0x5_(StR)))
print("_".join(_0x6_(StR)))
print("_".join(_0x7_(StR)))
print("_".join(_0x8_(StR)))
print("_".join(_0x9_(StR)))
print("_".join(_0x10_(StR)))
#
print("".join(_0x5_(StR)))
print("".join(_0x6_(StR)))
print("".join(_0x7_(StR)))
print("".join(_0x8_(StR)))
print("".join(_0x9_(StR)))
print("".join(_0x10_(StR)))
#
print("_"+"".join(_0x5_(StR)))
print("_"+"".join(_0x6_(StR)))
print("_"+"".join(_0x7_(StR)))
print("_"+"".join(_0x8_(StR)))
print("_"+"".join(_0x9_(StR)))
print("_"+"".join(_0x10_(StR)))
#
print("_"+"_".join(_0x5_(StR)))
print("_"+"_".join(_0x6_(StR)))
print("_"+"_".join(_0x7_(StR)))
print("_"+"_".join(_0x8_(StR)))
print("_"+"_".join(_0x9_(StR)))
print("_"+"_".join(_0x10_(StR)))
elif '-' in Str:
StR=Str.split('-')
[print(_0x1_(_0x1))for _0x1 in StR]
[print(_0x2_(_0x1))for _0x1 in StR]
[print(_0x3_(_0x1))for _0x1 in StR]
#
print("-".join([_0x1_(_0x1)for _0x1 in StR]))
print("-".join([_0x2_(_0x1)for _0x1 in StR]))
print("-".join([_0x3_(_0x1)for _0x1 in StR]))
#
print("".join([_0x1_(_0x1)for _0x1 in StR]))
print("".join([_0x2_(_0x1)for _0x1 in StR]))
print("".join([_0x3_(_0x1)for _0x1 in StR]))
#
print("_"+"".join([_0x1_(_0x1)for _0x1 in StR]))
print("_"+"".join([_0x2_(_0x1)for _0x1 in StR]))
print("_"+"".join([_0x3_(_0x1)for _0x1 in StR]))
#
print("_"+"-".join([_0x1_(_0x1)for _0x1 in StR]))
print("_"+"-".join([_0x2_(_0x1)for _0x1 in StR]))
print("_"+"-".join([_0x3_(_0x1)for _0x1 in StR]))
#
print("-".join(_0x5_(StR)))
print("-".join(_0x6_(StR)))
print("-".join(_0x7_(StR)))
print("-".join(_0x8_(StR)))
print("-".join(_0x9_(StR)))
print("-".join(_0x10_(StR)))
#
print("".join(_0x5_(StR)))
print("".join(_0x6_(StR)))
print("".join(_0x7_(StR)))
print("".join(_0x8_(StR)))
print("".join(_0x9_(StR)))
print("".join(_0x10_(StR)))
#
print("_"+"".join(_0x5_(StR)))
print("_"+"".join(_0x6_(StR)))
print("_"+"".join(_0x7_(StR)))
print("_"+"".join(_0x8_(StR)))
print("_"+"".join(_0x9_(StR)))
print("_"+"".join(_0x10_(StR)))
#
print("_"+"-".join(_0x5_(StR)))
print("_"+"-".join(_0x6_(StR)))
print("_"+"-".join(_0x7_(StR)))
print("_"+"-".join(_0x8_(StR)))
print("_"+"-".join(_0x9_(StR)))
print("_"+"-".join(_0x10_(StR)))
else:
print(_0x1_(Str))
print(_0x2_(Str))
print(_0x3_(Str))
print("_"+_0x1_(Str))
print("_"+_0x2_(Str))
print("_"+_0x3_(Str))
print(_0x1_(Str)+"_")
print(_0x2_(Str)+"_")
print(_0x3_(Str)+"_")
try:
import sys
for lines in sys.stdin.readlines():
liness = lines.strip()
if lines == '\n': sys.exit(print('cat myparams.txt | python3 {Name}'.format(Name=sys.argv[0])))
_0x4_(liness)
except Exception as e:
raise