Author: Naught
Author Website: unitedoperations.net

Requirements: Community Base addons, Community Base addons A3

Version: 1.0.0.1 Alpha
Signed: Yes, serverkey included

Short description: An extension-based DLL which extends the Arma engine with new features like hashing, regular expressions, and remote file downloading.

Date: 2013-10-11 10:43


Comments: (0)
Rating:



 



Naught.Net

by
Naught


Description:
An extension-based (.dll) addon that extends the functionality of the Real Virtuality engine with multiple features accessed via an extensive API detailed in the "Function index" below.

Works with: An unofficial addon for the PC game "Arma" by Bohemia Interactive.

What is Naught.Net?
Naught.Net is an extension-based (.dll) addon that extends the functionality of the Real Virtuality engine with multiple features accessed via an extensive API.

What features does Naught.Net offer?
Naught.Net offers many features, currently allowing for hashing (MD2, MD4, MD5, SHA1, and SHA256), regular expressions (regex-based matching, searching, and replacing), and file-downloading (this is handler-based and completely multi-threaded).

How does file-downloading in Naught.Net work?
Naught.Net uses handle-based multithreading to download files from local and remote networks. This works by requesting a file and downloading it asynchronously from the main Arma process while the SQF engine continually asks (per-frame) the extension if the download has finished. Once done, the extension will return the file (up to 1MB in size using truncating and chunking techniques; this is the limit due to security issues, so it may be increased later) as a [perfectly safe] string to the SQF engine which will then call the supplied handler code, passing the file as the primary _this variable.

What if I want a function that isn't yet apart of Naught.Net?
Request it here by posting a reply in the BI Forums Thread, and maybe it'll make its way into Naught.Net!

Where can I report issues about Naught.Net?
Post them up as a reply in the BI Forums Thread, and I'll parse through them within 48 hours.

Technical Specifications
  • Multi-threaded handler-based support
  • Chunking and truncating for nearly unlimited inter-communication (Extension to Arma) bandwidth
  • Max concurrent threads: 10
  • Max Download bandwidth per thread: 1 MB, Max Upload bandwidth per thread: 512 KB
  • Download support for HTTP (POST & GET), HTTPS (POST & GET), FTP (untested), SSH (untested), and more.

Installation:
As we always recommend use modfolders to seperate the custom content from the official game content to prevent problems. For different ways to set up your modfolders and use them please visit our FAQ.

When you are using the Steam version you can find a Steam mod installation and activation FAQ here.


Included files:
naught.net.strings.pbo
naught.net.network.pbo
naught.net.main.pbo
naught.net.common.pbo


Usage:
Function index:
All extension returns of the return data-type [Return] consist of either a string of the return data [String] on success,
an extension-internal handle [Int] on multi-threaded applications (although by using the below functions this should not be
returned), an error [Boolean false] on an extension-internal error, or a null data-type [Nil] on a null (or empty) return.
Data checks should be mandatory after a call to one of these functions.

NOTICE: All tilde (~) characters sent to the extension WILL BE REPLACED by the minus (-) character prior to the transfer.

Common functions:
NDT_fnc_getVersion
Description:
Get version of the Naught.Net extension (Naught.Net.dll).
Parameters:
None
Return:
Version [Return] (empty string if extension is unloaded).
Example:
_version = [] call NDT_fnc_getVersion;

String functions:
NDT_fnc_hashString
Description:
Hash a string. Hash Types are: 0=MD2, 1=MD4, 2=MD5, 3=SHA1, 4=SHA256.
Parameters:
0: Text [String],
1: Hash Type [Integer] (Optional).
Return:
Hash [Return].
Example:
_hash = ["hash this string", 3] call NDT_fnc_hashString;

NDT_fnc_regexMatch
Description:
Check if text matches a given regular expression.
Parameters:
0: Text [String],
1: Regex [String].
Return:
Encapsulated Boolean [Return] (ie. "true").
Example:
_encapBool = ["subject", "(sub)(.*)"] call NDT_fnc_regexMatch;

NDT_fnc_regexSearch
Description:
Search text for characters matching a regular expression.
Parameters:
0: Text [String],
1: Regex [String],
2: Max Iterations [Int] (Optional).
Return:
Encapsulated Array [Return] (ie. "[['match1'], ['subMatch1', 'subMatch2']]").
Example:
_encapArray = ["this subject, that submarine, every subsequence", "\\b(sub)([^ ]*)", 2] call NDT_fnc_regexSearch;

NDT_fnc_regexReplace
Description:
Replace all characters matching a regular expression.
Parameters:
0: Text [String],
1: Regex [String],
2: Replace With [String] (Reference http://www.cplusplus.com/reference/regex/match_replace/).
Return:
New Text [Return].
Example:
_newText = ["there is a subsequence in the string", "\\b(sub)([^ ]*)", "sub-$2"] call NDT_fnc_regexReplace;

Network functions:
NDT_fnc_newDownloadHandler
Description:
Create a new download handler to download a file and call code.
Parameters:
0: Address [String] ("protocol://address.domain:port"),
1: Handler Code [Curly-Braces] (Passes download return as _this [Return]),
2: TimeOut Seconds [Int] (Optional),
3: Post Data [String] (Optional).
Return:
Handle to Asynchronous (Spawned) Code [Script].
Example:
_scriptHandle = ["https://www.google.com", {dl_data = _this;}, 30, "request=search"] call NDT_fnc_newDownloadHandler;


Source:
You can view the source of these files here: http://kobuntu.net/games/arma/addons/naught_net/Naught.Net_1.0.0.1_WS.rar


Notes:
Dylan Plecki (Naught) can be contacted either through the UnitedOperations.Net forums as <Naught> or via email at


Future plans:
Get Real Time (with time zones).
XML / YAML Parser.
Database Support.
2-Way Encryption Support.


License:
Copyright © 2013 Dylan Plecki <dylanplecki@gmail.com>
All rights reserved.

Naught.Net is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Naught.Net is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.


Changelog:
v1.0.0.1
- Initial Release


Forum topic:
- BI forums



For usage in Arma 2 / Arma 2: Operation Arrowhead:
- Community Based Addons

For usage in Arma 3:
- Community Based Addons A3[/script]




Enable javascript to be able to download from Armaholic please!



Tags: Extension,   Hash,   Regex