This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
values = ['\x03', ' ', '&', '$', '-', '\x1e', '\x02', ' ','/','/','.','/'] | |
result = "" | |
for val in values: | |
result = result + chr(65 ^ ord(val)) | |
print(result) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
str2 = "*" | |
str3 = "&" | |
str4 = "@" | |
str5 = "#" | |
str6 = "+" | |
str7 = "$" | |
str8 = "_" | |
str9 = "" | |
stat2 = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"io" | |
"log" | |
"net" | |
"os" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main; | |
import ( | |
"fmt"; | |
"os"; | |
"bufio"; | |
) | |
func main() { | |
fmt.Print("Enter Password: "); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests,json | |
from pprint import pprint | |
def cymon_query(query,type): | |
api_key = "<You API Key here>" | |
if type == "ip": | |
url = "https://cymon.io/api/nexus/v1/ip/{}/events".format(query) | |
elif type == "domain": | |
url = "https://cymon.io/api/nexus/v1/domain/{}".format(query) | |
headers = {"authorization": "Token {}".format(api_key)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from elasticsearch import Elasticsearch | |
import sys | |
from elasticsearch import helpers | |
import json | |
from slackclient import SlackClient | |
def search_brute_force(): | |
s = SlackClient("<Slack API Key here>") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
from urllib.request import urlopen | |
m = urlopen('http://www.nytimes.com') | |
soup = BeautifulSoup(m,'html.parser') | |
print(soup.find_all('article')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
def password_generator(): | |
alpha = '''A- B1CDE2*FGH6IJ3&KL_M4NOP5QRS7TU^8VW9XY0Zabc@defg#hijk~lm%no!pqrs¬tuv`w|xy.$,z''' # these are the words and symbols from which the password is generaterd | |
ans = input('How Strong do you want your password to be : (strong/medium/low) ') | |
password = '' | |
while ans.lower() != 'q': | |
if ans == 'strong': | |
for i in range(0,12): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def listing(): | |
list1 = [1,2,5,4,8,9,6,3,6,4,9,5] | |
list2 = [] | |
counter = 0 | |
for x in list1: | |
if counter == 0 or counter == (len(list1) - 1): | |
list2.append(list1[counter]) | |
else: | |
pass # if condition is not matched then pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def check_number(): | |
give = int(input('Enter the number you want to check is prime or not : ')) # asking input andconverting it into integer since by default it will be string | |
give1 = int(give/2) # we know a number greater than the half of that number won't be able to divide it | |
# COnveriting into integer because the result will be float | |
for i in range(1,give1): | |
if give % i == 0: | |
print('THe number {} is prime'.format(give)) | |
break # since there is now no pint in continuing the if loop |
NewerOlder