Topics - wraith808 [ switch to compact view ]

Pages: [1] 2 3 4 5 6 ... 119next
1
N.A.N.Y. 2023 / NANY 2023: Binance Test App
« on: January 01, 2023, 11:00 PM »
NANY 2023 Entry Information

Application Name Binance Test App
Short Description This utility is a start to satisfying a coding request for a Binance Notifier - testing the API. It allows you to see your balances, see all ticker prices, and query your orders
Supported OSes Any Windows version that supports .NET Framework 4.8 (tested on Windows 10/11)
Web Page to be added
Download Linkhttps://keybase.pub/chuckdee/software/BinanceTestApp.zip
System Requirements.NET 4.8
Authorwraith808



Description
I started working on a tray notifier for Binance, but have been unable to test it as I've been unable to verify. I didn't want to release that without testing, so am releasing my initial POC app in its stead.

You will have to sign up for Binance, and get an API Id and secret key in order to use it. The application will also ask you for the API url - https://api.binance.us for US clients.

Installation
Unzip to the place of your choosing. If you want to make it completely portable, then you will need to add a BinanceTestTool.config text file, otherwise it will create it in the AppData folder.

Run BinanceTrayTool.exe (it's still named for the app it will hopefully one day be)


Uninstall

Remove the files! Other than the possible config file in the Appdata folder, it will make no other changes to your system.

Screenshots and Minimal Instructions

binance_Main_Screen.jpg
This is the main screen you will be presented with. Press the settings button to start


binance_Settings.jpg
In this screen you will enter your API Key, Secret Key and Endpoint

binance_in_Action.jpg

Then you should be able to use the functionality!

2
General Software Discussion / The End of the Atom Editor
« on: June 08, 2022, 08:14 PM »
I tried it back in the day, but didn't find anything better than Sublime Text... then I started using VS Code, and it was better than both. I guess a lot of people had similar experiences.

Today GitHub announced it will archive Atom and all projects under the Atom organization for an official sunset on December 15, 2022.

Did anyone else use Atom?

3
Developer's Corner / Searching and updating XML file in PowerShell
« on: March 22, 2022, 07:54 AM »
I have the following bit in a Powershell script:

Code: PowerShell [Select]
  1. [xml]$xmlConfig = Get-Content "odata.xml"
  2. $validNodes = $xmlConfig | Select-Xml -XPath '//variable' | %{$_ | ?{((($_.Node.Property.Name -eq "id") -and ($_.Node.Property.Value -eq "this-is-the-node")))}}
  3. if ($validNodes.Count -gt 0)
  4. {
  5.     $validNodes.development = $encryptedcredentials
  6. }

And it's not returning valid nodes, even though the node is there.

The XML file looks like the following:

Code: Text [Select]
  1. <configuration>
  2.   <variable>
  3.     <id>this-is-not-the-node</id>
  4.     <development>2</development>
  5.     <staging>0</staging>
  6.     <production>0</production>
  7.   </variable>
  8.   <variable>
  9.     <id>this-is-the-node</id>
  10.     <development>2</development>
  11.     <staging>0</staging>
  12.     <production>0</production>
  13.   </variable>
  14.   <variable>
  15.     <id>this-is-not-the-node-either</id>
  16.     <development>2</development>
  17.     <staging>0</staging>
  18.     <production>0</production>
  19.   </variable>
  20. </configuration>

I want to select the valid node, then edit the value for development under that node.

Any ideas what I'm doing wrong?


4
N.A.N.Y. 2022 / NANY 2022 Pledge: S3 Warp Transporter
« on: December 09, 2021, 09:41 AM »
NANY 2022 Entry Information

Application Name S3 Warp Transporter
Version None Yet
Short Description A way to easily transport files/text using S3 as an intermediary
Supported OSes Windows
Web Page Yes, it will have one
Download Link https://keybase.pub/chuckdee/software/S3WarpTransporter.zip
System Requirements
  • Modern Windows
  • x86_64 architecture CPU
  • AWS S3 Bucket
  • .NET 5.0
Version History
  • 2022-01-02
    - Initial Release
Author wraith808


Description
I started using Wormhole William, but there's a problem of the bandwidth for the nodes in the transfer. There are several transfer options for using S3 as a backing store, but all of them are pretty heavyweight. So I decided to roll my own- mostly because I'm doing AWS certification course right now, and it's a good way to keep the memories of the earlier lessons while I move on to the rest of the course.

Installation

Installing S3 Warp Transporter is simple- just unzip the archive where you want it installed. You will also have to set up your own S3 Bucket on AWS and Create an IAM with AccessKey/SecretKey. This was intended to solve a problem that I had in using Clipboard Fusion and other clipboard sharers, so it's not exactly non-tech-savvy user friendly.

The first thing I'll cover is the recommended settings for the S3 bucket - I'd recommend that it not be public. You can find simple rules for setting up one at https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-bucket.html. The bucket does not need to be public for the application to use it. If you're using it as I am, I'd suggest not making it public.

I also set up lifecycle rules on my bucket, so I don't have to worry about cleaning it up - it's just meant for ephemeral storage as I move things from one computer to another. My settings for my bucket are below:

Step 1: Create the lifecycle rule and apply it to all objects in the bucket
bucket_setup_00.jpg

Step 2: Adjust the rule action to expire current versions of objects after 7 days
bucket_setup_01.jpg

Step 3: Review the rule - it should look like the below image
bucket_setup_02.jpg

Next, we need to create the IAM user. You can find steps on creating one at https://binaryguy.tech/aws/s3/create-iam-user-to-access-s3/

Two notes on creation.

Note 1. Make sure to make the user use an access key for programmatic access
bucket_setup_03.jpg

Note 2: The easiest policy to use is the canned one for AmazonS3FullAccess
bucket_setup_04.jpg

You can get more granular and give the user access to only that particular bucket, and only listobjects, putobject, putobjectacl, getobject, getobjectacl, and headobject, permissions, but that's a more advanced operation. I might detail that a bit later in the more formal user guide.

Download the credentials, and note the region you created the bucket in, and the bucket name- you'll need those in the next step.

After getting everything set up, you're ready to run S3WarpTransporter.

First Run

When you first run the application, it will put a taskbar notification icon of a little rocket (thanks to Paul Davey aka Mattahan).
first_run_00.jpg

Right click on that icon, and a menu will show up:
first_run_01.jpg

Choose settings - this is where you will enter your bucket info and the directory you want objects downloaded into (it will be a bit less blurry, of course)
first_run_02.jpg

Usage

After entering your settings, you'll be in business. To go back to the menu image and explain:
first_run_01.jpg

  • Upload File - Opens a file dialog for you to select what file to upload. After it is uploaded, you will be given the key for the item, and it will be copied to the clipboard
  • Upload from Clipboard - If you have a filepath on the clipboard, that will be uploaded. If it is not a filepath, it will be uploaded as text.
  • Download Key from Clipboard - if you copy the key of a previously uploaded file to the clipboard, it will download that object
  • Settings - We went through that on first run, though if you need to change them, this is the place
  • Exit - Close the icon

Future enhancements

Better documentation, about box, and web page- being sick for much of December, I got a late start on this, so don't have that set up.
Better handling of file extensions on download - when I upload an object, I get the mime type from the extension. However, extensions to mime types are a different story, as they map to a large list- for example, text/plan has 8 different extensions in the apache mime type table. When querying those, they come back in alphabetical order- and the first one is 'conf'. I need to make my own implementation of this, and restrict it to common file types so I have a better chance of getting them right. Or even better, I'll store the original file name in the metadata for the object.
More settings - run at startup would be a nice addition.
Dialog to enter the Key. The clipboard is nice and convenient for my use, but I know that it might be inconvenient to copy the key to the clipboard. Maybe. I haven't thought this through completely.

5
Developer's Corner / 'Trojan Source' bug
« on: November 02, 2021, 10:52 AM »
From Krebs on Security (https://krebsonsecurity.com/2021/11/trojan-source-bug-threatens-the-security-of-all-code/)

Researchers with the University of Cambridge discovered a bug that affects most computer code compilers and many software development environments. At issue is a component of the digital text encoding standard Unicode, which allows computers to exchange information regardless of the language used. Unicode currently defines more than 143,000 characters across 154 different language scripts (in addition to many non-script character sets, such as emojis).

Specifically, the weakness involves Unicode’s bi-directional or “Bidi” algorithm, which handles displaying text that includes mixed scripts with different display orders, such as Arabic — which is read right to left — and English (left to right).

But computer systems need to have a deterministic way of resolving conflicting directionality in text. Enter the “Bidi override,” which can be used to make left-to-right text read right-to-left, and vice versa.

“In some scenarios, the default ordering set by the Bidi Algorithm may not be sufficient,” the Cambridge researchers wrote. “For these cases, Bidi override control characters enable switching the display ordering of groups of characters.”

Bidi overrides enable even single-script characters to be displayed in an order different from their logical encoding. As the researchers point out, this fact has previously been exploited to disguise the file extensions of malware disseminated via email.

Here’s the problem: Most programming languages let you put these Bidi overrides in comments and strings. This is bad because most programming languages allow comments within which all text — including control characters — is ignored by compilers and interpreters. Also, it’s bad because most programming languages allow string literals that may contain arbitrary characters, including control characters.

“So you can use them in source code that appears innocuous to a human reviewer [that] can actually do something nasty,” said Ross Anderson, a professor of computer security at Cambridge and co-author of the research. “That’s bad news for projects like Linux and Webkit that accept contributions from random people, subject them to manual review, then incorporate them into critical code. This vulnerability is, as far as I know, the first one to affect almost everything.

The research paper, which dubbed the vulnerability “Trojan Source,” notes that while both comments and strings will have syntax-specific semantics indicating their start and end, these bounds are not respected by Bidi overrides.

Emphasis mine. More at link.

Has anyone heard of it? It's been many years since I've worked with anything at this low a level, so I can't really comment on how serious it is.

Pages: [1] 2 3 4 5 6 ... 119next
Go to full version