mirror of
https://github.com/Nathanwoodburn/FireWallet.git
synced 2024-12-25 15:28:15 +11:00
main: Updated batching and docs
- Updated example-configs/batch.txt with new DNS records - Modified BatchForm.cs to handle new DNS record types
This commit is contained in:
parent
5d59bdee64
commit
d1a150114e
@ -667,40 +667,37 @@ namespace FireWallet
|
||||
{
|
||||
string[] updateRecord = update.Split(',');
|
||||
string type = updateRecord[0];
|
||||
type = type.Split(':')[1];
|
||||
type = type.Split(':')[1].Replace("\"","").Trim();
|
||||
switch (type)
|
||||
{
|
||||
case "NS":
|
||||
string ns = updateRecord[1].Split(':')[1].Replace("\"","");
|
||||
string ns = updateRecord[1].Split(':')[1].Replace("\"","").Replace("}","").Trim();
|
||||
UpdateRecords[r] = new DNS(type, ns);
|
||||
break;
|
||||
case "DS":
|
||||
int keyTag = int.Parse(updateRecord[1].Split(':')[1]);
|
||||
int algorithm = int.Parse(updateRecord[2].Split(':')[1]);
|
||||
int digestType = int.Parse(updateRecord[3].Split(':')[1]);
|
||||
string digest = updateRecord[4].Split(':')[1].Replace("\"", "");
|
||||
string digest = updateRecord[4].Split(':')[1].Replace("\"", "").Replace("}", "");
|
||||
|
||||
UpdateRecords[r] = new DNS(type, keyTag, algorithm, digestType, digest);
|
||||
break;
|
||||
case "TXT":
|
||||
string txt = updateRecord[1].Split(':')[1].Replace("\"", "");
|
||||
txt.Replace("[", "");
|
||||
txt.Replace("]", "");
|
||||
UpdateRecords[r] = new DNS(type, new string[] { txt });
|
||||
string txt = updateRecord[1].Split(':')[1].Replace("\"", "").Replace("}", "");
|
||||
txt = txt.Replace("[", "");
|
||||
txt = txt.Replace("]", "");
|
||||
UpdateRecords[r] = new DNS(type, new string[] { txt.Trim() });
|
||||
break;
|
||||
case "GLUE4":
|
||||
case "GLUE6":
|
||||
string nsGlue = updateRecord[1].Split(':')[1].Replace("\"", "");
|
||||
string address = updateRecord[2].Split(':')[1].Replace("\"", "");
|
||||
string nsGlue = updateRecord[1].Split(':')[1].Replace("\"", "").Trim();
|
||||
string address = updateRecord[2].Split(':')[1].Replace("\"", "").Replace("}", "").Trim();
|
||||
UpdateRecords[r] = new DNS(type, nsGlue, address);
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
|
||||
r++;
|
||||
}
|
||||
|
||||
AddBatch(split[0], split[1], UpdateRecords);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -6,4 +6,4 @@ woodburn4,BID,1,3
|
||||
woodburn5,BID,1,3
|
||||
woodburn6,BID,1,4
|
||||
woodburn8,TRANSFER,hs1qlmlgnx0g3ynk4ylxkkdh9c9nernclnfq4lw6s9
|
||||
exampledomainnathan118,UPDATE,[{"type": "DS","keyTag": 20167,"algorithm": 13,"digestType": 2,"digest":"4a2ab3224727a4754a6c3d77621a5b04241a3d9c7ae7e5fa17f73121b9ff0e06"}, {"type": "NS","ns": "ns1.woodburn."}, {"type": "NS","ns": "ns2.woodburn."}, {"type": "TXT","txt": ["TEST"]}]
|
||||
exampledomainnathan90,UPDATE,[{"type": "NS","ns": "ns1.woodburn."};{"type": "NS","ns": "ns2.woodburn."};{"type": "DS","keyTag": 30273,"algorithm": 13,"digestType": 2,"digest":"9a3a8fb3d625d2a2073d740f10da6056ebed0e97f550aa7f3891ed450c7e60c9"};{"type": "GLUE4","ns": "ns1.exampledomainnathan90.","address": "1.2.3.4"};{"type": "TXT","txt": ["Test TXT record"]}]
|
Loading…
Reference in New Issue
Block a user