Skip to content

Instantly share code, notes, and snippets.

Created November 23, 2015 13:36
Show Gist options
  • Save anonymous/a3d79508ca014696dafd to your computer and use it in GitHub Desktop.
Save anonymous/a3d79508ca014696dafd to your computer and use it in GitHub Desktop.
twilight-toast-4187
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>twilight-toast-4187</title>
<link rel="stylesheet" href="styles.css">
<script type="application/dart" src="main.dart"></script>
</head>
<body>
<h3>Générateur pour option 90 DHCP Orange</h3>
<a href="https://lafibre.info/remplacer-livebox/remplacer-la-livebox-sans-pppoe/24/">voir ce sujet sur lafibre.info</a><br>
<hr>
fti/<input id="ido" placeholder="identifiant Orange"></input><br>(execution locale au navigateur, l'identifiant n'est pas envoyé sur le réseau)<br>
<hr>
<button id="btn">Générer la chaine</button><br>
chaine option dhcp 90:<textarea id="hex" placeholder=""></textarea><br>
</body>
</html>
import 'dart:html';
import 'dart:convert';
void main() {
ButtonElement btn = querySelector('#btn');
InputElement ido = querySelector('#ido');
InputElement hex = querySelector('#hex');
btn.onClick.listen((_) {
String strout = '00:00:00:00:00:00:00:00:00:00:00:66:74:69:2f:';
String strin = ido.value;
AsciiCodec ac = new AsciiCodec();
strout += ac.encode(strin).map((i)=>(i.toRadixString(16))).reduce((r,l)=>('$r:$l'));
hex.value = strout;
});
}
textarea{
width:100%;
height:100px;
}
a {
color: hotpink;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment