Created
September 4, 2024 07:06
-
-
Save tyhallcsu/ed278b7ef56040153924285460636fa0 to your computer and use it in GitHub Desktop.
HTML page with embedded JavaScript that implements the core functionality of the CID converter tool.
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>CID Converter Tool</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> | |
<style> | |
body { | |
font-family: Arial, sans-serif; | |
line-height: 1.6; | |
margin: 0; | |
padding: 20px; | |
background-color: #f4f4f4; | |
} | |
.container { | |
max-width: 800px; | |
margin: auto; | |
background: white; | |
padding: 20px; | |
border-radius: 5px; | |
box-shadow: 0 0 10px rgba(0,0,0,0.1); | |
} | |
h1, h2 { | |
color: #333; | |
} | |
input[type="text"], button { | |
width: 100%; | |
padding: 10px; | |
margin-bottom: 10px; | |
} | |
button { | |
background-color: #4CAF50; | |
color: white; | |
border: none; | |
cursor: pointer; | |
} | |
button:hover { | |
background-color: #45a049; | |
} | |
#results { | |
margin-top: 20px; | |
padding: 10px; | |
background-color: #e7e7e7; | |
border-radius: 5px; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="container"> | |
<h1>CID Converter Tool</h1> | |
<p>Enter a CID, FID, or Google Maps URL to convert and generate links.</p> | |
<input type="text" id="input" placeholder="Enter CID, FID, or Google Maps URL"> | |
<button onclick="convertCID()">Convert and Generate Links</button> | |
<div id="results"></div> | |
</div> | |
<script> | |
function convertCID() { | |
const input = $('#input').val().trim(); | |
let cid = extractCID(input); | |
if (!cid) { | |
$('#results').html('<p>Invalid input. Please enter a valid CID, FID, or Google Maps URL.</p>'); | |
return; | |
} | |
const decimalCID = BigInt(cid).toString(10); | |
const hexCID = BigInt(cid).toString(16); | |
const results = ` | |
<h2>Results:</h2> | |
<p><strong>Decimal CID:</strong> ${decimalCID}</p> | |
<p><strong>Hexadecimal CID:</strong> ${hexCID}</p> | |
<p><strong>Google Maps Link:</strong> <a href="https://maps.google.com/?cid=${decimalCID}" target="_blank">https://maps.google.com/?cid=${decimalCID}</a></p> | |
<p><strong>Google Search Link:</strong> <a href="https://www.google.com/search?q=&ludocid=${decimalCID}" target="_blank">https://www.google.com/search?q=&ludocid=${decimalCID}</a></p> | |
`; | |
$('#results').html(results); | |
} | |
function extractCID(input) { | |
// Extract CID from various input formats | |
const cidRegex = /(?:cid=|ludocid=|0x)([0-9a-fA-F]+)/; | |
const match = input.match(cidRegex); | |
return match ? match[1] : null; | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Update: CID Converter Tool with OSINT Mode
This is an update to the previous CID Converter Tool. The new version includes an OSINT (Open-Source Intelligence) Mode, providing additional information about the business associated with the CID.
New Features:
Technical Updates:
Usage:
Note for Implementation:
The current version uses simulated OSINT data. For a production environment, you should:
This update enhances the tool's functionality, making it more useful for those needing comprehensive information about a business based on its CID.