Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

Commit

Permalink
Authentication and improve detection
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Apr 20, 2019
1 parent 3fe422b commit cbadc92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions kicks3/kicks3.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,33 @@
# -*- coding: utf-8 -*-
import requests,re,argparse
bucket=[]
cookies=''
ap = argparse.ArgumentParser()
ap.add_argument("-u", "--url", required=True,help="Please enter Url start with http or https")
ap.add_argument("-u", "--url", required=True,help="Please enter target Url start with http or https")
ap.add_argument("-c", "--cookie", required=False,help="Paste ur cookie values for authentication purpose")
args = vars(ap.parse_args())
target=args['url']
if args['cookie']:
cookies=args['cookie']
def remove_duplicate(x):
return list(dict.fromkeys(x))
try:
html=requests.get(target,timeout=10).content
html=requests.get(target,timeout=10,headers={'cookie':cookies}).content
regjs=r"(?<=src=['\"])[a-zA-Z0-9_\.\-\:\/]+\.js"
regs3=r"[a-zA-Z\-_0-9]+\.s3\.?(?:[a-zA-Z\-_0-9]+)?\.amazonaws\.com|(?<=\/\/)s3\.?(?:[a-zA-Z\-_0-9]+)?\.amazonaws\.com\/[a-zA-Z\-_0-9.]+"
regs3=r"[a-zA-Z\-_0-9]+\.s3\.?(?:[a-zA-Z\-_0-9]+)?\.amazonaws\.com|(?<!.)s3\.?(?:[a-zA-Z\-_0-9]+)?\.amazonaws\.com\/[a-zA-Z\-_0-9.]+"
js=re.findall(regjs,html)
s3=re.findall(regs3,html)
bucket=bucket+s3
print("Please Wait")
#print(s3)
if len(js)>0:
for i in js:
if i.startswith('//'):
jsurl=i.replace('//','http://')
# print(jsurl)
elif i.startswith('http'):
jsurl=i
else:
jsurl=target+'/'+i
jsfile=requests.get(jsurl,timeout=10).content
jsfile=requests.get(jsurl,timeout=10,headers={'cookie':cookies}).content
s3=re.findall(regs3,jsfile)
if s3:
bucket=bucket+s3
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setuptools.setup(
name="kicks3",
version="0.0.7",
version="0.0.8",
author="Syed Abuthahir",
author_email="developerabu@gmail.com",
description="Recon tool",
Expand Down

0 comments on commit cbadc92

Please sign in to comment.