Jump to content

CopperD

Members
  • Posts

    42
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by CopperD

  1. Perhaps you could let the user toggle between Debug mode and Release mode? Debug mode performs checks and flashes big angry warnings if a violation is found; Release mode assumes that the developer has already combed through their code using Debug mode, so it skips the checks.

    That is a great idea, I'm going to do that.

     

    Now a little extra information just so I can picture ShaunR cringle. Once TCC has compiled the program I copy the compiled code into an empty pointer from DSNewPtr of compiled function size. :yes:  I also get the starting location of main for the program. Next the memory space is set executable.  :shifty: Finally when you want to run the program we call it as a function pointer.  :D If only we had a good way of doing this inside LabVIEW without resorting to a buffer overflow. My options currently are using a small program in TCC or libffi. Libffi would be very useful in the future and for other projects.

  2. Nice to see that someone else had fun doing this. I am trying to find a nicer way to put it all together. All the SDL functions can be used directly by LabVIEW, some just require creative use of pointers. Using SDL for OpenGL is much nicer then what LabVIEW offers. 

  3.  

    Has no-one created a vmware image yet?

    Building Linux distros is like unraveling a jumper with chopsticks to make a tank-top.

     

     

    If you have one with NI Linux RT just pull the drive and image it. I suspect it would just boot as it looks like a standard x86 machine.

  4. C++ is such an awful bastardization of C.

     

    Unless you're being stupid setting the GPF interrupt is unlikely. Windows should handle this before you ever get to that level. Your program will still get killed but you don't need to worry about the CPU starting to wonder if it should halt. I was thinking about adding code to check where the page the pointer is in and its access permissions. Its extra overhead and training wheels so I don't know how I feel about it. Maybe a global flag in a list of options so it's only a jump if you don't want to perform the check.

  5. These are going to all become private functions in the near future. I am only going to have a few functions available to the normal user. This is my general plan for a library.

     

    LV_DCG_Compile_String_Program.vi (Complete C program or Library going to disk as DLL ) (Overwrites if name is same as previous compiled code)

    Inputs

    Mode (Memory, Exe, Dll) required

    Program name/name of exe or dll (String) required

    Code (String) required

    Error in

     

    Outputs

    Error out (Set if not compiled and string with why)

     

    LV_DCG_Compile_String_Library.vi (Collection of functions) (Overwrites if name is same as previous compiled code)

    Inputs

    Library name (String) required

    Code (String) required

    Error in

     

    Outputs

    Error out (Set if not compiled and string with why)

     

     

    LV_DCG_List.vi (List compiled programs and library functions)

    Inputs

    Mode (Programs, Libraries, Library Functions, All Library Functions, All) 

    Library Name (String)

    Error In

     

    Outputs

    Names (1D array of strings) (Programs names, libraries, or library functions in "Library_Name.Function_Name")

    Error Out

     

     

    LV_DCG_Run_Program.vi (Runs Programs using argc argv or none at all)

    Inputs

    name (String) required

    Arguments in (1d array of strings)

    Error in

     

    Outputs

    Program Return (int)

    Error out

     

    LV_DCG_Run_Function.vi (Requires the function prototype, return type, and data in)

    Inputs (I am thinking about this one)

    name (String) Required

    Return Size (int) Required

    Prototype and data (1D Array of Cluster(Data type(u8) ,value(var))

    Error In

     

    Outputs

    Program Return (1d array of bytes of size return size)

    Error out

     

    LV_DCG_Manage.vi (Remove program, Remove Library, Remove All)

     

    I'll add preprocessor and other functions for adding dlls and such later. But I want it simple and sweet. No libbitcoin (C++) but libccoin or picocoin.  :yes:

     

    I like the check for a zero on the pointer, that could save a lot of debug time.

     

    No clue why I used an int for the pointer.  :frusty:

     

    I see DSNewPtr and DSDisposePtr but no MoveBlock.  :(   I remember the GetValueByPointer xnode and being burned because it wouldn't compile.  Hmmm it compiles now  :thumbup1: Still no poking unless you use moveblock. Do they have some look but don't touch policy at NI? 

     

    This reminded me of Dr Cold hands at MEPS. We were told to bend down and spread em. Then Dr was going to take a peek and if the Dr didn't like what he saw he would take a poke.

     

     

    I have a dream that one day Call Library Function Node will accept function pointers rather than just a path. 

    • Like 1
  6. index.php?app=downloads&module=display&section=screenshot&id=284

    Name: DCG

    Submitter: CopperD

    Submitted: 16 Feb 2016

    Category: *Uncertified*

    LabVIEW Version: Not Applicable

    License Type: Creative Commons Attribution 3.0

    Allows new functions to be compiled during runtime by using libtcc. http://bellard.org/tcc/

     

    Features
    Full ANSI C compiler 
    ISO C99 extensions (Missing only complex and imaginary numbers)
    GNU C extensions (See TCC Docs)
    TinyCC extensions (See TCC Docs)
    GNU-like inline assembler
     32bit & 64bit opcodes depending on DLL (See TCC Docs)
    Compile to memory to call as function or disk as exe
    Allows for dynamic code
    Pointer safe checks

     

    Examples

    Adding 2 numbers and using return to get the result

    Using system to call cmd

    Inline x86 assembly

    Passing in information using argc and argv

    Using pointers to pass a string in and an SHA512 hash out

     

     

    Uses libtcc unmodified, so for security reasons you can download the dll from the author's website or compile your own from source. The dll is included if you wish to use it.

     

    Some very basic examples that show off only a tiny subset of the features this compiler offers. Unless you are very careful, compiling functions during runtime can lead to unstable code. (Test before you deploy) All examples should run without issue but modification can and will lead to crashing. (Save often)

    Click here to download this file

  7. I'm guessing at this point this won't surprise anyone. (See attached) I did this in early/mid 2011. Now that I see someone else has done a much better job (VI Explorer), I don't mind admitting to this. As the VI Explorer is so well written compared to this the picture is all I'm giving out.

     

    I figured this out while exploring the VI file formating trying to think of some crazy way to do a quine. The MD5 null hash popped out and gave it away. The two hashes next too it took a few days. I never did much with this afterwards as it was nicer to just tell LabVIEW the password is correct.  :cool:

    post-54463-0-39719400-1455597870.png

  8. index.php?app=downloads&module=display&section=screenshot&id=283

    Name: Mandelbrot Explorer

    Submitter: CopperD

    Submitted: 15 Feb 2016

    Category: *Uncertified*

    LabVIEW Version: Not Applicable

    License Type: Creative Commons Attribution 3.0

    Simple Mandelbrot explorer that I wrote a few years ago.

     

    Features

    Many predefined color pallets

    Rolling color pallet to produce motion effect

    Ability to customize the color pallet

    Log color mapping

    Keyboard or mouse control

    Basic shortcut keys

    Saving high res images

     

    Needed improvements

    Clustering to clean up code more

    Save settings

     

    Operation

    Load project in LabVIEW 2015 32/64 bit

    Start program using Mandelbrot Main.vi

    Click here to download this file

    Did I miss something then I uploaded the UI image? It is clipped along the right edge.

     

    Also no selection for LV version above 2012. I rather not clutter my home machine with several versions. If needed I can spin up a VM and save for prior versions. The code is rather basic so should work going pretty far back. I think I originally did this in 2012 or 2011.

    • Like 2
  9.  

    Been there, done that. T-shirts on sale soon. :lol:

     

     

    Very nice, it looks very well put together. Have you seen http://cryptopals.com/? I have been working my way though the sets. 

     

    I have a few Fujitsu RX-600 S5s that I bought for genetic algorithms, neural networks, and other playing around. (The parallel limit of 64 on for loops in annoying :yes: ) These seem to be one of the best price points for used x86 iron. 64 Threads 4x X7550 or X7560 with 32-64GB of ram at under $1000 if you're careful. Then add extra ram as needed up to 1 or 2 TB. I keep two under my desk with dual 40Gbps infinite band links $75-100 per machine. I suspect all this cheap hardware comes from the high speed trading market when they upgrade. The other cost for running them is power. They eat 550 watts at idle and 1200-1600 watts each at max load then an equal amount of power for cooling.

    post-54463-0-73054200-1455552152.jpg

  10. Someone actually asked me about x86 emulation not too long ago, so it's nice to see that someone is crazy/bored enough to try. That's certainly a jump from the C64 or Apple][ emulators you can find on NI's site.

     

    It is pretty much a straight C to LV conversion and I am about %25 complete with the grunt work before I can move into the meat. It's the 3rd time I've ripped it up and started over now. First was using 8086tiny but it lacks features I wanted, now it is fake86. 

     

     

    OTF compiler for encryption? Please! :P That's polymorphic virus country and you know it :D Looking forward to that one too :thumbup1:

     

    Pure LabVIEW graphics sounds cool. The LabVIEW picture control, like most LabVIEW UI, is decades old so I'm looking forward to comparing with the Bitman library as well as the picture control.

     

    You might want to consider putting them in the CR so that versioning and updates are easier. Posting products in threads gets real messy, real quick and you always end up with support issues for outaded posts because they found them on search engines. You can put them in the uncertified to begin with then get them moved to the certified sections when you are happy with them.

     

    Take the compiler with the pastebin for C&C, add openssl wrapper for public key encryption and steam encryption, and use the neural network for further obfuscation. :D Read the write up I need to do on stripping the LV runtime so you can run LabVIEW executables without having an installer for the runtime.  :shifty: Strip DLLs of debug information NI includes (Thank you) then if you're feeling really hardcore strip unused functions and recalculate offsets and header information. The last part is really much more complex then I made it sound. Now that I alienated everyone form using one of my DLLs on to the next topic. 

     

    The LabVIEW graphics engine uses the intensity graph as the display. Testing so far has shown this to be much faster than the picture control. The real magic is in the frame buffer you can work on before you display. You're limited in your color selection but for my applications that was not an issue. I am at the point where I need to complete the grunt work for drawing functions. I have nice CP437 bitmaps for the fonts.

     

    I will start using the uncertified section, thanks for the tip.

    • Like 1
  11. Pastebin Functions and Auto Archive


    Older project meant for a simple command and control system based around pastebin. Includes a Pastebin auto archiver example


     


    Features


    Bypasses developer API - Uses the same web interface as your browser


     


    Auto Archiver "Pastebin Archive Main.vi" - Working 02/15/16 Searches the archives and downloads all unseen messages to disk. Avg of 25GB per week if I remember correctly. Saves to c:\pastes


     


    Check archives for messages "Pastebin - Archive.vi" - Working 02/14/16


     


    Search for messages "Pastebin - Search.vi" - Working 02/15/16 - Max results per page 10 and pages are zero indexed


     


    Fetch "Pastebin - Fetch.vi" - Working 02/15/16 - Downloads the contents of a paste


     


    URL "Pastebin - URL.vi" - Working 02/15/16  Grabs basic information about a paste using the URL


     


    Post "Pastebin - Post.vi" - Broken/Detected 02/15/16 - Posts are nolonger set as public and have triggered anti-bot measures. Need to check what differs between my post and my browser post as this has changed. More than the new key location has changed.


     


    Needed improvements


    More examples


    Documentation


    Fix Post


    Add create dir when saving if does not exist to archive example


     


    Operation


    Load project in LabVIEW 2015 32/64 bit

    Pastebin.zip

  12. Mandelbrot Explorer - Moved to Code Repository
     
     

    fDV5S4w.png

     

    Simple Mandelbrot explorer that I wrote a few years ago. Just did a little cleanup and saved in 2015.

     

    Features

    Many predefined color pallets

    Rolling color pallet to produce motion effect

    Ability to customize the color pallet

    Log color mapping

    Keyboard or mouse control

    Basic shortcut keys

    Saving high res images

     

    Needed improvements

    Documentation

    Clustering

    Save settings

     

    Operation

    Load project in LabVIEW 2015 32/64 bit

    Start program using Mandelbrot Main.vi

     

    Moved to Code Repository

  13. Hello everyone, I have been lurking in the shadows for a very long time now. I recently start programing with LabVIEW professionally for the past year. However I have been using it very extensively for the past 5 years. This place looks like a better fit for me then the normal NI forums. 

     

    I have a lot of projects and some are just partly finished. Almost all of them need extensive cleanup as my coding style was lacking badly back then. As I get them mostly together I'm going to start posting them and seeing what people like. I am hoping this will help me find the motivation I need to go forward.

     

    First up 

     

    Mandelbrot Explorer and Pastebin Interface

     

     

     

    Other projects I plan on posting in some form

     

    BCMath - Uses a hacked up version of the unix utility BC to do arbitrary precision math.

     

    Dynamic Code Generator - Allows program to recompile C and Assembly code on the fly during runtime. Very useful for encrypting code you don't want easily disassembled and other neat tricks. Code is compiled from and string and into memory you can call using a function pointer.

     

    SDL - Simple DirectMedia Layer https://www.libsdl.org/ Only a low level wrapper for the functions and covers the standard addon libraries. My first example https://youtu.be/NO1pF48_3MQ 

         I am wanting to do a nice high level interface so you can plan out great looking GUIs easily and turn that into a toolkit.

     

    Pure LV Graphics - 8bit truecolor graphics library with similar function as SDL using pure LV code. Started because the picture control sucks at rendering text properly and is slow even when using the opcodes. Chars get 2 extra lines at the bottom. So CP437 9x16 chars get rendered as 9x18 and the bottom two lines are filled with background or foreground. Discovered during next project

     

    ANSI ART Render - Renders ANSI Art. Might be useful code for terminal emulation. Example attached

     

    X86 Emulator - NEC V20, VGA CGA EGA support, Networking, Soundblaster. Based on Fake86. Current project

     

    Befunge 98 Generator - Uses Genetic algorithms to generate Befunge 98 code based on predefined goals such as text output or math functions

     

    Neural Network C Obfuscation - Replaces some functions and all constants with neural networks in C code to resist code analysis. Can be ran several times over the same file to further increase complexity. 

     

    Let me know what you guys think and if you have similar interests. I also have a few nice math art videos I created out on my youtube channel. https://www.youtube.com/channel/UCeW14yU1rQnalbThLamOt3g

     

     

     

     

     

    post-54463-0-88307300-1455504513.png

    • Like 1
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.