Skip to content

Instantly share code, notes, and snippets.

View ketankr9's full-sized avatar

Utsav Krishnan ketankr9

  • Google
  • Indian Institute of Technology (BHU), Varanasi,India
View GitHub Profile
@ketankr9
ketankr9 / commandLineBot.py
Created February 9, 2017 20:44
A simple code to access your raspberry pi(any linux system) commandLine remotely using Telegram chat_bot
import sys
import time
import telepot
import subprocess
def runProcess(chat_id,gotmsg):
str=[x.encode('utf-8') for x in gotmsg.split()]
try:
if "reboot" in str:
body="You can't use reboot, use 'shutdown -r hh:mm &' instead"
return
@ketankr9
ketankr9 / autoSSHlogin.sh
Created December 7, 2017 05:34
automated ssh login using expect
############### provide password of the login using script
#!/usr/bin/expect -f
spawn ssh username@host_ip
expect "username@remote_ip's password: "
send "password\r"
interact
###################################################
## B is my computer, A is the remote computer, transfer files from A to B.
@ketankr9
ketankr9 / dreamWorld.sol
Last active March 25, 2018 10:22
Problem Statement 1 for CTF
pragma solidity ^0.4.6;
contract Question1 {
uint initialSupply = 100;
uint transactionCost = 1;
uint transactionCount = 0;
address owner;
@ketankr9
ketankr9 / smartContractTest.sh
Last active March 25, 2018 17:15
A simple bash script which processes all the sequence of programs required to run while ethereum smart contract developement.
#!/bin/bash
############################################################################################################
# The sequence of steps followed while developing and testing smartContracts are:
# 0. Starting the private network via ganache-cli
# 1. Modification of solidity code(.sol) or frontend(.html) file
# 2. Compilation of the solidity code(.sol) which generates (.abi) and (.bin) file with the contract's name
# 3. Changing frontend(.html) file such that the new (.abi) and code(.bin) is reflected.
# 4. Restarting HTTPServer such that the changes are reflected
# 5. Opening the browser and entering the ip:port
############################################################################################################
#!/usr/bin/python
import requests
import json
from time import sleep
import sys
headers={'x-oc-api-key':'6483389d2fa2802b97196b6b54ff487e', 'Content-Type': 'application/json'}
data = {'input': [{'source': '', 'type': 'remote'}], 'conversion': [{'target': 'mobi'}]}
response = dict()
@ketankr9
ketankr9 / draft0.md
Last active April 25, 2018 18:16
Feel free to comment below, this is the first draft, awaiting improvements :)

Introduction

HTTP Batch Sending

Syslog-ng is widely used cross-platform log management software, and being such an old software organization, the efficiency plays an important role.
This proposed project (HTTP batch sending) is an enhancement/improvement of the existing HTTP destination driver, enabling the ability to combine(batch) multiple messages as a single HTTP request, using libcurl based existing HTTP destination driver implementation.

Usefulness to the Community

One of the many characteristics which make a software stand among the crowd is the one who consumes fewer resources (network loads/uptime, processes load/uptime, etc.)

@ketankr9
ketankr9 / Python
Last active April 29, 2018 14:53
Download torrent to your local server and sync it to your computer.
This file has been truncated, but you can view the full file.
@ketankr9
ketankr9 / instagram_tags.py
Last active May 10, 2018 06:46
A python script to scrape both "Most Recent" and "Top Posts" associated with any tag from Instagram.
import requests, json
class HashTag:
"""
This class helps in extracting image links associated with instagram hashtag, both recent and top posts.
"""
def __init__(self, tag, tagType="top_posts"):
"""
tag := the tag you are concerned with scraping
"""
@ketankr9
ketankr9 / kali_wifi_crack.sh
Created May 18, 2018 08:25
Automated Wifi Password Crack Using airmon-ng
#!/bin/bash
# start in monitor mode
airmon-ng start wlan0
# dump all traffic data
airodump-ng wlan0mon
# start capturing packets, looking for deauth
@ketankr9
ketankr9 / ca.crt
Last active June 13, 2018 12:06
Details
-----BEGIN CERTIFICATE-----
MIIDxDCCAqygAwIBAgIJAPzAhlECYUXxMA0GCSqGSIb3DQEBCwUAMHcxCzAJBgNV
BAYTAklOMQswCQYDVQQIDAJVUDEOMAwGA1UEBwwFTm9pZGExEDAOBgNVBAoMB1Nh
bXN1bmcxDDAKBgNVBAsMA0lNUzEMMAoGA1UEAwwDd3M0MR0wGwYJKoZIhvcNAQkB
Fg50ZXN0QGdtYWlsLmNvbTAeFw0xODA2MDUxNzI1MjNaFw0yMzA2MDUxNzI1MjNa
MHcxCzAJBgNVBAYTAklOMQswCQYDVQQIDAJVUDEOMAwGA1UEBwwFTm9pZGExEDAO
BgNVBAoMB1NhbXN1bmcxDDAKBgNVBAsMA0lNUzEMMAoGA1UEAwwDd3M0MR0wGwYJ
KoZIhvcNAQkBFg50ZXN0QGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAND0QRodc1yM8Vu9BImDdCqpeBe0OFC9alZDx9fSLmAA0fndXO4Z
4iSdbKbbDUnlikNvVwydy/UY/xyZ5zSczJBPuZwCKiaMqEFsi4t/ybJN4UDYaJqX