Skip to content

Instantly share code, notes, and snippets.

View shujarafi's full-sized avatar
💭
Kingswood For Ever

Shuja Rafi shujarafi

💭
Kingswood For Ever
View GitHub Profile
@shujarafi
shujarafi / nokia-router-cfg-tool.py
Created June 11, 2021 19:43 — forked from thedroidgeek/nokia-router-cfg-tool.py
Nokia/Alcatel-Lucent router backup configuration tool
#!/usr/bin/env python3
#
# Nokia/Alcatel-Lucent router backup configuration tool
#
# Features:
# - Unpack/repack .cfg files generated from the backup and restore functionnality
# in order to modify the full router configuration
# - Decrypt/encrypt the passwords/secret values present in the configuration
@shujarafi
shujarafi / simple_server.py
Created January 1, 2018 08:00 — forked from trungly/simple_server.py
A simple Python HTTP server that supports a GET that echoes some request data and a POST that reads a request body, parses it as JSON and reponses with part of the data
from BaseHTTPServer import BaseHTTPRequestHandler
import urlparse, json
class GetHandler(BaseHTTPRequestHandler):
def do_GET(self):
parsed_path = urlparse.urlparse(self.path)
message = '\n'.join([
'CLIENT VALUES:',
'client_address=%s (%s)' % (self.client_address,