Jump to content

CLI on Linux


Recommended Posts

Posted (edited)

Guys, I have another strange issue. I have written a script that executes the commands and works on Linux.

However, it has issues with SDN script parameter command execution.

Quote

-script: x;parameter1;paramater2;....

In terminal I get message 'command not found' for each line where is paramater for script options. In OSBot terminal (not that it really matters, but still) I get 'wrong amount of parameters'. I am ready to bet my both testicles that parameters are correctly input.
Probably the strangest part is that the same code works 100% on my Windows pc. And no, I haven't just ctrl+c;ctrl+v the code (found that was an issue sometimes when configuring .bat to .sh).

Any ideas...?

Edited by Magerange
Posted

Lol you dont need .sh appended to the filename of the script. If you would like to post your batch file I can help you convert it into a bash script.

from terminal vi filename

press i for insert mode to start typing

 

#!/bin/bash <-- this tells the script what shell you will be using.

enter your bash commands

 

press esc then :wq to write/quit the file

 

chmod +x filename 

./path/to/filename ---- don't forget the . in the beginning

MageRange add me on skype I can help you out.

 

chuckgreve2012@gmail.com

also, I wouldn't bet your testicles on that bahaha. 

Posted (edited)
8 minutes ago, thechuck said:

Lol you dont need .sh appended to the filename of the script. If you would like to post your batch file I can help you convert it into a bash script.

from terminal vi filename

press i for insert mode to start typing

 

#!/bin/bash <-- this tells the script what shell you will be using.

enter your bash commands

 

press esc then :wq to write/quit the file

 

chmod +x filename 

./path/to/filename ---- don't forget the . in the beginning

MageRange add me on skype I can help you out.

 

chuckgreve2012@gmail.com

also, I wouldn't bet your testicles on that bahaha. 

I've done all that and as I said - CLI works up untill 'script parameter' part for an SDN script. That is the only issue with the cli script - it does not recognize script parameters on Linux, but does on Windows for the same code, same input (eventhough it has no parameters).
I have no issues with a local script that I also use on Linux.

My testicle bet keeps on going, mate.

Edited by Magerange
Posted (edited)

Thanks @thechuck for trying to help, however it still is messy and doesn't start the script with necessary parameters :/

I'll just post pictures / output what I get when I try to run the code.

So the code is:

#!/bin/bash

java -jar OSBot.jar -login username:password -proxy IP:port:username:password -bot username:password:0000 -script id:param1;param2;param3;param4  -world XYZ

Output in terminal:

1.png.f99675083b2b7b63649fc4de9dc57422.png

Output in Osbot logger:

2.png.54113a04c7ce94fc0190b303d13e2bae.png

 

Edited by Magerange

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...