Jump to content

  • Log In with Google      Sign In   
  • Create Account

dsm1891

Member Since 31 Mar 2013
Offline Last Active Today, 01:00 PM

#5277589 Note to self

Posted by dsm1891 on 23 February 2016 - 05:50 AM

I almost deleted all .png's from my C drive once. That was a scary day at work. :)




#5276598 They called me crazy!

Posted by dsm1891 on 18 February 2016 - 10:19 AM

washu wrote me this :)

struct beufint_t {
public:
    beufint_t () : t(et::n), u(0) {}
    beufint_t (bool b) : t(et::b), b(b) {}
    beufint_t (float f) : t(et::f), f(f) {}
    beufint_t (int i) : t(et::i), i(i) {}
    beufint_t (unsigned u) : t(et::u), u(u) {}
    
    operator bool () const { return t == et::b ? b : false; }
    operator int () const { return t == et::i ? i : 0; }
    operator float () const { return t == et::f ? f : 0; }
    operator unsigned () const { return t == et::u ? u : 0; }
    operator void const * () const { return t != et::n ? this : 0; }

    bool operator () (bool) const { return t == et::b; }
    bool operator () (int) const { return t == et::i; }
    bool operator () (float) const { return t == et::f; }
    bool operator () (unsigned) const { return t == et::u; }
private:
    enum class et {
        b,
        f,
        i,
        u,
        n
    };
    
    union {
        bool b;
        float f;
        int i;
        unsigned u;
    };
    
    et t;
};



#5276142 They called me crazy!

Posted by dsm1891 on 17 February 2016 - 10:24 AM

tW41PnI.png

Ladies and gentle men, I bring to you, the Binteger (bool + int).




#5265282 Why didn't somebody tell me?

Posted by dsm1891 on 07 December 2015 - 11:02 AM

I always thought that his icon

tj1pGz9.png

was a carrot.

 

I just realised its a

 

Spoiler




#5264896 Why didn't somebody tell me?

Posted by dsm1891 on 04 December 2015 - 12:54 PM

Cats. They are not dogs.


#5252037 Convincing AntiVirsus, im not a virus

Posted by dsm1891 on 13 September 2015 - 08:44 AM

I think it is a little silly how Deep shield doesn't flag for VS09 applications, and even sillier that their (Avasts) official advice is "if you compile programs, don't use it".

 

 

The full extent of what happened is a combination of Deep shield false flagging the app as malware, andNot running the app as Admin on another PC (or the code I tested on the other pc ) or that on creation of the app it was flagged as malware and hence would not run on another pc with a different AV - don't know if that is a thing 




#5251916 Convincing AntiVirsus, im not a virus

Posted by dsm1891 on 12 September 2015 - 12:11 PM

Apparently this is a known issue with avast and vs13. Turns out avast deep shield was, atleast a part of the problem.
https://forum.avast.com/index.php?topic=139935.0


#5251765 Convincing AntiVirsus, im not a virus

Posted by dsm1891 on 11 September 2015 - 01:11 PM

 

As it turns out, running on my Work PC as admin I was able to write to files. However if I run as admin at home, I do not get an output

I think at this point, we can safely assume your PC is hosed in some way.

Are you willing to uninstall that anti-virus entirely, to see if that makes a difference? And then reinstall it afterwards, and test again?

 

I have come this far. Will update after this.




#5251744 Convincing AntiVirsus, im not a virus

Posted by dsm1891 on 11 September 2015 - 10:15 AM

what directory and file name did you try this time?

 

do you need me to create a new console project, and send you a test exe, source, solution file, etc?

 

the exe would test your C runtime, AV, and UAC. the project files would test your compiler install.

 

 

 


Mobile Developer at PawPrint Games ltd.
(Not "mobile" as in I move around a lot, but as in phones, mobile phone developer)
(Although I am mobile. no, not as in a babies mobile, I move from place to place)
(Not "place" as in fish, but location.)

 

sounds like Mr Kimball from Green Acres - well, not exactly like him - he usually talked about crops, not phones, unless it was a phonecrop - or was it a cropphone? Anyway - good luck fishing for your mobile baby!  <g>.

WELL, im glad to know atleast one person has read (and appreciated) my signature.

 

As it turns out, running on my Work PC as admin I was able to write to files. However if I run as admin at home, I do not get an output




#5251606 Convincing AntiVirsus, im not a virus

Posted by dsm1891 on 10 September 2015 - 02:25 PM

Redownloaded VS and the Redistributables to no effect




#5251572 Convincing AntiVirsus, im not a virus

Posted by dsm1891 on 10 September 2015 - 12:05 PM

Thanks for your replies, I will reinstall vs13ce, if that doesn't work I might take ypu up on your offer Norman

Thanks


#5251286 Convincing AntiVirsus, im not a virus

Posted by dsm1891 on 09 September 2015 - 01:30 AM

 

TCHAR appData[MAX_PATH];
if (SUCCEEDED(SHGetFolderPath(NULL,
    CSIDL_DESKTOPDIRECTORY | CSIDL_FLAG_CREATE,
    NULL,
    SHGFP_TYPE_CURRENT,
    appData))
    wcout << appData << endl;
 That little piece of code is already very suspicious in itself... 

This code is not the question here. This code works! If AV is off. Blocked if on. I have tried countless methods.

The problem isn't what,where,how I'm outputting. I have changed all 3 multiple times with no effect. AV blocks the program from writing to files.

 

--

 

As people seem so adamant on critiquing my code. Please do feel free to post your code that outputs files on your machine. But I am almost positive it will fail.




#5251203 Convincing AntiVirsus, im not a virus

Posted by dsm1891 on 08 September 2015 - 03:02 PM

We had to change the name of a exe from Updater.exe to prevent it being blocked. Hilarious really.

Name doesn't matter, I have tried so many things sad.png

 

one (of many) example programs that does not work:

#include <iostream>
#include <windows.h>
#include <fstream>
#include <direct.h>
#include <shlobj.h>
#include <sstream>
#include <tchar.h>
using namespace std;

int main()
{
        ofstream file;
        TCHAR appData[MAX_PATH];
        if (SUCCEEDED(SHGetFolderPath(NULL,
                CSIDL_DESKTOPDIRECTORY | CSIDL_FLAG_CREATE,
                NULL,
               SHGFP_TYPE_CURRENT,
                appData)))

               wcout << appData << endl;

       std::basic_ostringstream<TCHAR> file_path;
       file_path << appData << _TEXT("\\filename.txt");
 
      file.open(file_path.str().c_str());
      file << "hello\n";
      file.close();
        return 0;

}




#5251188 Convincing AntiVirsus, im not a virus

Posted by dsm1891 on 08 September 2015 - 12:53 PM

I will try that.

I am not sure of another way to write the data from rapidjson I just create a string from the prettywriter and output that string

 

--

 

Again, it does not matter the method of writing to a file ( I have tried 4/5 different ways) or what I write to a file, nor the file format. AV always blocks the output when compiled in VS13CE. All from a blank project, out putting to documents, desktop or temp with absolute path with forward slash or two back slash. People have given me code which works for them, however coming from me it does not output.




#5251185 Convincing AntiVirsus, im not a virus

Posted by dsm1891 on 08 September 2015 - 12:01 PM

Something your code is doing is wrong. I'm thinking SwiftCoder and Nypren are on the right track:
- Where you are outputting to (better not be a protected location)


Desktop, my documents temp dir with absolute path does not work

Project file with out (as per previous post but with backslashs)

- How you are outputting (the double forward slashes should be collapsed, but maybe it's being interpreted as a secret unnamed directory?)


As above, I tested a blank project, with various methods of outputting to. Text files inside the main function. Nada

And I'd also add:
- What you are outputting

Try outputting something entirely different, like "This is a test" without JSON or anything. If your program doesn't get flagged, it may mean that your output file looks suspiciously similar to a file that a known virus outputs, or something like that. Are your antivirus signatures up to date with your antivirus programs?


[Edit:] You're saying, the antivirus is blocking the file getting created, but not your entire program? Then double-check your file output location, permissions, and etc... It's quite possible the file isn't getting written to where you think it is.


Non of the outputed files appear anywhere.


Again my program works when compiled from vs08




PARTNERS