Jump to content

CLI on Linux


Magerange

Recommended Posts

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
Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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