-
Notifications
You must be signed in to change notification settings - Fork 3
/
iplogger.py
37 lines (30 loc) · 1021 Bytes
/
iplogger.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
__author__ = '@bsysop'
__date__ = '20221227'
__version__ = '0.1'
__description__ = """\
IP Logger is a Burp Extension that captures the actual external IP and store in a file called iplogger.json.
"""
from burp import IBurpExtender
import json
import urllib2
import datetime
class BurpExtender(IBurpExtender):
def registerExtenderCallbacks( self, callbacks):
url = "https://api.ipify.org?format=json"
response = urllib2.urlopen(url)
data = response.read()
values = json.loads(data)
ip = values["ip"]
print ("Burp IP Logger loaded.")
print ("Copyright (c) 2022 bsysop")
print("Your actual IP is: "+ip)
# Serializing date and IP.
dict = {
"date": str(datetime.datetime.now()),
"ip": ip
}
json_object = json.dumps(dict, indent=4)
# Writing to iplogger.json
with open("iplogger.json", "a") as outfile:
outfile.write(json_object + "\n")
return