Skip to content

Instantly share code, notes, and snippets.

View indianabytes's full-sized avatar

Indiana Bytes indianabytes

  • Perto do Carinha que Mora Logo Alí
View GitHub Profile
@tadaoisgod
tadaoisgod / useragent.py
Last active February 13, 2023 19:05
How to add user agents to a request in Python
import requests
url = 'https://www.whatsmyua.info/'
headers = {
'User-Agent': (
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 '
'(KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36'
),
}
@andrewlimaza
andrewlimaza / honeypot-example.php
Last active July 17, 2024 07:03
Simple honeypot for an HTML form using PHP
<?php
//check if form was sent
if($_POST){
$to = 'some@email.com';
$subject = 'Testing HoneyPot';
$header = "From: $name <$name>";
$name = $_POST['name'];
@niksumeiko
niksumeiko / disable-html-form-input-autocomplete-autofill.md
Last active July 23, 2024 15:14
Disable HTML form input autocomplete and autofill

Disable HTML Form Input Autocomplete and Autofill

  1. Add autocomplete="off" onto <form> element;
  2. Add hidden <input> with autocomplete="false" as a first children element of the form.
<form autocomplete="off" method="post" action="">
    <input autocomplete="false" name="hidden" type="text" style="display:none;">
    ...
@ericwilson
ericwilson / curl2checkexif
Created April 27, 2014 01:46
Use cURL to check Exif data on Cloudinary images
curl 'https://API_KEY:API_SECRET@api.cloudinary.com/v1_1/CLOUD_NAME/resources/image?exif=1'
@edsu
edsu / bots.py
Created June 23, 2011 20:16
see what your bot traffic is like
#!/usr/bin/env python
"""
Hack to look for user agent strings in typical Apache style log and
count up the number of requests by bots vs non-bots. The list of bot
user agents comes from http://www.user-agents.org/ but has had some
agents added to it, since the user-agents.org list is pretty out of date, e.g.
no Bing?!
"""