flat assembler
Message board for the users of flat assembler.

Index > Heap > to code "net use" and sendstr.exe, anyone?

Author
Thread Post new topic Reply to topic
sleepsleep



Joined: 05 Oct 2006
Posts: 8906
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
hi friends,
i am very much interested to know how to code a "net use" as in windows and sendstr.exe (which you could send printer control code to lpt1 lpt2 etc, com1 and etc port)

they are very useful when combine, eg. you net use a shared usb or lpt or network printer, then you could just use sendstr to designated lpt port, without dealing with USB, network, just deal with LPT,

i tested using current available tools, they works,
and now, i wish to code my own, Very Happy

1. is there a maximum LPT port could be created? 256?
Post 24 Jan 2014, 10:08
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
I'd suggest you scrounge at MSDN dump site for some information.
Post 24 Jan 2014, 15:40
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 8906
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
anyone could give me information on this net use?
is there api to get resemble effect like net use,

thank you.
Post 13 Feb 2014, 03:39
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17287
Location: In your JS exploiting you and your system
revolution
sleepsleep wrote:
is there api to get resemble effect like net use,
It is probably going to be very OS/driver specific.

I'd suggest an alternative is to simply open a new child process from your app and run 'net use ...' from there. Redirection of console I/O is easy.
Post 13 Feb 2014, 03:55
View user's profile Send private message Visit poster's website Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr
sleepsleep wrote:
anyone could give me information on this net use?
is there api to get resemble effect like net use
Definitely there is, and as typedef suggested it is described in MSDN: Windows API Index > Windows Networking Functions > WNetAddConnection2 function, for example.

You may take another approach and search net.exe imports for 'net', there's no magic in this.

All in all, do something, don't wait. ;-)
Post 13 Feb 2014, 08:55
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.