2

Chrome'da bir userscript/tampermonkey kullanarak otomatik doldurulmuş bir şifre formu göndermek istiyorum. Bununla birlikte,alanlarının alan adları, kullanıcı tarafından kontrol edilene kadar (sunucu klavyesi veya uyarı mesajlarıyla bile) boş kalır (herhangi bir tuş veya fare tıklaması). Bu, kullanıcı adınızdaki şifreleri kodlamaya gerek kalmadan girişleri otomatikleştirmek için bir kullanıcı bildirimi istiyorsanız bu önemli görünüyor.Otomatik doldurma gönder (şifre giriş alanı)

Bunun için bir açıklama ve/veya bir çözüm var mı? .submit() ya da gerçek mouseclick olayı gönderen vb

Kendiniz deneyin: otomatik kaydetme şifre/isim burada: http://www.htmlcodetutorial.com/forms/_INPUT_TYPE_PASSWORD.html

ek bilgi: Tampermonkey

Bütün ben formu göndermek bilmek yollarını denedi sürüm 3.12.58, krom Versiyon 49.0.2623.110 m, Windows 10 64x. Ayrıca kromdaki tüm uzantıları devre dışı bırakmayı denedim. o sayfa ile gider

userscript:

// ==UserScript== 
// @name   New Userscript 
// @namespace http://tampermonkey.net/ 
// @version  0.1 
// @description try to take over the world! 
// @author  You 
// @match  http://www.htmlcodetutorial.com/forms/_INPUT_TYPE_PASSWORD.html 
// @grant  none 
// ==/UserScript== 

//wait 5s to assert that chrome autofill had enough time to do its thing 
setTimeout(function(){document.forms[0].submit()},5000) 

düzenleme: gönderdiğinde asla döngü kodu. Bir krom hata dayalı çünkü this suggestion şifre alanının

loopme() 

function loopme() { 
    setTimeout(function(){ 
     //check every second if 'password field' is empty, if not, submit the form 
     if(document.forms[0].elements[1].value != ''){ 
      document.forms[0].submit() 
     } else { 
      //make count visible 
      document.title = "|" + document.title 
      //edit: adding an virtual 'click' makes no difference: 
      //var mouseClick = new MouseEvent("click"); 
      //document.body.dispatchEvent(mouseClick); 
      loopme() 
      } 
    },1000) 
} 


ekran görüntüsü. Sol: gönderilmeden önce form, sağ: sunucu yanıtı.

enter image description hereenter image description here

(ayrıntılı) döngü-komut dosyası çalıştıran krom logfiles: İşte benzer bir konu üzerinde bulunan en iyi yanıt (olmadan var: cevap verebilir kimse varmış gibi görünür yana

Navigated to http://www.htmlcodetutorial.com/forms/_INPUT_TYPE_PASSWORD.html 
content: Started (5edc5230-099a-412a-bca4-48c97edb3113, http://www.htmlcodetutorial.com/forms/_INPUT_TYPE_PASSWORD.html) 
content: start event processing for 5edc5230-099a-412a-bca4-48c97edb3113 (1 to run) 
env: initialized (content, id:5edc5230-099a-412a-bca4-48c97edb3113, http://www.htmlcodetutorial.com/forms/_INPUT_TYPE_PASSWORD.html) 
env: schedule 'New Userscript' for document-idle 
env: schedule for later events! 
env: first DOMNodeInserted Event! 
content: Started (d2f1e833-ce3f-48e8-a81c-cf4a93475a98, nullblank) 
content: disable event processing for d2f1e833-ce3f-48e8-a81c-cf4a93475a98 
content: Started (6b10cff5-a3a1-4eab-9286-f7e49aaa5952, http://www.htmlcodetutorial.com/forms/_INPUT_TYPE_PASSWORD.html) 
content: disable event processing for 6b10cff5-a3a1-4eab-9286-f7e49aaa5952 
content: Started (dc4a5836-69a6-4194-a631-ad2354cc6a33, nullblank) 
content: disable event processing for dc4a5836-69a6-4194-a631-ad2354cc6a33 
env: DOMContentLoaded Event! 
content: detected DOMContentLoaded 5edc5230-099a-412a-bca4-48c97edb3113 
content: Started (df53f06c-55ba-4398-8a4d-0b41d2fb3f93, nullblank) 
content: disable event processing for df53f06c-55ba-4398-8a4d-0b41d2fb3f93 
env: execute script New Userscript @ the safe context now! 
content: Started (069446ea-3b29-42c4-8c13-9f4f112f6a01, https://googleads.g.doubleclick.net/pagead/html/r20160331/r20151006/zrt_lookup.html) 
content: disable event processing for 069446ea-3b29-42c4-8c13-9f4f112f6a01 
content: Started (127600e6-61f8-4e15-862a-fe0aaa6e4683, http://s7.addthis.com/static/sh.953eb77977227bfd253ee158.html) 
content: disable event processing for 127600e6-61f8-4e15-862a-fe0aaa6e4683 
content: Started (b50036dc-266a-4328-92b9-6937c09419e3, https://googleads.g.doubleclick.net/pagead/ads) 
content: disable event processing for b50036dc-266a-4328-92b9-6937c09419e3 
content: Started (5df2993f-2fc5-4f40-8fa9-aa37c7ffd987, https://googleads.g.doubleclick.net/pagead/ads) 
content: disable event processing for 5df2993f-2fc5-4f40-8fa9-aa37c7ffd987 
content: Started (8f6c166e-6e61-4776-ba28-8caf786704f4, http://tpc.googlesyndication.com/safeframe/1-0-2/html/container.html) 
content: disable event processing for 8f6c166e-6e61-4776-ba28-8caf786704f4 
content: Started (c9082438-936d-4ba3-b76e-bf7cc9f48bae, https://googleads.g.doubleclick.net/pagead/ads) 
content: disable event processing for c9082438-936d-4ba3-b76e-bf7cc9f48bae 
content: Started (2439efaa-3ea5-461b-a8a1-25b2be866f1a, https://googleads.g.doubleclick.net/pagead/ads) 
content: disable event processing for 2439efaa-3ea5-461b-a8a1-25b2be866f1a 
content: Started (fdd7347c-3bf8-4e05-a9bb-97e0e26d543e, https://googleads.g.doubleclick.net/pagead/ads) 
content: disable event processing for fdd7347c-3bf8-4e05-a9bb-97e0e26d543e 
content: Started (5e2a844c-fe1e-4c8d-af07-09b3b1ab272c, https://googleads.g.doubleclick.net/pagead/ads) 
content: disable event processing for 5e2a844c-fe1e-4c8d-af07-09b3b1ab272c 
content: Started (0cef6828-3752-4b05-a8de-68cb90f6b29b, https://googleads.g.doubleclick.net/pagead/ads) 
content: disable event processing for 0cef6828-3752-4b05-a8de-68cb90f6b29b 
content: detected load 5edc5230-099a-412a-bca4-48c97edb3113 
content: Started (65ce238d-9bd8-45cd-8d52-8d215ae3fe62, https://googleads.g.doubleclick.net/pagead/ads) 
content: disable event processing for 65ce238d-9bd8-45cd-8d52-8d215ae3fe62 
content: Started (c3747272-9bf6-4a6b-baf3-d38b7fbb8134, nullblank) 
content: disable event processing for c3747272-9bf6-4a6b-baf3-d38b7fbb8134 
+0

itibaren

böyle senin örnek kod olarak, sorunuzun ilgili daha fazla bilgi ekleyin. –

+0

eklendi, lütfen unutmayın ki gerçekten şifre değerlerini okumak/engellemek istemiyorum. Aksine, onları okumak istemiyorum, ama onları sunarım. Ancak, testlerim giderildiği sürece, kullanıcılar otomatik olarak formu (setTimeout vb. Sonrasında bile) gönderirse, sunucular otomatik olarak doldurulmuş adı/şifreyi ALMAYACAKTIR - UNLESS bir çeşit “gerçek” kullanıcı eylemi sağlarsınız (örneğin, bir tuşa basarak)). Ben krom tarafında bir güvenlik önlemi olduğunu sanmıyorum, ama ... Bilmiyorum ve ben gerçekten benim script çalışmak istiyorum =) – user2305193

+0

Üzgünüz ama yine de sorunuz hakkında belirsiz ... Bir gönderme eylemini simüle etmek istiyorum ama Sağladığınız kod hiçbir şey yapmadı mı? –

cevap

İlgili konular