Add a Honeypot to Your Forms 🐝

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ก.ย. 2024
  • Learn how to add a Honeypot to your forms 🐝
    💖 Support me on Patreon ➜ / davegray
    💻 Web Dev Roadmap for Beginners (Free!): bit.ly/DaveGra...
    🚀 Discord ➜ / discord
    👇 Follow Me On Social Media:
    GitHub: github.com/git...
    X: / yesdavidgray
    LinkedIn: / davidagray
    Blog: www.davegray.c...

ความคิดเห็น • 553

  • @deadlyecho
    @deadlyecho 6 หลายเดือนก่อน +2501

    Another defensive approach is using the infamous 'are you a robot' questionnaire 😂

    • @Rhidayah
      @Rhidayah 6 หลายเดือนก่อน +65

      And the bot is from Google 🗿 can bypass “Are you robot?” Because they own the server

    • @FirstnameLastname-cl4op
      @FirstnameLastname-cl4op 6 หลายเดือนก่อน +15

      You don't want to ruin customer experience

    • @AIin1771
      @AIin1771 6 หลายเดือนก่อน +4

      and hide it

    • @Cainny
      @Cainny 6 หลายเดือนก่อน

      ​@@FirstnameLastname-cl4opxD

    • @Cainny
      @Cainny 6 หลายเดือนก่อน

      Googles ReCaptcha is only around $0.003 per solve, if you pay someone to do it. This includes the invisible ReCaptchas.

  • @pldcanfly
    @pldcanfly 6 หลายเดือนก่อน +912

    A few things about honeypots I learned over the years:
    -) Don't got name="honeypot" or something along the lines, bots can filter that. Same with style="display:none".
    -) It's not 100%. Depending on the quality of the bot, they can detect if a field is visible or not.
    -) Auto-Fill could (not sure if modern browsers still do that) fill the field even if it's a legitimate user. This makes finding a name and label a bit harder, since best case is that it looks like a legitimate field so more sophisticated bots don't notice the pot outright, while at the same time choosing something that won't get auto-filled by the browser.
    -) Honeypot is just one of many ways to prevent bots. Especially if it is a targeted attack it does nothing. From a security standpoint, treat it like a sign on the front-yard that says "don't come in please!": Best combined with other measures.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  6 หลายเดือนก่อน +119

      All good tips!

    • @the_agent_z
      @the_agent_z 6 หลายเดือนก่อน +47

      An approach that bots cannot flag down is setting the field's position to fixed and moving it to negative coordinates so the user can never see it.

    • @Rocco-tb9ih
      @Rocco-tb9ih 6 หลายเดือนก่อน +26

      @@the_agent_z Couldn't the bot just check if the position value is negative?

    • @ShortFilmVD
      @ShortFilmVD 6 หลายเดือนก่อน +37

      How do you prevent users with screenreaders from accidentally filling the honeypot input?

    • @KaramAlayan
      @KaramAlayan 6 หลายเดือนก่อน +4

      ​@Rocco-tb9ih ofc bots can detect that but the thing is this is not so common so average bots arent programmed to handle this so you are basically outsmarting the bot cuz the hidden field nowadays is an old trick almost every bot detects it and doesnt fall to the trap this one is a little bit just a little bit safer but still as the guy commented you need other measurements

  • @Damariobros
    @Damariobros 6 หลายเดือนก่อน +190

    Bonus points if the hidden field is an "I am a robot" checkbox

  • @BytesVsStrings
    @BytesVsStrings 6 หลายเดือนก่อน +85

    Smooth advice as always. Thanks, Dave.

  • @brainloop99
    @brainloop99 6 หลายเดือนก่อน +33

    Damn, this just expanded my horizons. Good tip.

  • @atomicsoham4864
    @atomicsoham4864 6 หลายเดือนก่อน +864

    "And now u know what to do when....building a spam bot"

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  6 หลายเดือนก่อน +98

      😆

    • @Yolwoocle
      @Yolwoocle 6 หลายเดือนก่อน +35

      It's all about reducing the number of bots but not eliminating it

    • @ShortFilmVD
      @ShortFilmVD 6 หลายเดือนก่อน +10

      Element API: checkVisibility

    • @vilkillian
      @vilkillian 6 หลายเดือนก่อน +4

      @@ShortFilmVD It can have zero size but still be technically visible, as it was rendered

    • @ShortFilmVD
      @ShortFilmVD 6 หลายเดือนก่อน +4

      @vilkillian quite right, better to simply use a headless browser and tab through the focusable inputs. If the honeypot is able to be focused and filled this way the form would also disadvantage users of screen readers.

  • @fanreymysterio619
    @fanreymysterio619 6 หลายเดือนก่อน +40

    I recently learned about such a field but regarding time to fill the form out. Bots are much faster than most humans. Taking time after first load to submission into account can reduce spam even more

    • @_KrakenDev
      @_KrakenDev 6 หลายเดือนก่อน +4

      Password managers, though!

    • @shinobiwannabe
      @shinobiwannabe 6 หลายเดือนก่อน +3

      @@_KrakenDeveven with a password manager you’re orders of magnitude slower
      We’re talking 300ms vs 1.5 seconds

    • @ahmedayachi5889
      @ahmedayachi5889 6 หลายเดือนก่อน

      can't the bot slow itself down, like fills a field every 500ms ?

  • @LeoCage
    @LeoCage 6 หลายเดือนก่อน +11

    Back in the early 2010s this was stupidly effective against spam bots. I am surprised at how long I got away with it and nothing else for spam mitigation. Eventually I added a login system and other features to mitigate but man you could ride that for years back then.

  • @RDPolarity
    @RDPolarity 6 หลายเดือนก่อน +7

    That sounds pretty easy to detect/bypass, you could instead make the textbox very small and match the colour of the background. I'm sure a majority won't be able to catch that. But then again, if the attack is targeted, it's very easy to just write site-specific automation tests.

  • @zaneearldufour
    @zaneearldufour 6 หลายเดือนก่อน +1

    I like that this still allows hobbyist web scrapers in (who would probably only be filling in the visual fields)

  • @MaazKhan-lw6kz
    @MaazKhan-lw6kz 6 หลายเดือนก่อน +15

    Actually very smart 👏🏻.
    Awesome, thank you for the information!

  • @kuhaniresti
    @kuhaniresti 6 หลายเดือนก่อน +3

    one of my approach is to prevent pasting into the field and listen to input keyup event, if the time difference between chars are to fast, i detect it as a bot,

  • @captainalpha4853
    @captainalpha4853 6 หลายเดือนก่อน +2

    This is why i love watching your videos! Unique topics. Thanks Dave!

  • @cometealgo
    @cometealgo 6 หลายเดือนก่อน

    first time i see a short of yours
    thank you Dave!

  • @BGP_23
    @BGP_23 6 หลายเดือนก่อน

    Just want to say thank you for your content. I'm currently working my way through your react tutorial, great stuff.

  • @GambitVil
    @GambitVil 6 หลายเดือนก่อน +5

    Smart and glance! Thanks for the tip

  • @talkwithpramod9284
    @talkwithpramod9284 6 หลายเดือนก่อน +1

    This is a genius solution ❤. Best TH-cam teacher for webdev. I have learned so much from you sir. Thank you for such beautiful content.

  • @a_maxed_out_handle_of_30_chars
    @a_maxed_out_handle_of_30_chars 6 หลายเดือนก่อน +3

    simple and to the point, thank you :)

  • @piyushverma826
    @piyushverma826 6 หลายเดือนก่อน

    Amazing. I am following you since the beginning of my dev career. Every video and lecture has been so helpful. Thank you sir.

  • @deanwilliams433
    @deanwilliams433 6 หลายเดือนก่อน +70

    Very easy to bypass with bots that skip "hidden" elements and also RPA bots that use OCR to identify visual fields. But it should stop low tech bots which might be more common.

    • @core36
      @core36 6 หลายเดือนก่อน +19

      Well, the more processing a spam bot has to do, the less efficient it becomes.
      You’d need to check the css and maybe even the javascript for a potential hidden element. Now the spam bot is at half speed for the 10% that actually do this.
      For OCR, the bot would have to use a webbrowser, or an online service to render the page. Unless it’s a guided attack aimed at you, it’s unlikely to encounter this.
      Just my wild guess tho

    • @themoon7534
      @themoon7534 6 หลายเดือนก่อน +11

      even if some bots bypass it it's better than if all if them do it

    • @deanwilliams433
      @deanwilliams433 6 หลายเดือนก่อน +2

      @@core36 OCR bots can run hundreds of browser instances per mini PC of compute. But I agree that its not something you use against just anyone.

    • @warguy6474
      @warguy6474 6 หลายเดือนก่อน +5

      ocr botting is pretty resource heavy no? All that to attack a random website they happened to crawl to?

    • @jamess.2491
      @jamess.2491 6 หลายเดือนก่อน

      ⁠@@deanwilliams433 I would disagree, even if you’re using a headless browser (which most modern webpages can detect) OCR botting is very resource intensive. As someone said, it’s not efficient unless you’re targeting someone in particular, not just a random crawler.

  • @tomasmartinez6726
    @tomasmartinez6726 6 หลายเดือนก่อน

    This is such a clever approach! You got a sub

  • @guy7524
    @guy7524 5 หลายเดือนก่อน

    Simple solution I never thought of

  • @NotLordAsshat
    @NotLordAsshat 6 หลายเดือนก่อน +31

    For the people watching keep in mind that this usually only works for low effort bot attacks, as you can program to avoid unknown text fields, like giving the bot the parameters that only a human would see. Now this could be played around with for instance having multiple different versions of the form, so that it requires more effort to write. But yeah that's not to discredit this idea or technique it's just further context

    • @NotAdachiPeople
      @NotAdachiPeople 5 หลายเดือนก่อน

      @@SimonWoodburyForgetfilter by visibility, scale, and position

  • @Culexz0
    @Culexz0 6 หลายเดือนก่อน

    Thank you for lettings me know. Now to fix the bot.

  • @puntura
    @puntura 6 หลายเดือนก่อน +5

    great resources for learners.

  • @mcdthedev
    @mcdthedev หลายเดือนก่อน

    Learned something new today

  • @Not-A-Content-Creator
    @Not-A-Content-Creator 5 หลายเดือนก่อน

    That’s so smart, I would never have thought about that

  • @BlueJDev
    @BlueJDev 6 หลายเดือนก่อน +1

    great advice, have been doing this for 15+ years. although, I detect it in PHP and silently fail so theres no tell. it's worth logging the credentials of the request also, make sure it's not erroring out and blocking genuine ones.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  6 หลายเดือนก่อน

      Good addition!

    • @jeffh4581
      @jeffh4581 6 หลายเดือนก่อน

      Hope that you realize that Chrome’s autofill can also fill those honeypot fields, so you might very well be throwing away real users.

    • @BlueJDev
      @BlueJDev 6 หลายเดือนก่อน

      @@jeffh4581 not a huge issue, especially back when I started doing this as there wasn't really autofill as we know it today.
      that's also why I name the input something that's not going to get autofilled, like a uuid type string. Also you can use autocomplete attribute set to false on inputs to prevent auto fill. (And the tab step ignore one - for accessibility)
      And as mentioned, I log credentials to double check false positives and adjust based on any found. Finally my php code usually has an IP and email limiter to stop multiple submits.
      Nowadays though, I usually have a csrf token on the form also.

    • @BlueJDev
      @BlueJDev 6 หลายเดือนก่อน

      @@jeffh4581 ok I replied explaining why this isn't an issue but it seems the powers that be (yt) have removed my reply!
      So I'll just say, this isn't an issue...

  • @davepiland2826
    @davepiland2826 6 หลายเดือนก่อน

    Awesome info Dave!

  • @ShiloBuff
    @ShiloBuff 6 หลายเดือนก่อน

    Oh wow, this is clever. Thanks!

  • @jaychally2251
    @jaychally2251 6 หลายเดือนก่อน +2

    Holy shit this is actually really clever

  • @The_NSeven
    @The_NSeven 6 หลายเดือนก่อน

    I will never ever use this information in any sort of way, but that's really cool and smart

  • @stealtbadge2877
    @stealtbadge2877 6 หลายเดือนก่อน

    You can still determine what fields to fill in by looking at the html. Or downloading the webpage and exploring

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  6 หลายเดือนก่อน

      True. If you are specifically targeted. This does reduce lots of bot traffic that doesn't specifically target your form.

  • @kwstasg
    @kwstasg 6 หลายเดือนก่อน

    That's why the reCAPTCHA exists, bots can check input fields attributes

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  6 หลายเดือนก่อน

      Yeah, didn't say it would eliminate bots completely, but it will greatly reduce bot submissions.

  • @joja2174
    @joja2174 6 หลายเดือนก่อน +1

    That's interesting I've never heard that before 🤔

  • @sorbpen
    @sorbpen 4 หลายเดือนก่อน

    Thank you this is great.

  • @ahmad-murery
    @ahmad-murery 6 หลายเดือนก่อน

    I like that idea, it's very easy to implement comparing to captcha.
    Thanks Dave!

    • @Pokedollar
      @Pokedollar 6 หลายเดือนก่อน +2

      But also way less effective lol

    • @ahmad-murery
      @ahmad-murery 6 หลายเดือนก่อน

      @@Pokedollar Sure

  • @leighhurley9410
    @leighhurley9410 6 หลายเดือนก่อน

    Works for the simple ones I guess but it's fairly trivial for a bot to check whether the field is set to hidden. A better solution might be to make the element appear outside the bounds of the form and turn overflow off? Still a great video and would probably block a fair few 👍

  • @GamingDad
    @GamingDad 6 หลายเดือนก่อน +1

    This is brilliant

  • @insanitygamer_vibing
    @insanitygamer_vibing 6 หลายเดือนก่อน

    Thank you, I'm making a website and this is super helpful to know before I lock it in

  • @mayhe2567
    @mayhe2567 5 หลายเดือนก่อน

    Easiest way is to use a CAPTCHA system and also feed in data profiling with AI which will make sure that very low bots pass after getting past captcha

  • @muhammadbilal6865
    @muhammadbilal6865 5 หลายเดือนก่อน

    Thank you so much. Really helpful

  • @thedelanyo
    @thedelanyo 5 หลายเดือนก่อน

    Popular terms like: hidden, hid, Honeypot, disable - bots will filter term out

  • @adam7802
    @adam7802 6 หลายเดือนก่อน

    That's a very simple but smart move. Nice.

  • @voidwalker9939
    @voidwalker9939 4 หลายเดือนก่อน +1

    what about accessibility? a Tab based navigation with the help of a screen reader must ignore it otherwise it generates confusion. I don't see a tabindex or something that removes it from navigation :)
    Also, completely ineffective against good bots who can analyze the form structure

  • @first-thoughtgiver-of-will2456
    @first-thoughtgiver-of-will2456 6 หลายเดือนก่อน +1

    bot was probably written in Python, send response with malformed json and eval strings then escalate.

  • @Love_Peace_Giver
    @Love_Peace_Giver 6 หลายเดือนก่อน

    Well now this is useful. Since i make web crawlers "for a good reason".
    I respect web developers since i am also one.
    I just want to automate some regular tasks.

  • @sKYLEssed
    @sKYLEssed 6 หลายเดือนก่อน

    Seems like a useful method to keep out lower end bots.
    Twitter should use this stuff

  • @jeffh4581
    @jeffh4581 6 หลายเดือนก่อน +94

    Yeah, no. Users like the browsers’ autofill feature. We had a honeypot like this for 6 months before we found out that Chrome ignores “autocomplete=false” and we basically denied 50% of our users to create accounts.
    Be VERY CAREFUL with this. False positives are a huge issue here.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  6 หลายเดือนก่อน +13

      Interesting. Sounds like a Chrome bug? I'm going to experiment with this. I agree with testing this (and everything) well before production.

    • @user-it6jd1sb6k
      @user-it6jd1sb6k 6 หลายเดือนก่อน +5

      Yes, Chrome is really aggressive regarding the autofill-issue

    • @trapfethen
      @trapfethen 6 หลายเดือนก่อน +6

      @@DaveGrayTeachesCode Unfortunately, it is not a bug. Chrome and other browsers pretty much ignore autocomplete="false" as a defacto standard, with the justification that developers should not be in control of when to allow auto-fill or not instead of users. This has created so many issues over the years where I have had to implement work-arounds for web-based CRMs and other crud apps where the user is intending to enter someone ELSE's information rather than their own.

    • @MrTrak08
      @MrTrak08 6 หลายเดือนก่อน

      That's hilarious 😂

    • @Wyklepheph
      @Wyklepheph 6 หลายเดือนก่อน +3

      @@trapfethenThis seems like a huge security issue if someone can just add hidden form elements with common identifiers from other forms and capture the default values of people's usernames and whatnot. For some reason I feel like security > browser deciding when to autofill. Hell, 90% of the time forms I want to autofill won't autofill so this just doesn't make a lot of sense to me.

  • @slaps_zrz
    @slaps_zrz 6 หลายเดือนก่อน +2

    Spam bots could also just send new http request and skip filling out the form in the ui? That can just be prevented by requiring a captcha

    • @AoiZassoOFCL
      @AoiZassoOFCL 6 หลายเดือนก่อน +1

      if bots can directly send requests to your API without any checks or balances, you have bigger problems

  • @maxwong4657
    @maxwong4657 6 หลายเดือนก่อน

    lol learned! thank you

  • @russellgu8y2447
    @russellgu8y2447 6 หลายเดือนก่อน

    Wow this is genius. Good job.

  • @thecyberyak
    @thecyberyak 6 หลายเดือนก่อน

    Super smart thank you

  • @ChristianHaschek
    @ChristianHaschek 6 หลายเดือนก่อน

    That's Actually pretty smart

  • @VirendraBG
    @VirendraBG 6 หลายเดือนก่อน

    You are a lifesaver man. 🙏🏻

  • @skylo706
    @skylo706 6 หลายเดือนก่อน

    This is genius, honestly

  • @devwithbrian1534
    @devwithbrian1534 6 หลายเดือนก่อน

    Thanks Dave

  • @0ninetyseven97
    @0ninetyseven97 6 หลายเดือนก่อน

    Thanks dave!

  • @jomorod4275
    @jomorod4275 6 หลายเดือนก่อน +1

    You can program the bot to bypass that also.

  • @huben92
    @huben92 6 หลายเดือนก่อน

    Wow nice, thank you sir for this good idea

  • @Lucifer-q1i6g
    @Lucifer-q1i6g 6 หลายเดือนก่อน

    I just Subscribed. Thans for the Info.

  • @fullstackcrackerjack
    @fullstackcrackerjack 4 หลายเดือนก่อน +1

    If you render the form with JavaScript and add a captcha that will reduce 99% of bots.

  • @thomaskaldahl196
    @thomaskaldahl196 6 หลายเดือนก่อน +5

    I want to do this and label the entry "web-crawling spambot says what?"

  • @RobertoOrtis
    @RobertoOrtis 4 หลายเดือนก่อน

    Pretty awesome thanks

  • @codenamemoe9337
    @codenamemoe9337 5 หลายเดือนก่อน

    Love this

  • @kirksurber7262
    @kirksurber7262 6 หลายเดือนก่อน

    I was wondering how to handle this!!! Thank you!

  • @yaboipy
    @yaboipy 5 หลายเดือนก่อน

    Depends if its an automated bot crawling and finding the website vs someone creating a "bot" for the specific website

  • @brightideas8781
    @brightideas8781 5 หลายเดือนก่อน

    thanks for letting me know, i’ll fix my bot

  • @srsh12345
    @srsh12345 6 หลายเดือนก่อน

    thank you so much for the tip

  • @_gol_
    @_gol_ 6 หลายเดือนก่อน +2

    As always the best..!

    • @_gol_
      @_gol_ 6 หลายเดือนก่อน

      Great content, so much to learn

  • @iamgirraj
    @iamgirraj 6 หลายเดือนก่อน

    Thanks Dave ❤

  • @k9man163
    @k9man163 6 หลายเดือนก่อน

    This is wonderful.

  • @phutureproof
    @phutureproof 6 หลายเดือนก่อน +2

    Man discovers ancient technique

  • @tylermalone8040
    @tylermalone8040 6 หลายเดือนก่อน

    Good idea

  • @zanagi
    @zanagi 4 หลายเดือนก่อน

    Thats genius

  • @evenprime1658
    @evenprime1658 6 หลายเดือนก่อน

    quite ingenious

  • @filiecs3
    @filiecs3 6 หลายเดือนก่อน +6

    Another option is to simply generate two random numbers between 1 and 10 and ask for the sum of both of them in order to submit the form. This alone will prevent 99% of bots.

    • @volt8399
      @volt8399 5 หลายเดือนก่อน

      Please help me understand why this is effective? Wouldn't it be easy for a bot to perform this operation?

    • @filiecs3
      @filiecs3 5 หลายเดือนก่อน

      @@volt8399 if someone was deliberately trying to program a bot to get get around protections on _your_ website, You're correct it provides little protection. But most bots don't know anything about your website, what fields to enter, or what operation to perform.
      Just like with the above solution, if the person knows that it's there they could write a bot to avoid it. But that one extra step is enough to prevent 99% of bots.

  • @Dreamer4777
    @Dreamer4777 6 หลายเดือนก่อน

    Thanks a lot man❤

  • @chrisfreud2873
    @chrisfreud2873 5 หลายเดือนก่อน

    Not necessarily, if the bot was written specifically for a page like with Selenium the person who wrote it will choose which boxes to fill in beforehand and it will ignore everything else

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  5 หลายเดือนก่อน

      Correct - this method will not eliminate ALL bots - especially if you are targeted. Never said it would. It will significantly reduce the issue with generic bots.

  • @requestfx5585
    @requestfx5585 6 หลายเดือนก่อน +1

    Assuming all bots fill out all data just sets you up for failure

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  6 หลายเดือนก่อน

      Speaking in general terms. Not assuming all bots will do anything. Any specific bot author can target your website.

  • @MM-ts9jy
    @MM-ts9jy 6 หลายเดือนก่อน

    Bro, this is gold. You avoid having to implement one of those annoying capcha

  • @dienvidbriedis1184
    @dienvidbriedis1184 6 หลายเดือนก่อน +1

    And this is why I write my spam bots as Selenium scripts.

  • @arbizen
    @arbizen 6 หลายเดือนก่อน

    I love this guy!

  • @CXT14GamerMouse
    @CXT14GamerMouse 6 หลายเดือนก่อน +6

    How well does this work regarding accessibility?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  6 หลายเดือนก่อน +5

      Answered this several times in the comments. Display none removes it from the accessibility tree and that's what you want here. The input is not for humans.

  • @cubbucca
    @cubbucca 6 หลายเดือนก่อน

    another way is make the default submit button hidden
    and the correct submit button run a javascript that flags it as human input cause bots will try missing fields to avoid this
    as bot field cant be made required

  • @FikriShukor
    @FikriShukor 6 หลายเดือนก่อน

    Man this helps me❤

  • @simonshawca
    @simonshawca 5 หลายเดือนก่อน

    I've been doing this for years, I never knew it was called a honeypot. I thought it was something I invented... hahaha

  • @eliasb6244
    @eliasb6244 6 หลายเดือนก่อน

    One thing comes to mind is Screen Readers for visually impaired folks.. this will for sure mess with it. like it’s a good idea, but not a fully thought out execution.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  6 หลายเดือนก่อน

      display: none; removes the input from the accessibility tree as it should. That's what my hidden class does here.

  • @KCM25NJL
    @KCM25NJL 6 หลายเดือนก่อน

    Bot Creators: Hmmm, don't fill visually hidden fields... got it.

  • @NiceChange
    @NiceChange 6 หลายเดือนก่อน +1

    Thank you..😊

    • @NiceChange
      @NiceChange 6 หลายเดือนก่อน

      I was thinking , was there something like that I could vide in. You read my mind.

  • @chibuzoekwue
    @chibuzoekwue 6 หลายเดือนก่อน

    Thanks for this 👏👏👌

  • @alaricshiran9189
    @alaricshiran9189 6 หลายเดือนก่อน

    nice one ...rhank...❤

  • @yassinesafraoui
    @yassinesafraoui 6 หลายเดือนก่อน

    That would only work for bots randomly wandering around, if someone targets your website he can EASILY get arround those tricks, in that case captcha's are the way to go, there are even hidden captchas that can detect bots without bothering the user, but ofc they're paid 😅

  • @Karl2Peter
    @Karl2Peter 6 หลายเดือนก่อน

    This works, if you use a token also. Just a honeypot is not the greatest solution. Normally u REuse the the http request to flood the database, which was requested 🧐

  • @leonjohnson609
    @leonjohnson609 6 หลายเดือนก่อน +3

    Fabulous!

  • @morph-
    @morph- 5 หลายเดือนก่อน

    I'd just use invisable Google capcha, or whatever Foss alternative tickles your pickel

  • @MechMK1
    @MechMK1 6 หลายเดือนก่อน

    This is security by obscurity. A better approach would be actual bot detection through the use of interactivity.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  6 หลายเดือนก่อน

      I agree that combining this with some of the other suggestions here in the comments is a good approach.

  • @THATCANADIANDUDE682
    @THATCANADIANDUDE682 6 หลายเดือนก่อน

    Only issue I see is that more sophisticated spam bots will ignore fields that are hidden, either by looking at the field's attributes, AI image recognition, or some other means of analysis. This would be a more sophisticated attack, so not that common, but it can happen.

  • @SaltyDingleberry3000
    @SaltyDingleberry3000 4 หลายเดือนก่อน +1

    I would think spam bots would be smart enough to check for type=‘hidden’ or display:none?

  • @JorgeEscobarMX
    @JorgeEscobarMX 6 หลายเดือนก่อน

    wow simple and efficient.