Skip to content

Instantly share code, notes, and snippets.

View Harish2997's full-sized avatar

Harish Somasundar Harish2997

View GitHub Profile
@Harish2997
Harish2997 / pandasCsvToOracle.py
Last active May 21, 2020 14:27
The python script establishes a connection with oracle, gets the CSV data and inserts into the table.
import cx_Oracle
import pandas as pd
import csv
import datetime
import os
import time
connectStart = time.time()
r = connection = cx_Oracle.connect('username','password','localhost:1521/XE')
print(r)
@Harish2997
Harish2997 / express_ntlm.js
Created May 13, 2020 06:44
Express-ntlm to get user details
var express = require('express'),
ntlm = require('express-ntlm');
var app = express();
app.use(ntlm());
app.all('*', function(request, response) {
response.end(JSON.stringify(request.ntlm)); });
app.listen(9000);
import requests
from requests_ntlm import HttpNtlmAuth
requests.get("http://ntlm_protected_site.com",auth=HttpNtlmAuth('domain\\username','password'))
import base64
import socket
from ntlm_auth.ntlm import NtlmContext
username = 'User'
password = 'Password'
domain = 'Domain' # Can be blank if you are not in a domain
workstation = socket.gethostname().upper() # Can be blank if you wish to not send this info
@Harish2997
Harish2997 / ntlmv1.py
Created May 11, 2020 08:05
NTLM version1
import socket
from ntlm_auth.ntlm import NtlmContext
username = 'User'
password = 'Password'
domain = 'Domain' # Can be blank if you are not in a domain
workstation = socket.gethostname().upper() # Can be blank if you wish to not send this info
ntlm_context = NtlmContext(username, password, domain, workstation, ntlm_compatibility=0) # Put the ntlm_compatibility level here, 0-2 for LM Auth/NTLMv1 Auth