|
Oh, so I didn't need to specify Bill@Gates.com ?
|
|
|
|
|
It is optional.
You can chose to give them your email address, or somebody else's.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I really need to keep a list of the addresses that noobs post on here...
|
|
|
|
|
Get thee behind me Satan!
I must admit, there are a few QA posters that it is tempting to sign up for some ... erm ... specialist ... websites...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
seriously, this is where http://mailinator.com[^] comes in terrifically handy.
All you do is make up your [name]@mailinator.com and you are good to go.
Later if you want to check that email, you can by going to the main page and typing your original [name] into the text box. Very easy and fantastic for all those coupons sites and the like.
Yes, the email can be read by anyone who has/guesses the one you used.
Yes, they email are stored in memory for (some time) and then trashed.
Try it, you'll love it.
|
|
|
|
|
There is also http://10minutemail.com[^] - which does what it says on the tin: the address lasts just ten minutes (unless you tell it you want another ten).
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I prefer AOL.
|
|
|
|
|
This is simply the design pattern "Only One Radio Button" exists
Bruno
modified 19-Jan-21 21:04pm.
|
|
|
|
|
A true horror. There were elections in Poland recently... and a software which was supposed to help in counting votes hasn't been working. It came out, that one day BEFORE elections it's source code was released to public on GitHub. It is full of security holes... In an availible manual there is a screenshot with actual login info and basically anyone can log in and manipulate results. The code looks like it was written by a single student who learns c#.
... and it doesn't work, also. It is a few days after elections and still no results. Here are some samples:
a constructor of an apparently important class ProtocolForm
public ProtocolForm(ProtocolsList form, XmlDocument header, string protocolDefinition, string candidates, string committee, string validateDefinition, string save, string OU, string licensePath, string version)
this.InitializeComponent();
this.tooltipErrors = new ToolTip();
this.isKLKCan = true;
this.isKLK = true;
this.isKLKPro = true;
this.isKLKWali = true;
...
string[] p = protocolDefinition.Split(new char[]
{
'\\'
});
this.protocolDefinitionName = p[p.Length - 1].Replace('_', '/').Replace(".xml", "");
string[] p2 = candidates.Split(new char[]
{
'\\'
});
this.candidatesName = p2[p2.Length - 1].Replace('_', '/').Replace(".xml", "");
string[] p3 = committee.Split(new char[]
{
'\\'
});
... (~100 lines)
foreach (XmlNode xObwod in headerRoot)
{
if (xObwod.Attributes["nr"].InnerText == obwod)
{
foreach (XmlNode xInst in xObwod)
{
if (xInst.Attributes["kod"].InnerText == inst)
{
foreach (XmlNode xobw in xInst)
{
if (xobw.Attributes["nr"].InnerText == okreg && System.Convert.ToInt32(xInst.Attributes["inst_jns"].InnerText) == System.Convert.ToInt32(this.instJNS))
{
organNazwa = xInst.Attributes["organNazwa"].InnerText;
break;
}
}
}
}
}
}
... (lines lines...)
if (inst == "RDA")
{
if (jns.Length < 6)
{
while (jns.Length < 6)
{
jns = "0" + jns;
}
}
if (jns[2] == '7' || jns[2] == '6')
{
if (jns.Substring(0, 4) == "1465" && organNazwa == "m.st.")
{
this.protocolDefinition = new XmlDocument();
... (~200 lines)
}
catch (XmlException e)
{
MessageBox.Show("Nieprawidłowy XML: " + e.Message, "Błąd");
}
... code code...
}
There are three methods: bool saves(int step) , string generateSaves(int step) and void saves(int step, string errors) . Each has 600 lines and it's copy&paste with some subtle changes. And they say that they lose data...
And a 800-line void getHeader() . Yep, it has a "get" in name and is a void...
{
this.wait.setWaitPanel("Trwa ładowanie nagłówka protokołu", "Proszę czekać");
this.wait.setVisible(true);
this.headerField = new System.Collections.Generic.List<string>();
string title = "Protokół dla ";
try
{
XmlNode nodesList = this.protocolDefinition.SelectSingleNode("/protokol_info");
XmlNode headerRoot = this.header.SelectSingleNode("/akcja_wyborcza/jns");
int x = 0;
int y = 0;
int fullWidth = this.protocolHeader.Size.Width - 20;
XmlNode updateData = this.header.SelectSingleNode("/akcja_wyborcza").Attributes.GetNamedItem("data-ost-aktualizacji");
string[] partfilepath = this.savePath.Split(new char[]
{
'\\'
});
string[] dataPath = partfilepath[partfilepath.Length - 1].Split(new char[]
{
'-'
});
this.jns = dataPath[1].Replace("Jns", "");
this.obwod = dataPath[2].Replace("Obw", "");
this.inst = dataPath[3].Replace("Inst", "");
this.okreg = dataPath[5].Replace("Okr", "");
string[] okreg = this.okreg.Split(new char[]
{
' '
});
this.okreg = okreg[0].Replace(".xml", "");
(lines lines lines)
foreach (XmlNode node in nodesList)
{
XmlNode type = node.Attributes.GetNamedItem("type");
if (!(type.Value == "header"))
{
break;
}
foreach (XmlNode box in node)
{
foreach (XmlNode item in box)
{
if (item.Name == "title")
{
x = 0;
XmlNode bold = item.Attributes.GetNamedItem("bold");
Label lab = new Label();
lab.Text = item.InnerText;
lab.AutoSize = true;
lab.MaximumSize = new System.Drawing.Size(fullWidth, 0);
lab.Font = new System.Drawing.Font(this.myfont, 10f);
lab.Padding = new Padding(10, 0, 10, 0);
if (bold.Value == "true")
{
lab.Font = new System.Drawing.Font(this.myfont, 10f, System.Drawing.FontStyle.Bold);
}
lab.Location = new System.Drawing.Point(x, y);
this.protocolHeader.Controls.Add(lab);
y += lab.Height + 30;
}
if (item.Name == "row")
{
x = 0;
... and after 400 lines, when nesting reaches 16 levels:
if (valueName.Value == "algorytmOKW_R")
{
foreach (XmlNode obw in headerRoot)
{
if (obw.Name == "obw" && obw.Attributes.GetNamedItem("nr") != null && obw.Attributes.GetNamedItem("nr").Value == this.obwod)
{
foreach (XmlNode institutions in obw)
{
if (institutions.Name == "inst" && institutions.Attributes.GetNamedItem("kod") != null && institutions.Attributes.GetNamedItem("kod").Value == this.inst && institutions.Attributes.GetNamedItem("inst_jns") != null && institutions.Attributes.GetNamedItem("inst_jns").Value == this.instJNS)
{
foreach (XmlNode okr in institutions)
{
if (okr.Name == "okr" && okr.Attributes.GetNamedItem("nr") != null && okr.Attributes.GetNamedItem("nr").Value == this.okreg)
{
if (okr.Attributes.GetNamedItem("siedzibaR") != null)
{
Input.Text = okr.Attributes.GetNamedItem("siedzibaR").Value;
}
}
}
}
}
}
}
}
A random gem found by people around (as I said, it was released to public):
public bool isActiveLicense(string license)
{
bool response = false;
try
{
System.Security.Cryptography.X509Certificates.X509Certificate certtmp = new System.Security.Cryptography.X509Certificates.X509Certificate(license);
System.DateTime a = new System.DateTime(1, 1, 1, 0, 0, 0);
System.DateTime fromDate = System.Convert.ToDateTime(certtmp.GetEffectiveDateString());
if (fromDate == a)
{
System.Threading.Thread.Sleep(1000);
fromDate = System.Convert.ToDateTime(certtmp.GetEffectiveDateString());
}
System.DateTime toDate = System.Convert.ToDateTime(certtmp.GetExpirationDateString());
if (toDate == a)
{
System.Threading.Thread.Sleep(1000);
toDate = System.Convert.ToDateTime(certtmp.GetEffectiveDateString());
}
int result = System.DateTime.Compare(fromDate, System.DateTime.Now);
int result2 = System.DateTime.Compare(System.DateTime.Now, toDate);
if (result <= 0 && result2 <= 0)
{
response = true;
}
}
catch (System.Security.Cryptography.CryptographicException)
{
}
return response;
}
And so on... Oh, and I have a bunch of license codes for paid libraries.
PS. I apologise for a long post.
modified 18-Nov-14 18:46pm.
|
|
|
|
|
Oh my god. Thanks for posting this. Is this intended to be used for actual election results? I.e. can flaws in this be used to affect the election, or does it just mean it will take longer for the tally?
|
|
|
|
|
Fortunately, every vote is on paper... somewhere. So theoretically nothing is lost. But depending on the results, an election will be repeated or not. If a current goverment loses, then election are likely to be repeated. This is how it works nowadays. The most tragic part is that people vote on them anyway.
|
|
|
|
|
|
Ok... everyone has to start somewhere... but...
(yes|no|maybe)*
|
|
|
|
|
Why do you complain? It doesn't use goto statements to leave the inner nested for loop, does it?
I know people who'd call that Clean Code, and who won't understand why it so hard to write Unit Tests for such great functions.
That's the consequence when code is more valued than concepts .
|
|
|
|
|
Bernhard Hiller wrote: Why do you complain? It doesn't use goto statements to leave the inner nested for loop, does it?
I know people who'd call that Clean Code, and who won't understand why it so hard to write Unit Tests for such great functions.
That's the consequence when code is more valued than concepts .
1. Because the app doesn't work and we don't have elections results.
2. Several hundreds of thousands institutions rely on it.
3. This is a freakin country-wide vote counting system, not a simple inside-app which can break and it isn't a big deal.
|
|
|
|
|
I think Bernhard had his tongue firmly implanted in his cheek.
|
|
|
|
|
Jacek Gajek wrote: It came out, that one day BEFORE elections it's source code was released to public on GitHub.
According to this[^], it was decompiled rather than released as open-source. It's still crap, but at least it's not crap that the public were supposed to see.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
This is true. BTW, people who manage elections have their positions for years. They began their "carreers" in communizm, when they were simply told what results are and it wasn't necessary to count votes. Now, since 25 years we have democracy and it seems that they still didn't get used to a new system. I bet most of them don't know how to receive an e-mail, not talking about testing a computer program.
|
|
|
|
|
And the procurement went like: My nephew is programming webpages, maybe we should ask him.
Wrong is evil and must be defeated. - Jeff Ello
Any organization is like a tree full of monkeys. The monkeys on top look down and see a tree full of smiling faces. The monkeys on the bottom look up and see nothing but assholes.
|
|
|
|
|
Your time will come, if you let it be right.
|
|
|
|
|
Richard Deeming wrote: t was decompiled rather than released as open-source Apparently it's from a PDB file. That essentially contains the original full code.
Notwithstanding tools like .NET Reflector can revert C# apps back to original code as well. They'll have to run ngen to hide anything.
Presumably the "winner" had more important matters to deal with, so they gave them the PDB so they could debug anything that went wrong.
|
|
|
|
|
I noticed the error messages are some weird moon man language.
Wow, that is messed up.
|
|
|
|
|
MehGerbil wrote: I noticed the error messages are some weird moon man language. Well, they are in a native language for app's users. To nie jest żaden język z księżyca.
|
|
|
|
|
I can see that election is a tough process. It is tougher after voting.
TOMZ_KV
|
|
|
|
|
Let's give the author a break, shall we: I am almost certain, given the code style, the author learned C# programming here on CP by using QA !
«If you search in Google for 'no-one ever got fired for buying IBM:' the top-hit is the Wikipedia article on 'Fear, uncertainty and doubt'» What does that tell you about sanity in these times?
|
|
|
|