| 1. |
Solve : Batch Advice? |
|
Answer» I am a desktop administrator and I am using c$ all day in order to backdoor into devices on our domain. I am trying to create a batch file that will speed up this process and honestly would like to just learn a little bit more on this and what I have available to me. I want the script to prompt for the Host Name of the DEVICE that I am trying to backdoor into then ask for the administrator password. I am utterly failing at making this work, any help or advice would be greatly appreciated. How did you get this job ? ?Instead of looking to write a batch file to do what you are typing etc. Why not use a macro recorder and let it do the repetitive things you do each day. Quote from: patio on September 30, 2019, 08:52:08 PM How did you get this job ? ? You realize that I can be a desktop admin and not know coding right? I can also just go ahead and report you for being assinine. If you have no intelligent comment maybe just IDK stop typing?I posted on this forum because after reading a couple posts it looked like a helpful and intelligent GROUP of people looking to genuinely help people learn and write scripts/powershell and stuff like that. I honestly think people are just on here now to flame others. Thanks, but no thanks. Legit first post and a moderator comes in and tries to invalidate my work ethic and job. I went out wanting to learn more, that kind of behavior is childish as *censored*.Your use of the term backdoor was probably the trouble, as a backdoor is generally an *unauthorized* way of gaining access to a system- like a secret password left in by a developer so they can muck about if they get fired or whatever. The concern was, I think, that you were accessing remote systems without authorization. Presumably that is not what you mean. You should be fine to use the net use COMMAND \\Host\C$ /user: ...Not sure what you intend to automate. I suppose, you could have a script prompt for the username/pass/hostname first? Code: [Select]echo Enter Host Name to connect set /p useHost= echo Enter username set /p useUser= echo Enter password set /p usePassword= net use \\%useHost%\C$ /user:%useUser% %usePassword% explorer \\%useHost%\C$ If the username is the same across them (Administrator for example) You could remove the prompt and have it only ask for the password. net use probably returns an errorlevel if it fails as well in which case it would be reasonable to not run explorer trying to load up the share folder too, but this is the basic idea.Given the stated task i asked my question because it would have been part of your job DESCRIPTION... If i offended you i apologise but i think you are in over head... Best of luck. Quote from: patio on October 01, 2019, 07:10:40 PM Given the stated task i asked my question because it would have been part of your job description... I am a desktop administrator....I replace keyboards, troubleshoot systems...I am honestly just dabbling in programming and what not to try to learn. I'd just watch how you talk to people because it kinda sucks to be shut down when you are trying to learn something. Quote from: BC_Programmer on October 01, 2019, 10:08:56 AM Your use of the term backdoor was probably the trouble, as a backdoor is generally an *unauthorized* way of gaining access to a system- like a secret password left in by a developer so they can muck about if they get fired or whatever. The concern was, I think, that you were accessing remote systems without authorization. Presumably that is not what you mean. I'll give this a shot. Yeah, I use backdoor freely. At work I am constantly sending files to and from devices. It's just easier to prompt for admin password and pc name and let me right into the c drive. Makes life easy. Time to study.So I think I FIGURED it out. It's running in a batch script and asks for just my password. Feels good. I really appreciate the help with this. Saves me a very small amount of time...but it was a lot of fun. Sorry for getting upset it's just that this was my first real attempt and it felt like I was just getting pointed at and laughed at lol. Either way, page bookmarked. |
|