Currently working on a certificate transparency logs. My goal is to read each log just like what CertStream - (Open the fire hose button) did, my boss wants to create another one that is written in C#. Just a simple code to parse the logs can really help me. Not necessarily as fancy as CertStream does its stuff.
These are the following links/APIs that I've read:
(API's from Google or related)
https://ct.googleapis.com/pilot/ct/v1/get-sth
https://ct.googleapis.com/logs/argon2020/ct/v1/get-entries?start=20200201&end=20200205
https://www.rfc-editor.org/rfc/rfc6962
Valuable info:
https://certstream.calidog.io/
https://stackoverflow.com/questions/59772797/cant-parse-precertificate-from-certificate-transparency-log
For the code I started,
byte[] byte_LeafInput = Convert.FromBase64String(leaf_input);
byte[] byte_extradata = Convert.FromBase64String(extra_data);
string strLeafInput = Encoding.UTF8.GetString(byte_LeafInput);
string strExtraData = Encoding.UTF8.GetString(byte_extradata);
But it only shows some gibberish data with few readable words.
Any codes or libraries that can help me with that? Upon searching, I found so many codes written in different languages like Python, Go, etc., but based on what I understand in their code, they are also using libraries which is not available in NuGet. X509Certificate might be useful but I don't know how to use it in this case.
Any lead would really be appreciated. Thank you.
Upon searching for a long time. My boss advised me to get the logs and parse it through Python and save that in a text file or csv. After that, my program in C# can use all functions to analyze the information in the created text file. I guess using the current wheel is more efficient than creating one. :)
Related
Just for my personal interest, I see from my research that it's not that easy to start your own OCR. However, I would like to hear ideas on how to achieve the challenge of not just recognising characters, but also giving back the results in the formatted string.
For example, I have an image of a table (imagine that it's an image with "|" and "_" being drawn straight lines):
|Number, AnotherNumber|Some Text|
|1,4 |Blah |
And after using a silent OCR, I get the result as "|Number, AnotherNumber|SomeText|\n|1,4|Blah|"
Any ideas of how could I achieve this, and what available tools/libraries I could make use of? I also would like to write this in C# with Visual Studio 2010. And ideally to work with PDFs but different image formats are fine. I've already looked at some, but they seem non-compatible as they use C++ or C.
Thank you.
Alina.
getting ocr libaries is quite hard (of course just if you dont pant to pay for it)
you could try this one, its not free but if you have office 2007:
http://www.codeproject.com/Articles/41709/How-To-Use-Office-2007-OCR-Using-C
Let's say I have a file: test.txt and I save it on my harddisk.
Is there a way to determine on what (physical) spot the file is saved on the hard disk?
For example on vector 12 on track 10 of the hard disk.
I don't know if I got the terminology right of the above, but I hope you get what I mean.
I want to write of program wheer the user can point to a file and the program will find out where the file is on the HDD. Something like the old defrag (it's Windows ;) ) where it shows what parts of the disk is in use.
What is this called and can it be achieved? (I'm not looking for code (although exmaples are ok ofc), but rather whether it is possible)
P.S. The client will be Windows 7 (so think NTFS if it matters).
I'm pretty sure that doing that sort of low-level disk i/o in managed code is going to be...difficult, at best. Here's somebody that's done something like it:
http://codebrainz.ca/index.php/2010/05/23/low-level-disk-io-in-managed-net/
Anything you write to do something like this has to be hardware-dependent: unless you know what hardware you're talking to, you've got no idea how it physically stores data (e.g., a USB memory stick has neither platters, tracks nor sectors, nor does it spin. Yet, for all intents and purposes, it appears to be a disk).
Normally, you'd write some sort of device driver to accomplish this. This link
http://en.wikibooks.org/wiki/Windows_Programming/Device_Driver_Introduction
might help.
In Jeffrey Wall's WebLog you will find Defrag API C# wrappers. His GetFileMap method sems to come close to what you need.
It is possible from C++, so with a little interoping, you should be fine.
Look up FSCTL_GET_RETRIEVAL_POINTERS in the MSDN to get you started.
guys I need some help for days now I have been looking for a way for signing firefox XPI file,
but i didn't found any thing that works ( including here ) the posts I found where very old,
and not compadiable with new firefox version.
does any body here know how to?
thanks in advance.
p.s
I want to write a packer\signer in c#
edit:
im using mcCoy CA that MDN says valid.
i know there is a python script that sign add ons but i dont know pyton so please advice something else and for that matter i preferably dont watnt to use java...
If you are asking for a code example in Java, there is XPISigner. However, its source code seems rather complicated, you might have better chances if you look at the signature format description and the simple Python example script. It is mostly simple, the "complicated" part is only generating a detached RSA signature of the META-INF/zigbert.sf file (stored in META-INF/zigbert.rsa). Note that META-INF/zigbert.rsa has to be the first file in the XPI archive.
I have got problem, I need to download graphics from next site
http://www.kakioka-jma.go.jp/cgi-bin/plot/plotSetNN.pl?lang=en
I am using PowerShell, I need to create POST request to Plot the image (see Plot button). The problem that I do now know how it's can be done in PowerShell. Before I used function 'System.Net.WebClient' for downloading, and created url for it with
I googled and find how POST request may be done in C#, and I tried to built them in one script. http://www.everfall.com/paste/id.php?2ppnztfqx3we
But it's not working, it's even do not print "Hello World", and I do not know how to get it's work.
But the main question - not get this code to work, but to find the easiest way to load that graphics, and it would be good if it would on Powershell.
I have seen "Http Rest" script, but it's to hard even to understand does it do what I need, I even do not talk about to modificate it's for my work. I need the simplest way, because my knowledge in programming it now good.
I wrote a series a while back on Splatting (a language technique in PowerShell V2). The last item in the series provides a wrapper on the Net.WebClient class that makes it easier to send requests via Post.
The blog explains a lot about how the client object works, and you can read that if you want:
http://blogs.technet.com/b/heyscriptingguy/archive/2010/10/22/make-windows-powershell-your-web-client.aspx
Or you can download the script directly from the Script Center Repository:
http://gallery.technet.microsoft.com/ScriptCenter/en-us/7e7b6bf2-d067-48c3-96b3-b38f26a1d143
Hope this Helps,
It sounds like curl could be useful for you. It will deal with the trickier aspects of posting data to a web service.
I've used it myself to download text and parse through it with PowerShell. I had a batch file to call curl, the batch file was called from a powershell script. Sounds the long way around but it worked quickly and I didnl't have to put much time in!
I'm on my phone and don't have any examples here, if you interested I can have a look for them later.
HTH,
Matt
Is this even possible?
I realize that asking them to enter data when the program runs and saving it in the executable file itself is out. (Or is it?)
Right now I'm considering trying to build the program server-side with php and have it incorporate a separate text file which would contain the information. This seems marginally feasible, though I would have quite a bit of learning to accomplish it.
I was hoping for some other ideas of how I might accomplish this.
I am not interested in separate configuration or text files or putting data in windows registry. I am only looking for solutions where it can be quite-solidly a part of the executable.
Does anybody have any experience with this?
Thank you.
Its perfectly possible, that's how self-extracting zip files work.
Basically, you can add as much stuff to the end of the executable file as you want. Your program can then open its own file up on disk and read it back.
How about using Settings within your app? It depends on what you mean by "storing the user registration" as to how you would best achieve this, though. If you could give some more information about what you actually want to store, that would be useful.
An example would be to save a username, or an authentication token, and use that each time you need to check a "registration". As I say, though, the details of what to store would depend entirely on what you want to do it that data...
You could use it to embed in the unmanaged resources.