Jump to content

Recommended Posts

Ban thêm cái này vào header nhé 

 var header = {
      "if-none-match-": "55b03-1c978cd3e7aa24bda774046ac69f692d"
    };
On 30/10/2019 at 01:14, toighengangqua said:

mình đang gặp vướng chỗ này:

kXXbATE.png

mình get product của shop thì có ra thông tin nhưng giá  (price_max - price_min) lại toàn null trong khi trên mình check trong chrome vẫn ra đầy đủ giá, mấy lần đầu mình get đều có giá, sau mất luôn giá thành null hết. Cao nhân nào giúp mình với

 

Chia sẻ bài đăng này


Link tới bài viết
Share on other sites
19 giờ trước, Đìnhh Phúc said:

Ban thêm cái này vào header nhé 

 var header = {
      "if-none-match-": "55b03-1c978cd3e7aa24bda774046ac69f692d"
    };
 

chào bạn @Đìnhh Phúc :167788236751796: bạn có biết cách nào để tạo được giá trị if-none-match đó không ?

Chia sẻ bài đăng này


Link tới bài viết
Share on other sites
On 9/8/2019 at 1:36 PM, caubeiuzk said:

bịa thôi, lấy đoạn code cmt phía sau ấy, đoạn sau ta có chỉnh sửa rồi.ahihi

code đăng ký acc shopee

Hidden Content

  • Give reaction or reply to this topic to see the hidden content.

 

sửa lại code đăng ký shopee 1 tý nha ae


           string chuoi = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
            HttpRequest http = new HttpRequest();

            string Pass = "adsfdsa";
            string html = "";
            string token = "";
            string status = "";
            string data = "";
            string UserName = "";
            string apikeycaptcha = "sfsfdsfsfsdf";
            token = RANDOM(chuoi, 32);
            string captcha = "";
            string vcode = "";
            string a = "";
            string api_key = "Q_-dsfsfs-aXx_";
            string request_id = "";
            string phone_canon = "";
            string Name = "";
            string abc = "";


            // api_key là apikey simthue.com, tự liên hệ thằng ad simthue tạo acc và mở apikey nhé
            // string apikeycaptcha là api giải captcha của hiệp gà, trang web là: http://captcha.hiepga.net/index.php



            // lấy số điện thoại
            html = http.Get("http://api.pvaonline.net/request/create?key=" + api_key + "&service_id=34").ToString();
            for (int i = 0; request_id.Length < 5; i++)
            {
                request_id = Regex.Match(html, "\"id\":\"(.*?)\",\"balance").Groups[1].Value;
                Thread.Sleep();
              //do sim thuê nó chơi chống request, chỉ cho 5s request 1 lần từ 1 địa chỉ ip
            }
            for (int i = 0; phone_canon.Length < 5; i++)
            {
                html = http.Get("http://api.pvaonline.net/request/check?key=" + api_key + "&id=" + request_id).ToString();
                phone_canon = Regex.Match(html, "(\\d{11})").Groups[1].Value;
                Thread.Sleep(1000);
            }

            // gửi mã xác minh
            html = http.Get("https://shopee.vn/buyer/login/signup/?__classic__=1").ToString();
           http.AddField("csrfmiddlewaretoken" ,token);
            http.SetCookie("csrftoken=" + token);
            http.AddField("phone_canon", phone_canon);
            http.AddField("operation", "1");
            http.AddField("password_hash", "");
            http.AddHeader("accept: */*");
            http.AddHeader("origin: https://shopee.vn");
            http.AddHeader("x-requested-with: XMLHttpRequest");
            http.Referer = "https://shopee.vn/buyer/login/signup/?__classic__=1";
           html = http.Post("https://shopee.vn/buyer/login/signup_send_vcode/").ToString();

            //check code simthue
            for (int i = 0; vcode.Length < 5; i++)
            { 
                abc = http.Get("http://api.pvaonline.net/request/check?key=" + api_key + "&id=" + request_id).ToString();
                vcode = Regex.Match(abc, "SHOPEE: (\\d+)").Groups[1].Value;
                Thread.Sleep(5500);
            }

            // giải captcha và đăng ký nick, do giải captcha chỉ đúng khoảng 90% nên phải dùng vòng lặp để tránh sai sót, mà captcha shopee khó chơi phết, giải sai 2-3 lần là lần sau mù đui déo thấy gì luôn
            //nhớ tạo file chứa captcha get về nha, ở đây mình để là E:\cc\Captcha\captchacangiai.png
            for (int j = 0; a.Length < 2; j++)
            {
                string Milliseconds = DateTimeOffset.Now.ToUnixTimeMilliseconds().ToString();
                html = http.Get("https://shopee.vn/buyer/login/signup/verify_vcode/?__classic__=1").ToString();
                http.Referer = "https://shopee.vn/buyer/login/signup/verify_vcode/?__classic__=1";
                var anna = http.Get("https://shopee.vn/api/v0/captcha?" + Milliseconds);
                anna.ToFile("E:\\cc\\Captcha\\captchacangiai.png");
                var base64String = Convert.ToBase64String(File.ReadAllBytes("E:\\cc\\Captcha\\captchacangiai.png"));
                string body = "method=base64sv2&key=" + apikeycaptcha + "&body=" + base64String + "";
                string Content = "application/x-www-form-urlencoded";
                string htmlx = http.Post("http://captcha.hiepga.net/in.php", body, Content).ToString();
                for (int i = 0; html == null; i++)
                {
                    Thread.Sleep(50);
                }
                captcha = htmlx;
                data = "csrfmiddlewaretoken=" + token + "&vcode=" + vcode + "&captcha=" + captcha + "&phone_canon=" + phone_canon + "&operation=1";
                http.AddHeader("accept: */*");
                http.AddHeader("x-requested-with: XMLHttpRequest");
                http.Referer = "https://shopee.vn/buyer/login/signup/verify_vcode/?__classic__=1";
                html = http.Post("https://shopee.vn/buyer/login/signup/verify_vcode/?__classic__=1", data, "application/x-www-form-urlencoded; charset=UTF-8").ToString();
                a = Regex.Match(html, "plus_(.*?)/").ToString();
            }
            Name = "a" + phone_canon;
            data = "csrfmiddlewaretoken=" + token + "&username=" + Name + "&password_hash="+ Pass.ToMD5().ToSHA256() + "&password=" + Pass + "&password2=" + Pass;           
            http.AddHeader("accept: */*");
            http.AddHeader("origin: https://shopee.vn");
            http.AddHeader("x-requested-with: XMLHttpRequest");
            http.Referer = "https://shopee.vn/buyer/login/signup/plus_detail/?__classic__=1";
            html = http.Post("https://shopee.vn/buyer/login/signup_register/",data, "application/x-www-form-urlencoded; charset=UTF-8").ToString();
            MessageBox.Show("oke baby");
            //đến đây là xong công đoạn đăng ký acc rồi, còn tắt otp thì tự mò đi nha, cũng khá dễ mà.haha

giải captcha của hiệp gà thì mất 10vnđ 1 captcha, còn đăng ký simthue thì khá chát, hiện tại là 2k5, nên kiếm 1 số bạn trên fb có cho thuê sim 1k-1k5 có api

 


        FileHelper file = new FileHelper();
        StringHelper str = new StringHelper();
        public static string RANDOM(string chuoi, int length)
        {

            return new string(Enumerable.Repeat(chuoi, length)
              .Select(s => s[randomvovan.Next(s.Length)]).ToArray());
        }

quên mất lệnh random, nhớ add công khai lệnh này nha

Cho mình hỏi muốn lấy dịch vụ của Facebook thì service_id = ? vậy ạ
http://api.pvaonline.net/request/create?key=" + api_key + "&service_id=34

Chia sẻ bài đăng này


Link tới bài viết
Share on other sites
2 giờ trước, phucnth said:

Cho mình hỏi muốn lấy dịch vụ của Facebook thì service_id = ? vậy ạ
http://api.pvaonline.net/request/create?key=" + api_key + "&service_id=34

Topic này trao đổi về code shopee bạn nhé,
Còn bạn muốn hỏi dịch vụ của trang đó thì bạn liên hệ admin trang đó để được biết thêm chi tiết nhé.
Trang đó có phục vụ api nên ad sẽ giải đáp đúng thắc mắc của bạn:167788283418458:

Chia sẻ bài đăng này


Link tới bài viết
Share on other sites
On 9/16/2019 at 11:27 AM, tk21590 said:

ý mình là login ,đăng kí,mua hàng nhưng thông qua app ấy , tìm nhiều nguồn rồi nhưng đa số đều hướng dẫn request thông qua website (cái này căn bản ) , không có tài liệu nào hướng dẫn request thông qua app mobile hoặc giả lập hết . :( Cái này khó hơn nhiều luôn :c02:

Quan tâm! cụ làm đc chưa :))

Chia sẻ bài đăng này


Link tới bài viết
Share on other sites
On 22/11/2019 at 07:15, Thiên Chi Kiều Nữ said:

cũng như bình thường thôi mà, bạn gặp vấn đề ở chỗ nào ?

Chỗ add mấy cái header ấy ạ. Với cho em hỏi là phải đăng nhập thì mới dùng được cái api search sản phẩm của shopee ạ?
Tại em đang dùng thì nó không cấp full data, với hình như nó giới hận số lần request trong ngày thì phải.

Chia sẻ bài đăng này


Link tới bài viết
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Trả lời chủ đề này...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...