Skip to content

Instantly share code, notes, and snippets.

View peterkodermac's full-sized avatar

Peter Kodermac peterkodermac

View GitHub Profile
@peterkodermac
peterkodermac / login.py
Created November 23, 2016 06:15
Windows authentication, web login with python
import mechanize
import BeautifulSoup
import requests
from requests_ntlm import HttpNtlmAuth
from bs4 import BeautifulSoup
result=requests.get("www.url.com",auth=HttpNtlmAuth('domain\\username','password?'))
print result.content
soup=BeautifulSoup(result.content, "html.parser")
print result.content

Keybase proof

I hereby claim:

  • I am peterkodermac on github.
  • I am peterkodermac (https://keybase.io/peterkodermac) on keybase.
  • I have a public key ASARgVDLsqBzI7rb1Ha__xnLwsZE5FCxTkS75qSpcxNW7Ao

To claim this, I am signing this object:

@peterkodermac
peterkodermac / backupOcean.py
Created April 28, 2020 07:33
Digital ocean create snapshots - backups
import digitalocean
import random
api_key = 'REPLACE_API'
manager = digitalocean.Manager(token=api_key)