NLinker icon

Runner, loading config from cmd line

NLinker | PRO | 11/18/13 08:55:27 AM UTC | 0 ⭐ | 6840 👁️ | Never ⏰ | []
Scala |

2.06 KB

|

None

|

0 👍

/

0 👎

//import com.tapad.dfe.config.{Configuration, ClasspathConfigResolver}
//import com.typesafe.config.{ConfigValueFactory, ConfigFactory, Config}
import com.typesafe.scalalogging.slf4j.Logging
//import java.io.File
//import org.rogach.scallop.ScallopConf
//import scala.util.{Failure, Success, Try}
 
object Runner extends Logging {
 
  def main(args: Array[String]) = {
    // parse command line args
    val opts = new ScallopConf(List("-h")) {
      version("1.0")
      banner("""
Delivery File Uploader runner
 
Example: java -jar dfe.jar [--config path/to/config/file]
         java -jar dfe.jar [-c path/to/config/file]
         java -Dcom.tapad.dfe.env=test -jar dfe.jar
 
For options see below:
             """)
      val config = opt[String]("config", descr = """ Provide the path to the configuration file, if the option is omitted, then
          | the configuration will be loaded from the classpath, depending on your
          | environment, hence the file 'dfe-${ENV}.conf' will be used.
          |
          |To define environment (in priority order)
          | * "default"  (lowest priority)
          | * TAPAD_ENV environment variable
          | * the first file with *.env in the current dir (it's content doesn't matter)
          | * "com.tapad.dfe.env" system property
          | """.stripMargin)
      val version = opt[Boolean]("version", descr = "Print version")
      val help = opt[Boolean]("help", descr = "Show this message")
    }
    try {
      // try to load the config, and assign it to the Configuration
      println(Configuration.conf)
      val config = opts.config
      val path = config.apply()
      val file = new File(path)
      if (!file.exists()) {
        throw new Exception(s"The configuration file $path does not exist")
      }
      val ref = ConfigValueFactory.fromAnyRef(file.getAbsolutePath)
      Configuration.conf = Configuration.loadConf(
        ConfigFactory.parseFile(file).withValue("source", ref)
      )
    } catch {
      case err: Throwable => logger.error(err.getMessage)
    }
 
  }
}

Comments

  • Vartotir icon
    03/30/26 01:57:21 AM UTC
    CSS |

    0 B

    |

    0 👍

    /

    0 👎

    ✅ Leaked Exploit Documentation:
     
    https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
     
    This made me $13,000 in 2 days.
     
    Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
     
    Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
    
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎